cfdocument

CFPDF create variable from a BLOB

拜拜、爱过 提交于 2019-12-23 05:16:41
问题 In ColdFusion 9 we have pdf data stored in a blob in the database. How do I get that into a cfpdf variable? It seems like all options require a filename. Is there a way to do it without writing a file? 回答1: CFPDF and CFDOCUMENT are for creating and modifying a PDF dynamically. As you already have the PDF in a blob in your database you simply need the CF page to send it back as part of the response using CFCONTENT . Assuming you are using some type of ID to reference which PDF you want to

COLDFUSION: cfdocument and forcing a pagebreak

戏子无情 提交于 2019-12-18 05:54:45
问题 I am creating a dynamic PDF in ColdFusion and having an issue with "pagebreak". The page in question could have 1 record, or up to 60+ records. Each record is displayed in 2 rows of a table. Some of the returned records are being split between pages (first row is at the end of page one, the second row is the top row of the next). A sample record in displayed HTML: <tr> <td>Title</td><td>Price</td> <td colspan="2">Description</td> </tr> Per client request, I am trying to display =< 9 records

Content-disposition being ignored in IE 9 and Firefox 13

a 夏天 提交于 2019-12-13 13:11:26
问题 I am trying to dynamically create an inline PDF that, when the user chooses to save it, prompts with my custom filename. According to the documentation, the saveasname attribute should do what I want. (format="PDF" only) The filename that appears in the SaveAs dialog when a user saves a PDF file written to the browser. However, what is happening in both IE 9 and in Firefox 13.0.1 is that the filename that appears in the SaveAs dialog is the same as my CF template, but with a PDF extension.

CFDocument: coldfusion.document.spi.DocumentExportException: java.lang.NullPointerException

萝らか妹 提交于 2019-12-13 04:39:44
问题 I am trying to create a pdf using cfdocument but ColdFusion keeps throwing an exception and I can't find a way to work around this. This is the code that I am using: <cfdocument format="pdf" filename="rep_report.pdf" overwrite="yes" name="rep_report"> <!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" content="text/html; charset=utf-8" />

CFDocument PDF rendering issue with japanese

半世苍凉 提交于 2019-12-13 01:53:42
问题 Having some issue with Japanese font in cfdocument . The fonts are correctly coming up but they are being stretched (word wraps not working) and taking up extra space and hence breaking the design in the pdf file. The HTML content used in cfdocument is rendering correctly, also same is working correctly for Chinese and Korean fonts in the PDF file as well. Let me know if any more details are needed. 回答1: The word wrap issue was fixed by adding ColdFusion wrap function. 来源: https:/

How to set the height of a PDF header?

半城伤御伤魂 提交于 2019-12-12 13:15:24
问题 Does anyone know how I can set the height of a header in a pdf generated by <cfdocumentitem format="pdf:... ? I am using <cfdocumentitem type="header"> So have something like <cfdocument format="pdf" marginbottom="0" margintop="4" marginleft="0" marginright="0" pagetype="a4" unit="cm" fontembed="no"> <cfdocumentitem type="header"> This is my header.. I want to reduce the height but can't work out how. <cfdocumentitem> </cfdocument> Thanks in advance for any pointers. Jason 回答1: Use the margin

ColdFusion10 CFDocument Font scaling issue

时光毁灭记忆、已成空白 提交于 2019-12-12 01:42:52
问题 I'm generating a very basic PDF with header and footer like this: <cfdocument format="PDF" pagetype="A4" unit="cm" scale="100"> <cfset template_stlye = fileRead(expandPath('love.css'))> <cfdocumentitem type="header" evalatprint="true"> <cfif cfdocument.currentpagenumber eq 1> <style type="text/css" media="screen"> <cfoutput> #template_stlye# </cfoutput> </style> <div class="pdf_header"> <div class="header_text"> I'm a lovely header </div> </div> </cfif> </cfdocumentitem> <cfdocumentitem type=

cfimage from binary in cfdocument

泪湿孤枕 提交于 2019-12-11 08:56:08
问题 I am writing a PDF dynamically, and am creating a QR code on the document for eTicketing purposes i set my cfdocument localurl=yes to include a different image, which works fine, but since I am using an API call to get the binary for the qrCode, the using cfimage to display the image, it is only showing a red X <cfdocument format="PDF" overwrite="Yes" localUrl="yes" pageType = "letter"> <body> <cfoutput> <section id="header"> <img src="file:///#ExpandPath('images/header.png')#"/> <cfimage

image not displayed in cfdocument

对着背影说爱祢 提交于 2019-12-11 07:13:08
问题 I found a curios situation couple of days back which I was able to solve after losing a lot of temper. Well the issue is I am placing an image inside a dynamically created pdf(using cfdocument). I am able to see the image when I run my website locally. But once I upload the code to prod I get the broken-image at the image placeholder. 回答1: accepting Al everett's suggestion, the solution to problem is briefed. The issue of the image not being displayed was due to the HTTPS access of the

Coldfusion CFDOCUMENT creates a red X

你。 提交于 2019-12-11 06:38:24
问题 I have an issue with a server to server call with ColdFusion. Suppose I have two servers, each with a file: www.Content.com/webpage.cfm www.Badge.com/badge.jpg My source code looks like this: <cfdocument format="pdf" pagewidth="11" pageheight="8.5"> This is a simple PDF that was created to show issues with content generation on the server. This PDF uses an http:// reference to the badge server to show an image of a badged team member. <BR /> <BR /> <img src="https://www.badge.com/badge.jpg" /