I am trying to add a watermark to a PDF with a PNG file that has a transparent background.
Every time I create the watermark it comes out as black background. When it comes to using a PDF as the watermark I get a white background of the watermark. Also, the PDF watermark when turned into thumbnails becomes grayscale.
What is causing this? And what can I do to allow transparency?
I am using ColdFusion 11.
Here is the code for both:
Watermark by PNG:
<cfpdf
action="addwatermark"
foreground="true"
opacity="6"
source="PDFS/blankpage.pdf"
destination="PDFS/watermarked/blankpage.pdf"
image="PDFS/samplemusicpage2.png"
overwrite="yes"
>
<cfpdf
action="thumbnail"
resolution="low"
source="PDFS/watermarked/blankpage.pdf"
destination="PDFS/_thumbnails"
imageprefix="blankpage"
overwrite="yes"
scale="40"
>
Here is the code for using a PDF as a watermark:
<cfpdf
action="addwatermark"
foreground="true"
opacity="6"
source="PDFS/blankpage.pdf"
destination="PDFS/watermarked/blankpage.pdf"
copyfrom="PDFS/samplemusicpage.pdf"
overwrite="yes"
>
<cfpdf
action="thumbnail"
resolution="low"
source="PDFS/watermarked/blankpage.pdf"
destination="PDFS/_thumbnails"
imageprefix="blankpage"
overwrite="yes"
scale="40"
>
Here are the images that I am working with in this example:
Here is the PNG File:
Here is the Read PDF File: