Coldfusion cfpdfform with LiveCycle

193 views Asked by At

I am using <cfpdfform> to populate a LiveCycle Designer developed pdf form. I've excluded the destination attribute and the pdf shows in the browser exactly as I wish. However, it provides a filename of a series of numbers followed by=temp.pdf.

Is there any way to provide a variable name for the displayed file?

For example, if I provide a #URL.name# in my form submission, I would like the filename displayed in the browser to be smith.pdf or whatever name I place in the #URL.name#

1

There are 1 answers

5
yomexzo On

I think this is what you need below. I once had to create a pdf document using cfdocument and I used the below to specify the filename to render as. The caveat is that i had to save the file on the file system first which i achieved with same cfdocument.

note path_to_pdf_file_on_server and name_to_render_as.pdf in the code below

<cfheader name="Content-Disposition" value="attachment;filename=name_to_render_as.pdf">
<cfcontent type="application/pdf" file="path_to_pdf_file_on_server" deletefile="Yes">