Hello

I am using cfx_html2pdf (the java version) and have it working except that
images do not show up in the pdf. Has anybody come across this before? I am
only converting a template with some text and an image but for the rest, I
am using the exact example code that came with the tag.
I set the........
Java Virtual Machine Path= c:/jdk1.3.1/jre/bin/classic/jvm.dll
Class Path= c:/cfusion/java/classes
When installing JDK 1.3.1, I set the system paths (under control
panel/system/advanced) to the correct path (C:\jdk1.3.1\bin ).

If anyone has an idea about this I would greatly appreciate it. Below is
code used:

The page that gets converted:
********************
<HTML><HEAD><TITLE>A sample for HTML2PDF tag</TITLE></HEAD><BODY>

<h1><font color="Red">This is a sample page for HTML2PDF custom
tag.</font></h1>
Sample text
<br>
<img src="images/sample.GIF" width="109" height="29" alt="" border="0">
<div align="center">A nice picture</div>

<CFINCLUDE TEMPLATE="topdf.inc">

</BODY></HTML>

*********************


The topdf.inc template:
*********************
<CFSET s = "http://"; & CGI.SERVER_NAME & CGI.SCRIPT_NAME>
<CFSET qs = CGI.QUERY_STRING>
<cfoutput>
<form action="toPdf.cfm" method="post">
<input type="hidden" name="sourceurl" VALUE="#s#">
<input type="hidden" name="sourceqs" VALUE="#qs#">
<div align="center"><input type="submit" value="To PDF FILE"></div>
 </form>
  </cfoutput>
*********************


The topdf.cfm template:
*********************
<HTML><HTML><HEAD><TITLE>PDF Generator</TITLE></HEAD><BODY>
 <cfset url="#sourceurl#">

<cfif sourceqs is not "">
<cfset url=url&"?#sourceqs#">
</cfif>
 <CFHTTP
    URL =  #url#
    resolveurl = 1
    throwonerror = Yes>
</CFHTTP>

<cfset filename = "#rand()#.pdf">
<CFX_Html2pdf
html_String=#cfhttp.filecontent#
outputfile="c:\inetpub\wwwroot\#filename#"
imagesdir="c:\inetpub\wwwroot\images\"
header="HTML2PDF Demo Page"
footer="HTML2PDF Demo"
hd_size=7
hd_style="BOLD"
hd_color="7dedf7"
hd_alignment="RIGHT">

<cfcontent type="application/pdf" file="c:\inetpub\wwwroot\#filename#"
deletefile="Yes">
</BODY></HTML>
*********************



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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