cfdocument

CFDocument PDF not showing Japanese data

折月煮酒 提交于 2021-01-28 21:06:09
问题 I have created a pdf with Japanese content using CFDocument. But It does not showing the Japanese data. I have used pageEncoding as utf-8. It showing only blank space instead of Japanese data. I have used the following code, <cfcontent type="application/pdf"> <cfheader name="Content-Disposition" value="attachment;filename=test.pdf"> <cfprocessingdirective pageencoding="utf-8"> <cfdocument format="PDF" localurl="yes" marginTop=".25" marginLeft=".25" marginRight=".25" marginBottom=".25"

How can I prevent page-break in CFDocument from occuring in middle of content?

不羁的心 提交于 2020-01-24 03:25:14
问题 I am generating a PDF file dynamically from html/css using the cfdocument tag. There are blocks of content that I don't want to span multiple pages. After some searching I found that the style "page-break-inside" is supported according to the docs. However in my testing the declaration "page-break-inside: avoid" does no good. Any suggestions on getting this style declaration to work, or have alternative suggestions? Here is an example. I would expect the content in the div tag not to span a

Can a div be partially transparent in cfdocument pdfs? How?

[亡魂溺海] 提交于 2020-01-17 02:47:08
问题 Need a div to partially show the image behind it, is this even possible? Tried: opacity:.5; AND filter:alpha(opacity=50); Both produce a solid div. Any help would be much appreciated. 回答1: From a wondrous pure guess in a comment, I managed to find a working answer: Did you try using a semi-transparent .png ? Yay! 回答2: Right you are, thirtydot! You gotta toss a thumbs-up for cfdocument, eh? I've confirmed this works in CF9. I do wonder whether this example is backward compatible. Can anyone

ColdFusion10 CFDocument debug output

我的梦境 提交于 2020-01-15 06:06:35
问题 Is there a way to capture the complete HTML code from CFDocument before it generates the actual Document/PDF (for debugging)? The tag itself doesn't seem to support it. What works partially is storing the separate parts of the HTML via cfsavecontent but I can't capture the whole thing at once: <cfsavecontent variable="test123"> <style type="text/css" media="screen"> <!-- Style based on paperSize--> <cfoutput> #request.paperSize.css# </cfoutput> </style> </cfsavecontent> <cfdump var="#test123#

ColdFusion10 CFDocument debug output

試著忘記壹切 提交于 2020-01-15 06:05:30
问题 Is there a way to capture the complete HTML code from CFDocument before it generates the actual Document/PDF (for debugging)? The tag itself doesn't seem to support it. What works partially is storing the separate parts of the HTML via cfsavecontent but I can't capture the whole thing at once: <cfsavecontent variable="test123"> <style type="text/css" media="screen"> <!-- Style based on paperSize--> <cfoutput> #request.paperSize.css# </cfoutput> </style> </cfsavecontent> <cfdump var="#test123#

cfchart not printing in PDF

落花浮王杯 提交于 2020-01-11 14:09:49
问题 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.

CFDocument ignoring background color when in loop

只谈情不闲聊 提交于 2020-01-06 20:00:22
问题 I'm running a loop to build multiple PDFs. The background colors of pdf 2+ created in the loop just plain disappear. Doesn't matter if the background color is defined in CSS, as an HTML style, using hex code or just a color name. This is not an issue if I were to create 2 pdfs in a row without a loop. Any idea what gives? 回答1: This is a bug, it only effects cfdocument saved in memory, it does not effect cfdocuments that are displayed directly to the browser. If you have to save your document

Using cfimage to display a file that doesn't have an extension

随声附和 提交于 2020-01-06 01:44:29
问题 curious one this. I'm working on a process that generates PDF files, combining data from various sources. The last piece of this process I need to complete is merging in image files. This is actually fairly straightforward but the problem I have is the image files aren't stored with file extensions. Locally, I can change the filename, but in production this isn't an option. So because a filename looks like : B71637CB-A49C-0653-EF813918736BDEB7 This will not work: <cfimage action=

CFDocument still cutting off the tops of text on some pages

烂漫一生 提交于 2019-12-24 00:35:30
问题 when using cfdocument some of our pages have the top line cut off making it unreadable. I know there was a bug in 7, that was said to be fixed in 8. We're using 8,0,1,195765 and continue to have the problem. All my searches lead me to CF7. Anyone have any ideas? <cfdocument format="pdf"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type"

ColdFusion - converting HTML webpage to Word or PDF document

扶醉桌前 提交于 2019-12-23 05:47:06
问题 I have a webpage, where user has a possible to Print this page OR to save it on his/her computer. How may I save it as a Word or PDF document? Thanks. 回答1: For the MS Word requirement, most versions of Office can interpret basic html/xml. So you might consider the old cfcontent hack as a simpler alternative to POI. (The Word package is not quite as mature as the spreadsheet package.) Basically you generate html, but use cfheader/cfcontent to tell the browser the content is really a Word