Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFPDF pdf being downloaded as .cfm file

Explorer ,
Jun 20, 2012 Jun 20, 2012

Hi there,

My website uses ColdFusion to create pdfs. Currently, users have been contacting me to say the PDFs that are created are being downloaded as .cfm files instead of .pdf files. This is annoying because they have to manually rename the file extension every time. As far as I am aware this is only happening in Firefox.

Is this a known issue and something fairly simple to correct?

Thanks for any input.

Ben.

4.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 20, 2012 Jun 20, 2012
LATEST

Adding the following cfheader fixed the issue:

<cfheader name="Content-Disposition" value="attachment; filename=#getFileFromPath(PDFpath & '_myFileName.pdf')#">

Except, now the alternate function of e-mailing the PDF as an attachment (rather than displaying it in the browser or saving it to their computer) does not work.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources