<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PDF Watermarks in CFMX 7 using iText</title>
	<atom:link href="http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext</link>
	<description></description>
	<lastBuildDate>Thu, 01 Jun 2017 18:51:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tim</title>
		<link>http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/comment-page-1#comment-444</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Fri, 29 Sep 2006 19:36:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/#comment-444</guid>
		<description>The double slashes didnt seem to have an effect for me. I still get the new PDF created, just looks the same as the original PDF. I can send you the PDF and PNG. Where should I send them? My email is on this comment.

Thanks in advance for taking a look--

Tim</description>
		<content:encoded><![CDATA[<p>The double slashes didnt seem to have an effect for me. I still get the new PDF created, just looks the same as the original PDF. I can send you the PDF and PNG. Where should I send them? My email is on this comment.</p>
<p>Thanks in advance for taking a look&#8211;</p>
<p>Tim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brian</title>
		<link>http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/comment-page-1#comment-443</link>
		<dc:creator>brian</dc:creator>
		<pubDate>Fri, 29 Sep 2006 19:16:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/#comment-443</guid>
		<description>@Tim, I just found an interesting difference between the code I posted and the way it displayed.  In my CFMX on my Windows laptop, I have escaped all of the backslashes so the paths look like this:

c:\\\\somepath\\\\file.pdf

That should be c: (two backslashes) somepath (two backslashes) file.pdf.

Can you try that?   Otherwise... maybe send me the PDF and the PNG and I can try it here to see if there is a difference?</description>
		<content:encoded><![CDATA[<p>@Tim, I just found an interesting difference between the code I posted and the way it displayed.  In my CFMX on my Windows laptop, I have escaped all of the backslashes so the paths look like this:</p>
<p>c:\\\\somepath\\\\file.pdf</p>
<p>That should be c: (two backslashes) somepath (two backslashes) file.pdf.</p>
<p>Can you try that?   Otherwise&#8230; maybe send me the PDF and the PNG and I can try it here to see if there is a difference?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/comment-page-1#comment-442</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Fri, 29 Sep 2006 19:10:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/#comment-442</guid>
		<description>Note sure why my comment above dropped the stuff in between CODE tags, but here it is again:

&lt;code&gt;
insertImageOntoPDF(&quot;c:\temp\certificate.pdf&quot;,&quot;c:\sites\www\images\mylogo.png&quot;,&quot;c:\temp\certificate_wm.pdf&quot;,100,100,1);
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Note sure why my comment above dropped the stuff in between CODE tags, but here it is again:</p>
<p><code><br />
insertImageOntoPDF("c:\temp\certificate.pdf","c:\sites\www\images\mylogo.png","c:\temp\certificate_wm.pdf",100,100,1);<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/comment-page-1#comment-441</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Fri, 29 Sep 2006 19:06:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/#comment-441</guid>
		<description>I understand what you are saying--that is what I am doing. I create a PDF using CFDocument and save it. Then I call the UDF. I actually changed the UDF so it properly var&#039;d the variables since I have it in a CFC. I see the original PDF, as well as the PDF the UDF creates (yes, a different name). Both have the exact same size, which is why I wonder if it is really working for me. When I open the new PDF, I dont see any image. In my call, I specify zindex of 1, x of 100 and y of 100. Then I tried y of -100 thinking that was the problem. 

Then I thought maybe the image path I am passing in isnt valid, but an image does exist at that location. 

My call (I renamed the UDF to insertImageOntoPDF:
&lt;code&gt;

&lt;/code&gt;

Do you see anything wrong?

Tim</description>
		<content:encoded><![CDATA[<p>I understand what you are saying&#8211;that is what I am doing. I create a PDF using CFDocument and save it. Then I call the UDF. I actually changed the UDF so it properly var&#8217;d the variables since I have it in a CFC. I see the original PDF, as well as the PDF the UDF creates (yes, a different name). Both have the exact same size, which is why I wonder if it is really working for me. When I open the new PDF, I dont see any image. In my call, I specify zindex of 1, x of 100 and y of 100. Then I tried y of -100 thinking that was the problem. </p>
<p>Then I thought maybe the image path I am passing in isnt valid, but an image does exist at that location. </p>
<p>My call (I renamed the UDF to insertImageOntoPDF:<br />
<code></p>
<p></code></p>
<p>Do you see anything wrong?</p>
<p>Tim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brian</title>
		<link>http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/comment-page-1#comment-440</link>
		<dc:creator>brian</dc:creator>
		<pubDate>Fri, 29 Sep 2006 16:39:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/#comment-440</guid>
		<description>@Tim, the zIndex value is either 0 (under) or 1 (over).  Passing in 100 just behaves like 1 in my example.  I do the same thing as you, it requires three steps:

&lt;ol&gt;
&lt;li&gt;Use CFDOCUMENT and write the results to disk&lt;/li&gt;
&lt;li&gt;Use the UDF above to insert the watermark&lt;/li&gt;
&lt;li&gt;Retrieve/CFCONTENT the new PDF back to the user&lt;/li&gt;
&lt;/ol&gt;

I don&#039;t believe you can use the same filename for in and out, if that&#039;s what you&#039;re doing, due to file lock issues.

Also, keep in mind that the x/y are specified from the lower left hand corner so it&#039;s possible, depending on what values you use, that your watermark might be off the screen.</description>
		<content:encoded><![CDATA[<p>@Tim, the zIndex value is either 0 (under) or 1 (over).  Passing in 100 just behaves like 1 in my example.  I do the same thing as you, it requires three steps:</p>
<ol>
<li>Use CFDOCUMENT and write the results to disk</li>
<li>Use the UDF above to insert the watermark</li>
<li>Retrieve/CFCONTENT the new PDF back to the user</li>
</ol>
<p>I don&#8217;t believe you can use the same filename for in and out, if that&#8217;s what you&#8217;re doing, due to file lock issues.</p>
<p>Also, keep in mind that the x/y are specified from the lower left hand corner so it&#8217;s possible, depending on what values you use, that your watermark might be off the screen.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/comment-page-1#comment-439</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Fri, 29 Sep 2006 16:29:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/#comment-439</guid>
		<description>I found your code trying to add a watermark to a CFDOCUMENT-generated PDF. When I try it out, it does indeed create a new PDF, but I cant seem to get the watermark to display. The size of the old and new PDFs are the same, which makes me wonder if it is really working. I am calling insertWatermarkPDF passing in 100 as the zindex trying to force it to the top (to see if it shows up) but I still dont see it. 

The HTML in my document doesnt have any background color specified. Where am I going wrong?

Tim</description>
		<content:encoded><![CDATA[<p>I found your code trying to add a watermark to a CFDOCUMENT-generated PDF. When I try it out, it does indeed create a new PDF, but I cant seem to get the watermark to display. The size of the old and new PDFs are the same, which makes me wonder if it is really working. I am calling insertWatermarkPDF passing in 100 as the zindex trying to force it to the top (to see if it shows up) but I still dont see it. </p>
<p>The HTML in my document doesnt have any background color specified. Where am I going wrong?</p>
<p>Tim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amit</title>
		<link>http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/comment-page-1#comment-360</link>
		<dc:creator>amit</dc:creator>
		<pubDate>Mon, 18 Sep 2006 08:51:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/#comment-360</guid>
		<description>bgbb</description>
		<content:encoded><![CDATA[<p>bgbb</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brian</title>
		<link>http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/comment-page-1#comment-269</link>
		<dc:creator>brian</dc:creator>
		<pubDate>Thu, 07 Sep 2006 17:32:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/#comment-269</guid>
		<description>A couple of updates - to make this work in CFDOCUMENT, you must use triple slashes instead of double, e.g.:

&lt;code&gt;&lt;img src=&quot;file:///web/dir/gfx/file.jpg&quot; /&gt;
&lt;img src=&quot;file:///c:\some\other\path\gfx\file.jpg&quot; /&gt;&lt;/code&gt;

For me, I develop on Windows and deploy to Linux so paths need to change but the file:/// protocol can&#039;t handle relative paths.  That&#039;s where expandPath() comes in handy:

&lt;code&gt;
&lt;img src=&quot;file:///#expandPath(&quot;../../gfx/file.jpg&quot;)#&quot; /&gt;
&lt;/code&gt;

Now we can specify the path to the background image in my report relatively and it will be correct on both Windows and Unix without any code changes.</description>
		<content:encoded><![CDATA[<p>A couple of updates &#8211; to make this work in CFDOCUMENT, you must use triple slashes instead of double, e.g.:</p>
<p><code>&lt;img src="file:///web/dir/gfx/file.jpg" /&gt;<br />
&lt;img src="file:///c:\some\other\path\gfx\file.jpg" /&gt;</code></p>
<p>For me, I develop on Windows and deploy to Linux so paths need to change but the file:/// protocol can&#8217;t handle relative paths.  That&#8217;s where expandPath() comes in handy:</p>
<p><code><br />
&lt;img src="file:///#expandPath("../../gfx/file.jpg")#" /&gt;<br />
</code></p>
<p>Now we can specify the path to the background image in my report relatively and it will be correct on both Windows and Unix without any code changes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brian</title>
		<link>http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/comment-page-1#comment-231</link>
		<dc:creator>brian</dc:creator>
		<pubDate>Tue, 29 Aug 2006 16:59:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/#comment-231</guid>
		<description>Dan, you&#039;re 100% right.  I just tried this on a 110 page report and processing time was cut by about 10s (out of 140) but the load on the machine was 50% of what it was when there were 110 HTTP requests.

In a few limited tests using the watermark UDF (and not including the image in the original report), I cut processing time from about 140s to 55s.  The constant resampling of the PNG I&#039;m using is a real killer and this single watermark step seems to get around that.

I think I&#039;ll write another post once I solve this and have it back in production.</description>
		<content:encoded><![CDATA[<p>Dan, you&#8217;re 100% right.  I just tried this on a 110 page report and processing time was cut by about 10s (out of 140) but the load on the machine was 50% of what it was when there were 110 HTTP requests.</p>
<p>In a few limited tests using the watermark UDF (and not including the image in the original report), I cut processing time from about 140s to 55s.  The constant resampling of the PNG I&#8217;m using is a real killer and this single watermark step seems to get around that.</p>
<p>I think I&#8217;ll write another post once I solve this and have it back in production.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan G. Switzer, II</title>
		<link>http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/comment-page-1#comment-229</link>
		<dc:creator>Dan G. Switzer, II</dc:creator>
		<pubDate>Tue, 29 Aug 2006 14:30:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.ghidinelli.com/2006/08/28/pdf-watermarks-in-cfmx-7-using-itext/#comment-229</guid>
		<description>Brian,

I remember reading somewhere that you can have it access local files, and I believe that done by using the &quot;file://&quot; protocol declaration.

-Dan</description>
		<content:encoded><![CDATA[<p>Brian,</p>
<p>I remember reading somewhere that you can have it access local files, and I believe that done by using the &#8220;file://&#8221; protocol declaration.</p>
<p>-Dan</p>
]]></content:encoded>
	</item>
</channel>
</rss>
