cfdocument

Image is not displaying in cfdocument pdf for coldfusion 10

浪尽此生 提交于 2019-12-10 15:57:25
问题 I am using ColdFusion 10 Enterprise edition, and am unable to display images when using CFDOCUMENT to generate a PDF. Below is the piece of code I am using: <cfsavecontent variable="report"> <table align='center'> <cfoutput query="VARIABLES.result"> <tr> <td> <div class='addInfoDetails'>#SHOWINFO#</div> </td> </tr> </cfoutput> </table> </cfsavecontent> In the above code, the VARIABLES.result query is coming from database and SHOWINFO is a variable having the content of image and text. For

Adding a footer only to the last page when using cfdocument

感情迁移 提交于 2019-12-07 06:24:14
问题 I'm creating a multipage document using cfdocument (created using dynamic text so could have any number of pages even one). I can use <cfdocumentitem type="footer"> to add a footer to every page, but is there any way I can only add a footer to just the last page of the document? Thanks. 回答1: Just add the evalAtPrint attribute. Then you can use the page number variables to conditionally set the footer. <cfdocumentitem type="footer" evalAtPrint="true"> <cfif cfdocument.currentPageNumber eq

Adding a footer only to the last page when using cfdocument

混江龙づ霸主 提交于 2019-12-05 11:03:27
I'm creating a multipage document using cfdocument (created using dynamic text so could have any number of pages even one). I can use <cfdocumentitem type="footer"> to add a footer to every page, but is there any way I can only add a footer to just the last page of the document? Thanks. Just add the evalAtPrint attribute. Then you can use the page number variables to conditionally set the footer. <cfdocumentitem type="footer" evalAtPrint="true"> <cfif cfdocument.currentPageNumber eq cfdocument.totalPageCount> This is the last page </cfif> </cfdocumentitem> As you know you cannot evaluate

How to put an image from a local drive into a cfdocument file?

☆樱花仙子☆ 提交于 2019-12-02 22:31:39
问题 This will show me the image in a browser: <cfset myImage=ImageNew("d:\UploadedDocuments\thumbnails\1487862_page_1.jpg")> <cfimage source="#myImage#" action="writeToBrowser"> But if I use the same code inside of a .pdf file, it generates a small red x. Is this not possible to do? 回答1: If the image is already on the drive you don't need CFIMAGE here. You can embed it like so: <img src="file:///d:\mysite\images\myimage.jpg" width="50" height="60"> You could also use an HTTP Path to it as well -

How to put an image from a local drive into a cfdocument file?

假装没事ソ 提交于 2019-12-02 09:06:50
This will show me the image in a browser: <cfset myImage=ImageNew("d:\UploadedDocuments\thumbnails\1487862_page_1.jpg")> <cfimage source="#myImage#" action="writeToBrowser"> But if I use the same code inside of a .pdf file, it generates a small red x. Is this not possible to do? If the image is already on the drive you don't need CFIMAGE here. You can embed it like so: <img src="file:///d:\mysite\images\myimage.jpg" width="50" height="60"> You could also use an HTTP Path to it as well - store it at a location accessible by your web server through real or virtual directories use the <img> tag

cfchart not printing in PDF

自古美人都是妖i 提交于 2019-12-02 08:37:05
I'm trying to print PDF from HTML using cfdocument. The code works fine when I access it through localhost, but when I use static IP to test it online on the same server it timeouts. I tried cfhtmltopdf it didn't timeouts but it doesn't generate the chart and shows "image missing icon". nor charts get generated nor images. text gets printed fine. And it takes like 20 to 30 seconds to generated the PDF when an image or chart is used. I tried this on CF11 32bit and 6bit both having same issue. Even the simplest codes fails: <cfhtmltopdf> <!DOCTYPE html> <html> <body> <div class="pdf_logo" style=