You might want to look at using iText.  Here is a CFC that shows some code that 
uses iText to place images.
http://www.reactivevision.com/coldPDF.txt

I have not experimented very much with CFDocument and exact placement of items, 
but the results I have seen are very inconsistent.  I think mainly because you 
are taking HTML and CFdocument it converting it to PDF.  So there is some fudge 
factor.

Have you tried using CSS instead of HTML?  With CSS you might get better 
results because you can position thinks absolute.
<div style="position: absolute; top: 96px; left: 20px; border: 2px solid 
#000000;">
</div>

I have also used PDFToolKit from Active pdf in a .Net application to create 
PDFs.  I suppose with CF8 I will be able to use this .net dll... could be 
interesting.
http://www.activepdf.com/




-----Original Message-----
From: Arthur.Frey [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 31, 2007 1:43 PM
To: CF-Talk
Subject: CFDocument Help

I am trying to create a 2 page document with a custom page size (17x11 
inches). The basics of the document are a table that should fill 100% of 
the document in two columns.

Example:
Create a new cf page and paste the following code:

<cfdocument name="MyPDF" filename="MyPDF.pdf" format="PDF" 
pagetype="custom" pageheight="11" pagewidth="17" margintop="0" 
marginbottom="0" marginright="0" marginleft="0" orientation="portrait" 
unit="in" backgroundvisible="yes" overwrite="yes" fontembed="no">
<cfdocumentsection margintop="0" marginbottom="0" marginright="0" 
marginleft="0">
<table width="1650" border="0" cellpadding="0" cellspacing="0" 
bgcolor="#000000">
<tr>
<td width="825" height="1050" style="color:#FFFFFF">page 1, column 1</td>
<td width="825" height="1050" style="color:#FFFFFF">page 1, column 2</td>
</tr>
</table>
</cfdocumentsection>
<cfdocumentsection margintop="0" marginbottom="0" marginright="0" 
marginleft="0">
<table width="1650" border="0" cellpadding="0" cellspacing="0" 
bgcolor="#000000">
<tr>
<td width="825" height="1050" style="color:#FFFFFF">page 2, column 1</td>
<td width="825" height="1050" style="color:#FFFFFF">page 2, column 2</td>
</tr>
</table>
</cfdocumentsection>
</cfdocument>

<a href="MyPDF.pdf" target="_blank">MyPDF.pdf</a>

When you click on the link you will see a pdf generated that is 2 pages 
long. I need one page. I am going to be filling these two columns with 
images and text generated from a database, but this basic framework is 
the key.

I have no idea how to build this so it fills in 100% of the page and not 
overflow onto an extra page. Any help would be greatly appreciated. Even 
if you can help me learn the height and width of the anticipated PDF at 
17x11inches I would be thrilled.

I would be happy to send you the origional pdf is that would help anything.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284967
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to