Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 93817

Re: Problems with CFHTMLTOPDF

$
0
0

Peter, I have tried using cfhttp, but am not able to get that to work either.  Here is my code:

 

<!DOCTYPE HTML>

<html>

<head>

<meta charset="UTF-8">

<title>LCAP TESTING</title>

 

<cfset vServer = 'http://127.0.0.1/lcapcaTesting/app/'>

<cfset vPage = '/reportsCF/reportsDocument.cfm?#SESSION.URLToken#'>

       

<cfhttp url="#vServer##vPage#" result="vResult">

<cfset vContent = vResult.fileContent>

 

</head>

 

<body>

 

<cfhtmltopdf

  source="#vServer##vPage#"

  pagetype="letter"

  orientation="landscape"

  marginTop="1" marginBottom="1" marginLeft="1" marginRight="1">

 

</cfhtmltopdf>

 

</body>

</html>

 

With the URL Token included, as in the code above, it errors, saying

 

Error occurred while generating PDF.

Reason: THE REFERENCE TO ENTITY "CFTOKEN" MUST END WITH THE ';' DELIMITER.

 

Never have seen that before in 15 years of working with CF.  Head scratcher.  So, tried adding ; after the Token as in #SESSION.URLToken#; but no go, same error message.

 

IF the URL Token is not passed with the page, we end up with a beautiful PDF our login page (session is dropped?).


Viewing all articles
Browse latest Browse all 93817

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>