We are using ActivePDF and <cfobject> to create the dynamic PDF files.
In the form page, a link
<a href="downloadref.cfm? ControlNum=#getreflist.controlNumber#" target="_blank">Download Form</a>
Then in downloadref.cfm page, create the PDF file
<cfquery datasource="#DSN#" name="getupdate">
select *
FROM refEval
WHERE controlNumber = '#url.controlNum#'
</cfquery>
<cfoutput>
<cfobject type="COM"
name="PDF"
class="APToolkit.Object"
action="CREATE">
<CFSCRIPT>
lastname = #lastname#;
firstname = #firstname#;
discipline = #discipline#;
name = #refname#;
title = #getupdate.Title#;
department = #getupdate.Department#;
institution = #getupdate.institution#;
email = #getupdate.Email#;
r = PDF.OpenOutputFile(ExpandPath("referenceforms/reference#controlnumber#.pdf");
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(460,643,controlnumber);
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(62,643,lastname);
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(272,643,firstname);
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(150,625,discipline);
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(164,608,name);
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(423,608,institution);
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(158,590,title);
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(428,590,department);
x = PDF.MergeFile(ExpandPath("reference.pdf",1,1);
PDF.CloseOutputFile();
</CFSCRIPT>
<cflocation url="referenceforms/reference#controlnumber#.pdf" addtoken="No">
</cfoutput>
It was working last week. I could open the PDF file directly from the browser fine by clicking on the link. Then suddenly, it doesn't work anymore. When I click on the download form link, a window pops up and asks if I want to open or save the file. Choose either one, I get an error "Internet Explorer was not able to open this internet site...."
Not sure what's going on or what caused it. Please help!!
Thanks
In the form page, a link
<a href="downloadref.cfm? ControlNum=#getreflist.controlNumber#" target="_blank">Download Form</a>
Then in downloadref.cfm page, create the PDF file
<cfquery datasource="#DSN#" name="getupdate">
select *
FROM refEval
WHERE controlNumber = '#url.controlNum#'
</cfquery>
<cfoutput>
<cfobject type="COM"
name="PDF"
class="APToolkit.Object"
action="CREATE">
<CFSCRIPT>
lastname = #lastname#;
firstname = #firstname#;
discipline = #discipline#;
name = #refname#;
title = #getupdate.Title#;
department = #getupdate.Department#;
institution = #getupdate.institution#;
email = #getupdate.Email#;
r = PDF.OpenOutputFile(ExpandPath("referenceforms/reference#controlnumber#.pdf");
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(460,643,controlnumber);
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(62,643,lastname);
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(272,643,firstname);
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(150,625,discipline);
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(164,608,name);
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(423,608,institution);
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(158,590,title);
r = PDF.SetHeaderFont("Helvetica",10);
PDF.SetHeaderText(428,590,department);
x = PDF.MergeFile(ExpandPath("reference.pdf",1,1);
PDF.CloseOutputFile();
</CFSCRIPT>
<cflocation url="referenceforms/reference#controlnumber#.pdf" addtoken="No">
</cfoutput>
It was working last week. I could open the PDF file directly from the browser fine by clicking on the link. Then suddenly, it doesn't work anymore. When I click on the download form link, a window pops up and asks if I want to open or save the file. Choose either one, I get an error "Internet Explorer was not able to open this internet site...."
Not sure what's going on or what caused it. Please help!!
Thanks