Skip to main content
PSTricenarian
Participating Frequently
June 20, 2012
Question

CFPDF pdf being downloaded as .cfm file

  • June 20, 2012
  • 1 reply
  • 4402 views

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.

This topic has been closed for replies.

1 reply

PSTricenarian
Participating Frequently
June 20, 2012

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.