tracker issue : CF-4198265

select a category, or use search below
(searches all categories and all time range)

[ANeff] Bug for: cfdocument vs cfhtmltopdf wrt watermark

| View in Tracker

Status/Resolution/Reason: To Track//ThirdParty

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff ()

Created: 01/16/2017

Components: Document Management, PDF Generation (CFHTML2PDF)

Versions: 2016,2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2016.0.01.298513 /

Priority/Frequency: Normal / Some users will encounter

Locale/System: English / Win All

Vote Count: 1

Issue: cfhtmltopdf-created PDFs prevent cfpdf from adding watermark properly. No issue w/ cfdocument-created PDFs.


<!--- cfdocument good --->
<cfdocument format="pdf" name="myPDF"><cfoutput>#repeatString("cfdocument good ", 400)#</cfoutput></cfdocument>
<cfpdf action="addwatermark" source="myPDF" image="#imageNew('',400,400,'','blue')#">
<cfpdf action="write" source="myPDF" destination="#expandPath('./cfdocument_good.pdf')#" overwrite="yes">

<!--- cfhtmltopdf bad --->
<cfhtmltopdf name="myPDF"><cfoutput>#repeatString("cfhtmltopdf bad ", 400)#</cfoutput></cfhtmltopdf>
<cfpdf action="addwatermark" source="myPDF" image="#imageNew('',400,400,'','blue')#">
<cfpdf action="write" source="myPDF" destination="#expandPath('./cfhtmltopdf_bad.pdf')#" overwrite="yes">

Actual Result: cfdocument_good.pdf shows full watermark (good), but cfhtmltopdf_bad.pdf hides much of the watermark (bad)

Expected Result: cfhtmltopdf_bad.pdf's watermark should show as in cfdocument_good.pdf


  1. July 10, 2017 00:00:00: cfdocument_good.pdf
  2. July 10, 2017 00:00:00: cfhtmltopdf_bad.pdf


Hi, Can you please try this test again in htmltopdf with the attribute foreground="true"? That should solve your issue. Thanks, Kailash
Comment by Kailash B.
1331 | March 10, 2017 10:10:34 AM GMT
This was not a bug. Have provided the workaround to the user. If issue still persists, will reopen the bug.
Comment by Kailash B.
1332 | July 10, 2017 06:37:14 PM GMT
Hi Kailash, No, foreground="true" simply places the watermark on top of the text. That does not resolve the issue. Please compare attached cfdocument_good.pdf and cfhtmltopdf_bad.pdf. In cfhtmltopdf_bad.pdf (which I created after adding foreground="true"), see how the text in the center is blue in cfhtmltopdf_bad.pdf and black in cfdocument_good.pdf? The watermark should be visible regardless if foreground="true" or foreground="false". cfhtmltopdf isn't placing the watermark properly, when the foreground attribute is omitted. Thanks!, -Aaron
Comment by Aaron N.
1333 | July 10, 2017 07:40:14 PM GMT
Looks like cfhtmltopdf is applying a solid white background, instead of leaving the page's background transparent (which is CSS's default value for background-color).
Comment by Aaron N.
1334 | July 10, 2017 07:57:42 PM GMT
For example: If a page's background color is not defined via CSS, then you can change it via the browser's settings. cfhtmltopdf should not be forcing a white background color.
Comment by Aaron N.
1335 | July 10, 2017 08:02:49 PM GMT
Hi Adobe, What is going on here? Please read my above comments. This ticket needs re-opened/fixed. When I leave comments showing that the bug isn't fixed, I trust that it will be re-opened. Just annoying when I come back a month later and see it is still closed. Thanks!, -Aaron
Comment by Aaron N.
1336 | August 04, 2017 07:43:40 AM GMT
Reopening this bug as the workaround didn't cater to the exact problem faced.
Comment by Kailash B.
1337 | August 04, 2017 07:57:07 AM GMT
Hi Kailash, Thank you very, very much for re-opening this. It is definitely an issue I've been dealing with. So, thanks again!! -Aaron
Comment by Aaron N.
1338 | August 04, 2017 09:33:25 AM GMT