Hi,

What is your usecase for putting an Image in PDF ? If you want to create
a new PDF and inside that if you want to embedded the image then it's
simple. You can use <cfdocument> tag, write down your HTML inside this
container tag, also put your <img src="image.jpg"> tag to insert it in
the result PDF.

If you want to do this with an existing  PDF, then there is a work
around.
 
Using <cfdocumet> tag, create a PDF page containing your Image keep it
in a variable. Then you can use <CFPDF> tag to merge this PDF doc with
your original PDF doc. So lets say you have a 10 page pdf doc,
somebook.pdf and you want to add that new page with image as 6th page so
it could be achieved like this:

<!---Creating a image document--->

<cfdocument format="pdf" name="imgpdf" unit="in" pagetype="custom"
pageheight="8.5" pagewidth="5.5" overwrite="yes" filename="img.pdf">
<h1>This is the Image I want to insert</h1>
<img src="whiteFlower.jpg" height="200" width="300"  />
<h1> Some text to add....</h1>
</cfdocument>

<!---Inserting it at any specified location (21st page here)--->

<cfpdf action="merge" name="pdfvar">
<cfpdfparam source="somebook.pdf" pages="1-20">
<cfpdfparam source="imgpdf">
<cfpdfparam source="somebook.pdf" pages="20-44">
</cfpdf>

<!---writing the doc to browser--->

<cfcontent type="application/pdf" variable="#toBinary(pdfvar)#" > 

Jayesh
Adobe CF Team

-----Original Message-----
From: Bryan Stevenson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 26, 2007 2:43 AM
To: CF-Talk
Subject: Re: CF8 and pdfs

> Anyone know if you can place an image in a PDF in CF8?
>
> Thanks,
> Chad

You could in 7, so don't see why not in 8 (not that it always worked in 
7...there were some known issues).

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com

Notice:
This message, including any attachments, is confidential and may contain
information that is privileged or exempt from disclosure. It is intended
only for the person to whom it is addressed unless expressly authorized
otherwise by the sender. If you are not an authorized recipient, please
notify the sender immediately and permanently destroy all copies of this
message and attachments. 





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:284625
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