Bug #81169 - Div bkgrnd color (of 1st div w/ content) not honored if cfdocument/pdf written to disk
- December 14, 2009
- 1 reply
- 486 views
Bug for: Div background color (of 1st div w/ content) is not honored when cfdocument/pdf is written directly to disk.
==================
Steps to reproduce
==================
Run the following code with (and without) the cfdocument 'name' attribute. Then compare both PDFs (the PDF written directly to browser, and the PDF written directly to disk)
<cfdocument format="pdf" name="myPDF">
<div style="background-color:#1a9cee;"></div>
<div style="background-color:#1a9cee; border:2px solid #1a9cee;">I am the 1st div w/ content. Background color is only honored when PDF is written to browser. When PDF is written to disk, background color is near black.</div>
<div style="background-color:#1a9cee; border:2px solid #1a9cee;">I am the 2nd div w/ content. Background color is always honored.</div>
</cfdocument>
<cfif structKeyExists(variables, "myPDF")>
<cfpdf action="write" source="variables.myPDF" destination="#expandPath('./MyPDF.pdf')#" overwrite="yes" />
</cfif>
==================
Attachments
==================
PDF written directly to disk: 20091214_Bug_81169_CFDocumentPDFDivBkgrndColorNotHonored_01.pdf
PDF written directly to browser: 20091214_Bug_81169_CFDocumentPDFDivBkgrndColorNotHonored_02.pdf
Thanks!,
-Aaron Neff
Btw, this bug is new to CF9. This bug did not affect CF 8.0.1.
