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

Custom 'Save As' file name for cfdocument

Contributor ,
Feb 25, 2009 Feb 25, 2009

Copy link to clipboard

Copied

I have a page that generates a PDF (genPDF.cfm). When the user attempts to save it, it saves as genPDF.pdf. Is there any way that when they go to save it, I can dynamically name the document? I am using Blue Dragon 7 here so any cool CF8 additional tags are not accessible. I know, sucks, right? Thanks!
TOPICS
Advanced techniques

Views

1.8K

Translate

Translate

Report

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
LEGEND ,
Feb 25, 2009 Feb 25, 2009

Copy link to clipboard

Copied

How do you get the name genPDF.cfm and why does it not have a pdf file extension?

Votes

Translate

Translate

Report

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
Contributor ,
Feb 25, 2009 Feb 25, 2009

Copy link to clipboard

Copied

The file name is genPDF, the files saves as genPDF.pdf.

Votes

Translate

Translate

Report

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
LEGEND ,
Feb 27, 2009 Feb 27, 2009

Copy link to clipboard

Copied

LATEST
no clue about BD, but in CF you would use a combination of <cfheader>
and <cfcontent> tags to tell the web server how to serve the file, what
mime type it is, what its name is and where to get the real file from.

all details are in the cfml reference/livedocs. no clue if BD has such
tags, but i would be surprised if it didn't...

<cfheader name="Content-Type" value="application/pdf">
<cfheader name="Content-Disposition" value="attachment;
filename=My_Super_Wicked_PDF.pdf">
<cfcontent type="application/pdf"
file="D:\MyFiles\Docs\PDF\This_PDF_is_actually_lame.pdf" deletefile="No">

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/

Votes

Translate

Translate

Report

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
Documentation