November 19th, 2013, 08:42 AM
I have a link that returns a PDF.
sample link: www.sample.com\servlet?account=1234567
How will I instantly display this link on a page without using HREF?
I tried cfhttp.filecontent but it only displays random stuff like you open a PDF in a notepad.
I currently use IFRAME to display the link and work fine.
<IFRAME width="1100" height="800" src="www.sample.com\servlet?account=1234567"></IFRAME>
Problem is, I need to have a print functionality. But using IFRAME, it doesnt show me the PDF.
I think i need to use something like the filecontent.
Can anyone please help me?
November 19th, 2013, 10:15 AM
November 19th, 2013, 12:23 PM
Sorry for not mentioning. I am really coding at coldfusion. Sadly I cant use cfpdf and cfdocument cause im using ver 6.1. So i have no choice but to use java script.
Originally Posted by kiteless
December 4th, 2013, 12:35 PM
Not sure of your exact requirements, but this might be useful:
<cfheader name="Content-Disposition" value="filename=#filename#">
<cfcontent file="#pathToFile#" type="application/pdf">