Question
saveasname not working - cfdocument
Hi,
I am creating a pdf in a coldfusion page called template.cfm, the code is below. I am not writing the PDF to a location on the server, but I am allowing the user to save the pdf to their own computer. I would like to change the filename of the PDF if the user chooses to save the PDF, the suggested filename would be based upon the content, but in my example, I would like it to change to 'newname.pdf'
I thought I would be able to use the saveasname attribute, but it doesn't seem to be working. Every time the user hits the 'save' button, the filename always displays as 'template.pdf'.
Can anybody tell me what I am doing wrong?
Thanks,
Mark
I am creating a pdf in a coldfusion page called template.cfm, the code is below. I am not writing the PDF to a location on the server, but I am allowing the user to save the pdf to their own computer. I would like to change the filename of the PDF if the user chooses to save the PDF, the suggested filename would be based upon the content, but in my example, I would like it to change to 'newname.pdf'
I thought I would be able to use the saveasname attribute, but it doesn't seem to be working. Every time the user hits the 'save' button, the filename always displays as 'template.pdf'.
Can anybody tell me what I am doing wrong?
Thanks,
Mark
