-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kevin,

Maybe try locking the cfhttp call.

Aaron Johnson, MCSE, MCP+I
Allaire Certified ColdFusion Developer
MINDSEYE, Inc.
<phn>617.350.0339
<fax>617.350.8884
<icq>66172567
[EMAIL PROTECTED]

___________________________________________
"Never forget that only dead fish swim with 
the stream." -- Malcolm Muggeridge
___________________________________________


- -----Original Message-----
From: Kevin Willyerd [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 15, 2000 9:34 AM
To: CF-Talk
Subject: html2pdf inconsistancies


I am trying to use the html2pdf tag. Sometimes it works (generating
the pdf
file) other times it doesn't. I thought that maybe the file was not
getting
written in time to be read so I tried a couple of loops to check.
(They are
commented out in the code below). The behavior did not change. Has
anyone
had any luck with getting this tag to run consistently?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
        <title>Pdf Display</title>
</head>

<body>
<!--- <cfset filename='test'> --->

 <cfset
filename='File'&#session.cfToken#&#month(now())#&#day(now())#&#hour(no
w())#&
#minute(now())#&#second(now())#>
<cfoutput>#filename#</cfoutput>

<!--- Generate static file from cfm template --->
<cfhttp url="http://64.219.64.36/webmonkey/itineraryresults.cfm"
        method="POST"
        resolveurl="false"
        timeout="60"
        throwonerror="Yes">
<cfhttpparam type="FORMFIELD" name="day" value="2,3,9,10">
<cfhttpparam type="FORMFIELD" name="genrelist" value="1,2,3,4,5">
<cfhttpparam type="FORMFIELD" name="d2" value="0,0,0,0">
</cfhttp>

<!--- Write page to file --->
<cfoutput>
<CFLOCK name="#Session.cftoken#" TIMEOUT="30" >
<cffile action="WRITE"
        file="c:\inetpub\wwwroot\webmonkey\print\files\#filename#.html"
        output="#cfhttp.filecontent#"
        nameconflict="OVERWRITE"
        attributes="Normal">
</cflock>
</cfoutput>

<!--- Send file to screen --->
<cfoutput>#cfhttp.filecontent#</cfoutput>

<!--- Make sure file is written --->

 <!--- <cfoutput>
<cfloop condition="#file.FileWasSaved#">
<cfset x=1>
</cfloop>
</cfoutput>  --->

 <!---  <cfloop index="w" from="1" to="10000">
<cfset w=w+1>
</cfloop>  --->

<!--- Create pdf file --->

<!--- <cflock  name="#Session.cftoken#" TIMEOUT="30">
<cfoutput>
<cfx_html2PDF htmldoc="c:\htmldoc\htmldoc.exe"
INPUTFILE="c:\inetpub\wwwroot\webmonkey\print\files\#filename#.html"
OUTPUTFILE="c:\inetpub\wwwroot\webmonkey\print\files\#filename#.pdf"
OPTIONS="--webpage -f">
</cfoutput>
</cflock>  --->
<!---
<!--- Delete static html file --->
<CFLOCK name="#Session.cftoken#" TIMEOUT="30">
<cfoutput>
<cffile action="Delete"
        file="c:\inetpub\wwwroot\webmonkey\print\files\#filename#.html">
</cfoutput>
</cflock>

<!--- Add print Button --->
<cfoutput>
To print click<a href="files/#filename#.pdf">HERE</a>!
</cfoutput> --->

</body>
</html>
Kevin Willyerd
Cold Fusion Developer
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to