Change mimetype to content_type in PDF output function