Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

cfhtmltopdfitem cannot include HTML in the footer/header

244 views
Skip to first unread message

Tim Brown

unread,
Jan 27, 2015, 5:38:17 PM1/27/15
to
Please vote for my bug/enhancement (https://bugbase.adobe.com/index.cfm?event=bug&id=3928680)

Seems like an oversight that you cannot include HTML in the body of a tag that includes the term HTML.

If anyone has a work around on how to create an image from an HTML snippet it might be workable, but otherwise I'm stumped on how to accomplish a nice looking footer using the <cfhtmltopdfitem> tag.


I'd like to do something like:

<cfhtmltopdf overwrite="true" name="myPDFFile" destination="#myDestinationPath#">

<cfhtmltodpfitem attributeCollection="#stMyAttributes#">

</cfhtmltopdfitem>

</cfhtmltopdf>

Instead of being restricted to simple values like this....

<cfhtmltopdfitem type="footer" attributecollection="#stMyAttributes#">
<cfoutput>Page _PAGENUMBER of _LASTPAGENUMBER for Document ID [ #ATTRIBUTES.pdfID# ]</cfoutput>
</cfhtmltopdfitem>

=======================================================================
I would even like to utilize the image attribute and pass it a dynamically rendered image for use in the footer

How could I convert the below html snippet into an image??
<cfsavecontent variable="myImageHTML">
<h5>Something to put into the footer</h5>
<img src="/maybe/a/logo/or/other/img.png" />
</cfsavecontent>

<cfset somethingUnique = getTickCount()>

<!--- how can i convert the above variable into an image for use as image path in cfhtmltopdfitem tag below??? imageNew()??

need to make an image that lives in VFS such as:
/myVFSMapping/myDynamicImage#somethingUnique#.png
--->

<cfhtmltopdfitem
type = "footer"
isBase64 = "yes"
showonprint = "yes"
align = "right"
image = "/myVFSMapping/myDynamicImage#somethingUnique#.png"
</cfhtmltopdfitem>
0 new messages