<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Karl Heinz Kremer&#039;s Ramblings &#187; PDF</title>
	<atom:link href="http://www.khk.net/wordpress/tag/pdf/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.khk.net/wordpress</link>
	<description>Stuff, stuff and more stuff</description>
	<lastBuildDate>Sun, 25 Sep 2011 18:38:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>The X Files: Acrobat Edition</title>
		<link>http://www.khk.net/wordpress/2010/10/18/the-x-files-acrobat-edition/</link>
		<comments>http://www.khk.net/wordpress/2010/10/18/the-x-files-acrobat-edition/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 13:47:58 +0000</pubDate>
		<dc:creator>khk</dc:creator>
				<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Acrobat X]]></category>
		<category><![CDATA[Adobe Acrobat]]></category>
		<category><![CDATA[Plug-ins]]></category>
		<category><![CDATA[Portfolios]]></category>

		<guid isPermaLink="false">http://www.khk.net/wordpress/?p=654</guid>
		<description><![CDATA[[This blog post appeared first on my professional site at KHKonsulting.com] A New Version of Acrobat Have you noticed that it&#8217;s been more than two years since the release of Adobe Acrobat 9? Usually, Adobe releases a new version every 18 to 24 months, so a new version has been overdue. Today they let the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2010%2F10%2F18%2Fthe-x-files-acrobat-edition%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2010%2F10%2F18%2Fthe-x-files-acrobat-edition%2F&amp;source=khkremer&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>[This blog post appeared first <a href="http://pdfakrobat.com/2010/10/the-x-files-acrobat-edition/">on my professional site at KHKonsulting.com</a>]</p>
<h1>A New Version of Acrobat</h1>
<p>Have you noticed that it&#8217;s been more than two years since the release of Adobe Acrobat 9? Usually, Adobe releases a new version every 18 to 24 months, so a new version has been overdue. Today they let the cat out of the bag, and announced Acrobat X. There is already a lot of information available about what it is, and to some extend also how it is different from previous releases.</p>
<p>Take a look at the <a href="http://www.businesswire.com/news/home/20101017005042/en/Adobe-Unveils-Acrobat-Solutions">press release</a> to get a quick overview of what&#8217;s new, or browse over two Adobe TV and watch the <a href="http://tv.adobe.com/show/acrobat-x-tips-tricks/">Acrobat X Tips &amp; Tricks episodes</a>. There is a lot of information available to give you a pretty good idea about what&#8217;s new and different.</p>
<h1>User Interface</h1>
<p>If you&#8217;ve attended one of my training seminars about Acrobat, you know that one of my pet peeves has always been that Adobe added to the UI clutter with every new release of Acrobat. Yes, every now and then they tried to clean it up, but at the end, it just caused more and more confusion among both novice, but also experienced users.</p>
<p>This time around, they took a completely new approach and ripped out the old menu and toolbar system and replaced it with something completely new. I am still trying to wrap my head around where things are now located, but in general, the new layout is a good idea. It will be much easier for the novice user to explore the UI and find new features that they might want to use, but for users who&#8217;ve worked with Acrobat since the early days of the product (in my case since Acrobat 3), it will take a while until we find all the tools that we&#8217;ve known by heart. But in the long run, I think it&#8217;s a good move, and I am more than willing to go through the learning process to get to know the new UI.</p>
<h1>Plug-Ins</h1>
<p>Every time Acrobat changed it&#8217;s UI in the past, there were major ripple effects through the plug-in community &#8211; things just did not work anymore, or not quite right, and we plug-in developers had some work to do to modify our plug-ins so that users could rely on these 3rd party components again.</p>
<p>If you have not yet tested your own plug-ins on an Acrobat X pre-release, don&#8217;t waste any time. Chances are that your code needs to be modified to work seamlessly with Acrobat X. If you need help with that, get in touch with me, I am a seasoned plug-in developer and I can certainly assist you with those efforts.</p>
<h1>Favorite Feature</h1>
<p>I don&#8217;t have a favorite new feature, but I have two favorite updated features:</p>
<p>Number one is what Adobe has done with Portfolios. In my opinion, Portfolios were one of the most underused features in Acrobat 9, and I hope that the updates to the Portfolio system will help to give that feature the necessary exposure so that we see more and more of these compound documents.</p>
<p>My number two updated feature is the much improved export function to other file formats. Whenever I had to create a MS Word document out of a PDF file in the past, it was always a hit-or-miss job &#8211; some documents worked reasonably well, others didn&#8217;t work at all. But regardless of how well it worked, there was always some editing necessary after the export to make the Word file look like the original PDF document. With the new export in Acrobat X, I get Word documents that look exactly like the PDF file. Great job, Adobe!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.khk.net/wordpress/2010/10/18/the-x-files-acrobat-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Way to Learn Acrobat Scripting</title>
		<link>http://www.khk.net/wordpress/2010/08/18/best-way-to-learn-acrobat-scripting/</link>
		<comments>http://www.khk.net/wordpress/2010/08/18/best-way-to-learn-acrobat-scripting/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 15:25:04 +0000</pubDate>
		<dc:creator>khk</dc:creator>
				<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[adobe pdf]]></category>
		<category><![CDATA[pdfscripting.com]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://www.khk.net/wordpress/?p=638</guid>
		<description><![CDATA[Every now and then I come across the question &#8220;What is the best way to learn scripting for Adobe Acrobat? Are there any books or other resources averrable?&#8221;. After doing some research, I think I finally found the best resource for beginners and for seasoned Acrobat JavaScript programmers that need a quick tip or a [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2010%2F08%2F18%2Fbest-way-to-learn-acrobat-scripting%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2010%2F08%2F18%2Fbest-way-to-learn-acrobat-scripting%2F&amp;source=khkremer&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Every now and then I come across the question &#8220;What is the best way to learn scripting for Adobe Acrobat? Are there any books or other resources averrable?&#8221;. After doing some research, I think I finally found the best resource for beginners and for seasoned Acrobat JavaScript programmers that need a quick tip or a recipe to copy&amp;paste into a project:</p>
<p><a href="http://www.pdfscripting.com/">PDFScripting.com</a></p>
<p>The site offers content for both paying members and the general public. If you are new to scripting, and you don&#8217;t want to spend the money for a membership (yet), take a look at the free content at ﻿<a href="http://www.pdfscripting.com/public/department40.cfm">http://www.pdfscripting.com/public/department40.cfm</a> &#8211; it walks you through creating your first AcroForm script, but also offers a number of videos that explain more complicated concepts. For the really good stuff however, you have to pay.</p>
<p>Ever wondered how to hook up a PDF form with an Excel spread sheet? Wonder no more! The article series &#8220;<a href="http://www.pdfscripting.com/members/department48.cfm">Acrobat, PDF and Excel Spreadsheets</a>&#8221; teaches you more than you ever wanted to know about that subject.</p>
<p>You may remember my post about <a href="http://www.khk.net/wordpress/2009/05/31/more-interactive-dynamic-stamps-in-seven-easy-steps/">dynamic stamps in Acrobat</a>. The PDFScripting.com site has a lot more information about dynamic forms and provides a number of <a href="http://www.pdfscripting.com/public/images/Video/PDFStampsGoneWild.cfm">very interesting samples</a> (video link).</p>
<p>There is a ton more information available for both AcroForm and LiveCycle Designer scripting. This information comes in form of articles, videos, a copy&amp;paste script library and downloadable sample files that illustrate a subject.</p>
<p>To get familiar with the web site, Thom Parker has recorded a video tour that helps to navigate the site, but also gives a pretty good overview about what&#8217;s available both for free and for paying members at &#8220;﻿<a href="http://www.pdfscripting.com/public/images/video/PDFSTour.cfm">Take a tour of the PDFScripting.com website!</a>&#8221; (video link).</p>
<p>So, no need to ask me for a good Acrobat scripting resource anymore, just go to PDFScripting.com and sign up for a year &#8211; it&#8217;s well worth the membership fee (and as Thom says in his tour video, no surprise at the end of the year, the membership does not automatically renew).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.khk.net/wordpress/2010/08/18/best-way-to-learn-acrobat-scripting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Even More PDF Tools</title>
		<link>http://www.khk.net/wordpress/2010/03/08/even-more-pdf-tools/</link>
		<comments>http://www.khk.net/wordpress/2010/03/08/even-more-pdf-tools/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 15:40:36 +0000</pubDate>
		<dc:creator>khk</dc:creator>
				<category><![CDATA[PDF]]></category>
		<category><![CDATA[ABCpdf]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[PD4ML]]></category>

		<guid isPermaLink="false">http://www.khk.net/wordpress/?p=615</guid>
		<description><![CDATA[I wrote about my favorite tools around the PDF file format in the past. It&#8217;s time to add a couple more items to the list. Over the last few months I&#8217;ve been working with two more products that I can recommend wholeheartedly: PD4ML There are a number of HTML to PDF converters available, but if [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2010%2F03%2F08%2Feven-more-pdf-tools%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2010%2F03%2F08%2Feven-more-pdf-tools%2F&amp;source=khkremer&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I wrote about my favorite tools around the PDF file format in the <a href="http://www.khk.net/wordpress/2009/03/23/more-pdf-tools/">past</a>. It&#8217;s time to add a couple more items to the list. </p>
<p>Over the last few months I&#8217;ve been working with two more products that I can recommend wholeheartedly: </p>
<h1><a href="http://pd4ml.com/">PD4ML</a></h1>
<p>There are a number of HTML to PDF converters available, but if your HTML is anything but basic, chances are that every single one of them does not render one or more features in your documents accurately enough&#8230; After looking at a number of them, I came across <a href="http://pd4ml.com/">PD4ML</a> and it looked good right from the first document I fed to it. There were a few problems, but PD4ML&#8217;s support was great in helping me out, even though I only had an evaluation license. At the end, all known problems were taken care of in the next formal release I received. </p>
<p>PD4ML is available as either a Java library or a .NET component. The Java JAR can actually be used as an application to get a good idea about how the generated PDF would look. </p>
<p>The library is available in a standard and a Pro version &#8211; there are a number of differences, which are listed in the &#8220;<a href="http://pd4ml.com/products.htm">Products Comparison Chart</a>&#8221; &#8211; the most important difference for me is that the Pro version supports font embedding.</p>
<h1><a href="http://www.websupergoo.com/products.htm#pd">ABCpdf</a></h1>
<p>As I&#8217;ve mentioned before, I&#8217;m a fan of iText (mainly because it&#8217;s Java based, and I can use it on any system that has a Java VM), but I was looking for a library that had rasterization capabilities. I found <a href="http://www.websupergoo.com/products.htm#pd">ABCpdf</a>, and it&#8217;s a great tool that does everything I want a PDF library to do (as long as I can use .NET, ASP or VB). It can read PDF documents, modify them and write them out again, create PDF documents from scratch, convert other formats to PDF (e.g. HTML &#8211; even with FLash support, EPS, XPS, SVG). It can even use OpenOffice.org to import MS Office documents. One of the more important features for me is the ability to access low level PDF objects &#8211; either to get more information about the PDF file and it&#8217;s objects, or to make changes that are not available via other high level calls. ABCpdf also allows me to do that. </p>
<p>ABCpdf comes in two versions, Standard and Professional. The &#8220;<a href="http://www.websupergoo.com/abcpdf-8.htm">PDF Component Comparison Chart</a>&#8221; on the web site lists the differences between the two versions. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.khk.net/wordpress/2010/03/08/even-more-pdf-tools/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nuance PDF Reader</title>
		<link>http://www.khk.net/wordpress/2010/02/23/nuance-pdf-reader/</link>
		<comments>http://www.khk.net/wordpress/2010/02/23/nuance-pdf-reader/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 16:19:24 +0000</pubDate>
		<dc:creator>khk</dc:creator>
				<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[adobe pdf]]></category>
		<category><![CDATA[adobe reader]]></category>
		<category><![CDATA[nuance]]></category>
		<category><![CDATA[nuance pdf reader]]></category>

		<guid isPermaLink="false">http://www.khk.net/wordpress/?p=612</guid>
		<description><![CDATA[Nuance (the people behind OmniPage and Dragon Naturally Speaking and a bunch of other things) release a competitor to the free Adobe Reader &#8211; the free Nuance PDF Reader (http://www.nuance.com/imaging/products/pdf-reader.asp). The feature list looks very promising: Fill and save PDF forms Annotate PDFs Convert PDF files to Word Excel or RTF Can disable JavaScript 100% [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2010%2F02%2F23%2Fnuance-pdf-reader%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2010%2F02%2F23%2Fnuance-pdf-reader%2F&amp;source=khkremer&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Nuance (the people behind OmniPage and Dragon Naturally Speaking and a bunch of other things) release a competitor to the free Adobe Reader &#8211; the free Nuance PDF Reader (http://www.nuance.com/imaging/products/pdf-reader.asp). The feature list looks very promising:</p>
<ul>
<li>Fill <em>and</em> save PDF forms</li>
<li>Annotate PDFs</li>
<li>Convert PDF files to Word Excel or RTF</li>
<li>Can disable JavaScript</li>
<li>100% compatibility with Adobe Acrobat (we have to wait to see how compatible it really is)</li>
<li>Supports PDF Portfolios</li>
</ul>
<p>Now to the things that it does not do: </p>
<ul>
<li>No support for Mac OS X or Linux</li>
<li>No participation in online document reviews</li>
</ul>
<p>I&#8217;ve not spent enough time with it yet to offer a detailed review, but it&#8217;s certainly a good alternative to the Adobe Reader. Competition is a good thing, maybe Adobe will take a few cues from Nuance for their next release of Reader. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.khk.net/wordpress/2010/02/23/nuance-pdf-reader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AnyBizSoftware PDF To PowerPoint Converter &#8211; Free Today &#8211; Expired!</title>
		<link>http://www.khk.net/wordpress/2009/10/19/anybizsoftware-pdf-to-powerpoint-converter-free-today/</link>
		<comments>http://www.khk.net/wordpress/2009/10/19/anybizsoftware-pdf-to-powerpoint-converter-free-today/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 17:01:06 +0000</pubDate>
		<dc:creator>khk</dc:creator>
				<category><![CDATA[PDF]]></category>
		<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[Conversion]]></category>
		<category><![CDATA[powerpoint]]></category>

		<guid isPermaLink="false">http://khk.net/wordpress/?p=601</guid>
		<description><![CDATA[Converting PDF documents to PowerPoint presentations is probably not something you need every day. I think I needed it once when the original PowerPoint file of a presentation I needed to give was no longer available, but the PDF file created from that presentation was. I did not have access to AnyBizSoft PDF to PowerPoint [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2009%2F10%2F19%2Fanybizsoftware-pdf-to-powerpoint-converter-free-today%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2009%2F10%2F19%2Fanybizsoftware-pdf-to-powerpoint-converter-free-today%2F&amp;source=khkremer&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Converting PDF documents to PowerPoint presentations is probably not something you need every day. I think I needed it once when the original PowerPoint file of a presentation I needed to give was no longer available, but the PDF file created from that presentation was. I did not have access to <a href="http://www.anypdftools.com/pdf-to-powerpoint.html">AnyBizSoft PDF to PowerPoint Converter</a> back then, so a lot of copy&amp;pasting took place.</p>
<p>Today you can download a free version of that software from <a href="http://www.giveawayoftheday.com/">GiveAwayOfTheDay.com</a>. I&#8217;ve played around with the application a little, and it really does what it promises: PDF elements get converted to editable PowerPoint page elements.</p>
<p>Here is a list of the key features of AnyBizSoft <a href="http://www.anypdftools.com/pdf-to-powerpoint.html">PDF to PowerPoint Converter</a>:</p>
<ol>
<li>Convert PDF files to PPT presentations quickly and accurately</li>
<li>Retain all the layouts, images, and hyperlinks in the output documents</li>
<li>Produce an editable and dynamic PPT presentation with a few clicks</li>
<li>Convert up to 200 PDF files at the same time</li>
<li>Support Office 2010 and Windows 7</li>
</ol>
<p>I cannot vouch for the last two list items, but I know that it worked for up to seven files, and that all the other claims are true. If you think you&#8217;ll ever need to convert a PDF file to PowerPoint, give AnyBizSoft PDF Converter a try &#8211; and if you do it (download and activate) today from <a href="http://www.giveawayoftheday.com/">GiveAwayOfTheDay.com</a> it will not even cost you a dime.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.khk.net/wordpress/2009/10/19/anybizsoftware-pdf-to-powerpoint-converter-free-today/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Teaching Adobe Reader a Few New Tricks</title>
		<link>http://www.khk.net/wordpress/2009/06/20/adobe-reader-enable-rights/</link>
		<comments>http://www.khk.net/wordpress/2009/06/20/adobe-reader-enable-rights/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 13:00:10 +0000</pubDate>
		<dc:creator>khk</dc:creator>
				<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[acrobat.com]]></category>
		<category><![CDATA[Adobe Acrobat]]></category>
		<category><![CDATA[adobe reader]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[rights enabled]]></category>

		<guid isPermaLink="false">http://khk.net/wordpress/?p=455</guid>
		<description><![CDATA[Have you ever tried to fill a PDF form in Adobe Reader and to then save that filed document to your hard disk? Did it work? Chances are that it did not. Have you ever thought about why the Adobe Reader is called &#8220;Reader&#8221;? The answer is pretty obvious, it&#8217;s because it is only reading [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2009%2F06%2F20%2Fadobe-reader-enable-rights%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2009%2F06%2F20%2Fadobe-reader-enable-rights%2F&amp;source=khkremer&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Have you ever tried to fill a PDF form in Adobe Reader and to then save that filed document to your hard disk? Did it work? Chances are that it did not.</p>
<p>Have you ever thought about why the Adobe Reader is called &#8220;Reader&#8221;? The answer is pretty obvious, it&#8217;s because it is only reading and displaying (and printing) PDF files &#8211; that is, it is not writing them. That also includes that it will not save a modified document. You would need the &#8220;Adobe Writer&#8221; &#8211; or &#8220;Adobe Acrobat&#8221; as it is called for that.</p>
<p>But regardless of the name, we can &#8220;trick&#8221; the Reader into writing a filled form to the disk. OK, it&#8217;s not really a trick, Adobe did implement this feature, so it&#8217;s official, and we are not hacking or cracking anything.</p>
<p><span id="more-455"></span>Adobe has a server based solution that does allow you to create PDF files that are &#8220;reader enabled&#8221;: <a href="http://www.adobe.com/products/livecycle/readerextensions/">Adobe LiveCycle Reader Extensions ES</a><br />
That technology allows you to &#8220;Fill in, sign, comment on, or save Adobe PDF files using only Adobe Reader&#8221;. Sounds like the perfect solution. Let me tell you a little secret: Whenever you hear the terms &#8220;Adobe&#8221; and &#8220;Server&#8221; in the same sentence, it usually means expensive&#8230;</p>
<p>Here is another secret &#8211; not really, it&#8217;s documented in a lot of places, but Acrobat users often don&#8217;t know about it: You can use Adobe Acrobat to &#8220;reader enable&#8221; PDF files as well. However, when you agreed to the EULA during the installation of Acrobat, you also agreed to using this technology only for a form with a maximum of 500 copies. The reason for that is of course, that Adobe still wants to sell the server based solution for document workflows that involve more copies.</p>
<p>So, let&#8217;s take a look at the EULA and find out exactly what we agreed to:</p>
<p>&#8220;15.12.3 For any unique Extended Document, you may only either (a) Deploy such Extended Document to an unlimited number of unique recipients but shall not extract information from more than five hundred (500) unique instances of such Extended Document or any hardcopy representation of such Extended Document containing filled form fields; or (b) Deploy such Extended Document to no more than five hundred (500) unique recipients without limits on the number of times you may extract information from such Extended Document returned to you filled-in by such Recipients. Notwithstanding anything herein to the contrary, obtaining additional licenses to use Acrobat Pro or Acrobat Pro Extended shall not increase the foregoing limits (that is, the foregoing limits are the aggregate total limits regardless of how many additional licenses to use Acrobat Pro or Acrobat Pro Extended you may have obtained). &#8220;</p>
<p>You may want to review that with your lawyer, I&#8217;m just an engineer, and in no position to give legal advice. I&#8217;ll however let you know what my interpretation of that section is: We have two options, we can either distribute our enabled form to an unlimited number of users, but we can only process a maximum of 500 unique responses. So, if we distribute our form to 1000 recipients, and we get 500 copies back, we are good. If we receive 501 replies, we can process the first 500, but the last one we cannot even look at. It also does not matter if we receive the filled out forms via a printed sheet of paper, or electronically. The second option is a bit more complicated, and you really should talk to your lawyer about that. To me it seems that you can distribute 500 copies of your form to 500 unique recipients, and they can then submit that form as often as they want. This could e.g. be a form that needs to be submitted once a week. Every one of your (up to 500) users/customers/clients has a copy of that form, and then once a week they fill in new data and submit the form.</p>
<p>Now we know what we can do with these forms, but we still don&#8217;t know how to use Acrobat for that. Let me show you a few screen shots.</p>
<p>Let&#8217;s assume you have a PDF form that you want to distribute, open that file in Acrobat and select &#8220;Forms&gt;Distribute Form&#8221;:</p>
<div style="text-align:center;"><img src="http://khk.net/wordpress/wp-content/uploads/2009/06/distributeformmenu.png" border="0" alt="DistributeFormMenu.png" width="288" height="246" /></div>
<p>This will bring up the dialog that we need to work with for the next few steps:</p>
<div style="text-align:center;"><img src="http://khk.net/wordpress/wp-content/uploads/2009/06/distributeformdialog.png" border="0" alt="DistributeFormDialog.png" width="400"  /></div>
<p>As you can see, I&#8217;ve selected to manually collect the responses in my email. That&#8217;s the most straight forward option and does not require any other configuration. The information presented below the selection does give you a pretty good idea about what it is. For now, let&#8217;s stick with the email option, but please, play around with the other options and let me know if you run into problems.</p>
<p>In the next step we specify the target location on our local hard disk for the protected (and now reader-enabled) copy of our file:</p>
<div style="text-align:center;"><img src="http://khk.net/wordpress/wp-content/uploads/2009/06/distributeformdialogfile.png" border="0" alt="DistributeFormDialogFile.png" width="400"  /></div>
<p>Now we need to add some information about us, the author:</p>
<div style="text-align:center;"><img src="http://khk.net/wordpress/wp-content/uploads/2009/06/distributeformdialoginfo.png" border="0" alt="DistributeFormDialogInfo.png" width="400"  /></div>
<p>We get one more chance to revise our decision about the delivery method, so if you want to take a different approach, and use <a title="Adobe's online Acrobat.com service" href="http://acrobat.com">Acrobat.com</a> to collect the returned forms, here is your last chance. I will stick with the email option:</p>
<div style="text-align:center;"><img src="http://khk.net/wordpress/wp-content/uploads/2009/06/distributeformdialogdelivery.png" border="0" alt="DistributeFormDialogDelivery.png" width="400"  /></div>
<p>Once we click on the &#8220;Finish&#8221; button, the form will be prepared and saved, and Acrobat will display the Tracker interface. That dialog can also be opened via the &#8220;Forms&gt;Track Forms&#8221; menu item (see the menu screen shot from above). I will talk more about that in a future post.</p>
<div style="text-align:center;"><img src="http://khk.net/wordpress/wp-content/uploads/2009/06/distributeformtracker.png" border="0" alt="DistributeFormTracker.png" width="400"  /></div>
<p>All you have to do now is to distribute your form. In a future post I will talk about how to process the returned data.</p>
<p>If allowing your users to locally save a form, you are done. They now can partially fill a form, save it, open it at a later time and continue with the form.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.khk.net/wordpress/2009/06/20/adobe-reader-enable-rights/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Acrobat/PDF Tip: Converting a Document to PDF</title>
		<link>http://www.khk.net/wordpress/2009/06/09/acrobat-pdf-converting-document-google-docs/</link>
		<comments>http://www.khk.net/wordpress/2009/06/09/acrobat-pdf-converting-document-google-docs/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 01:02:53 +0000</pubDate>
		<dc:creator>khk</dc:creator>
				<category><![CDATA[PDF]]></category>
		<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[google apps]]></category>
		<category><![CDATA[google docs]]></category>
		<category><![CDATA[powerpoint]]></category>
		<category><![CDATA[primopdf]]></category>

		<guid isPermaLink="false">http://khk.net/wordpress/?p=550</guid>
		<description><![CDATA[Have you ever needed a PDF version of a document, but you either did not have the correct source application (e.g. MS Word, PowerPoint, &#8230;), or you didn&#8217;t have access to a PDF converter (even though the free PrimoPDF is just a mouse click away). Or, did somebody email you a PowerPoint presentation, but you [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2009%2F06%2F09%2Facrobat-pdf-converting-document-google-docs%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2009%2F06%2F09%2Facrobat-pdf-converting-document-google-docs%2F&amp;source=khkremer&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Have you ever needed a PDF version of a document, but you either did not have the correct source application (e.g. MS Word, PowerPoint, &#8230;), or you didn&#8217;t have access to a PDF converter (even though the <a href="http://khk.net/wordpress/2009/03/03/the-best-free-pdf-creator/">free PrimoPDF</a> is just a mouse click away). Or, did somebody email you a PowerPoint presentation, but you don&#8217;t have access to PowerPoint? But you do have access to a PDF viewer (either the free Adobe Reader, or Preview.app on the Mac). How would you convert a Word, Excel or PowerPoint document to PDF?</p>
<p><a href="http://docs.google.com">Google Docs to the rescue</a>! Did you know that Google Docs can import a number of standard file formats into it&#8217;s word processor, spread sheet and presentation applications? Once you have imported your document, you just select to print&#8230; That&#8217;s it. Oh, I probably should explain that Google converts your document to PDF for printing purposes and then downloads that PDF to your computer. So just open that PDF file, and there is your document, now converted to a portable, easy to open file. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.khk.net/wordpress/2009/06/09/acrobat-pdf-converting-document-google-docs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>More Interactive Dynamic Stamps in Seven Easy Steps</title>
		<link>http://www.khk.net/wordpress/2009/05/31/more-interactive-dynamic-stamps-in-seven-easy-steps/</link>
		<comments>http://www.khk.net/wordpress/2009/05/31/more-interactive-dynamic-stamps-in-seven-easy-steps/#comments</comments>
		<pubDate>Sun, 31 May 2009 23:47:23 +0000</pubDate>
		<dc:creator>khk</dc:creator>
				<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[dynamic stamp]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://khk.net/wordpress/?p=466</guid>
		<description><![CDATA[A while ago I tried to create an interactive dynamic stamp in Acrobat. These are dynamic stamps (like for example a stamp that automatically puts the current date into a field that is part of the stamp), but with a UI component that pops up and queries the user for some information that also gets [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2009%2F05%2F31%2Fmore-interactive-dynamic-stamps-in-seven-easy-steps%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2009%2F05%2F31%2Fmore-interactive-dynamic-stamps-in-seven-easy-steps%2F&amp;source=khkremer&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>A while ago I tried to create an interactive dynamic stamp in Acrobat. These are dynamic stamps (like for example a stamp that automatically puts the current date into a field that is part of the stamp), but with a UI component that pops up and queries the user for some information that also gets embedded as part of the stamp (e.g. a phone number or a name).</p>
<p>I was not very successful. I could not figure out how to make sure that the UI only gets triggered when the stamp gets applied, and not when the stamp file gets loaded by Acrobat.</p>
<p><span id="more-466"></span></p>
<p>Then I came across an article by Rick Borstein titled &#8220;<a href="http://blogs.adobe.com/acrolaw/2009/05/add_dynamic_exhibit_stamps_in_ac.html">Add Dynamic Exhibit Stamps in Acrobat using a free stamp set</a>&#8221; on the <a href="http://blogs.adobe.com/acrolaw/">Acrobat for Legal Professionals blog</a>. It had all the parts that are required, it even came with a couple of sample stamps. It also gave credit to the original source for that information: Acrobat JavaScript Guru <a href="http://www.acrobatusers.com/tutorials/2007/02/dynamic_stamp_secrets">Thom Parker</a></p>
<p>Thom provides all the theory behind why this works &#8211; very interesting to read if you are into that kind of stuff. It&#8217;s however not required to understand all that if you just want to use these stamps. You can just download Rick&#8217;s sample files and modify them until they fit your needs.</p>
<p>However if you want a dynamic stamp that shows more than just one line of interactively provided information, the examples do not work. They only provide one one-line input field and then put that one line on the PDF document. I wanted a stamp that could actually take several lines of user input and use that in a stamp. I had some work to do&#8230;</p>
<p>Acrobat&#8217;s JavaScript does allow to create custom user interfaces by creating a data structure and then calling executeDialog() with that data as parameter. Instead of a simple call to app.response() like in Thom&#8217;s and Rick&#8217;s examples, I needed to create a more complicated UI structure and embed that in the examples.</p>
<p>Here is the original code from the example:<br />
<pre><pre>var cAsk = &quot;Enter Exhibit Number&quot; ;
var cTitle = &quot;Exhibit Number:&nbsp;&nbsp;&quot;;
if(event.source.forReal &amp;amp;&amp;amp; (event.source.stampName == &quot;#UdzyXagRctZoS5p43TZ43C&quot;))
{
&nbsp;&nbsp;var cMsg = app.response(cAsk, cTitle);
&nbsp;&nbsp;event.value = cMsg;
&nbsp;&nbsp;event.source.source.info.exhibit = cMsg;
}</pre></pre><br />
I&#8217;ve replaced that code with the following:<br />
<pre><pre>var dialog = {
&nbsp;&nbsp;retString: &quot;&quot;,

&nbsp;&nbsp;commit:function (dialog) { // called when OK pressed
&nbsp;&nbsp;&nbsp;&nbsp;var results = dialog.store();
&nbsp;&nbsp;&nbsp;&nbsp;this.retString = results[&quot;stxt&quot;];
&nbsp;&nbsp;},

&nbsp;&nbsp;description:
&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;name: &quot;Stamp Information&quot;,&nbsp;&nbsp;&nbsp;&nbsp;// Dialog box title
&nbsp;&nbsp;&nbsp;&nbsp;elements:
&nbsp;&nbsp;&nbsp;&nbsp;[
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: &quot;view&quot;,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elements:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;name: &quot;Enter Multi-line Information: &quot;,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: &quot;static_text&quot;,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;item_id: &quot;stxt&quot;,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: &quot;edit_text&quot;,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;multiline: true,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width: 300,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: 80
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type: &quot;ok_cancel&quot;,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ok_name: &quot;Ok&quot;,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cancel_name: &quot;Cancel&quot;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
&nbsp;&nbsp;&nbsp;&nbsp;]
&nbsp;&nbsp;}
}; 

if(event.source.forReal &amp;amp;&amp;amp; (event.source.stampName == &quot;#UdzyXagRctZoS5p43TZ43C&quot;))
{
&nbsp;&nbsp;if (&quot;ok&quot; == app.execDialog(dialog))
&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;var cMsg = dialog.retString;
&nbsp;&nbsp;&nbsp;&nbsp;event.value = cMsg;
&nbsp;&nbsp;&nbsp;&nbsp;event.source.source.info.exhibit = cMsg;
&nbsp;&nbsp;}
}</pre></pre><br />
And here are the instructions to change the first stamp in Rick&#8217;s example to the new style:</p>
<ol>
<li>Open the &#8220;Exhibit+Stamp.pdf&#8221; document in Adobe Acrobat Pro</li>
<li>Go to the second page in this document &#8211; that&#8217;s the first stamp</li>
<li>Select the TouchUp Object Tool (e.g. via Tools&gt;Advanced Editing&gt;TouchUp Object Tool)</li>
<li>Right-click on the lower part of the stamp (where the UserData1 field) and select Properties&#8230; from the menu</li>
<li>Select the Options tab and check the &#8220;Multi-line&#8221; checkbox</li>
<li>Select the Calculate tab and click on the Edit button next to the custom calculation script and replace the old script with the one from above</li>
<li>Save the script with the OK button, then close the properties dialog</li>
</ol>
<p>That&#8217;s it &#8211; just install the stamp file as described in Rick&#8217;s document. Done.</p>
<p>Of will of course be hard to see two or more lines in the relatively small stamp, so you may have to change the layout of the stamp to actually make use of the additional lines.f</p>
]]></content:encoded>
			<wfw:commentRss>http://www.khk.net/wordpress/2009/05/31/more-interactive-dynamic-stamps-in-seven-easy-steps/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Acrobat Plug-Ins</title>
		<link>http://www.khk.net/wordpress/2009/04/14/acrobat-plug-ins/</link>
		<comments>http://www.khk.net/wordpress/2009/04/14/acrobat-plug-ins/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 00:40:12 +0000</pubDate>
		<dc:creator>khk</dc:creator>
				<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Photos]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[acrobat plug-in]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[plug-in]]></category>

		<guid isPermaLink="false">http://khk.net/wordpress/?p=326</guid>
		<description><![CDATA[If you&#8217;ve seen my resume &#8211; or talked to me lately, you know that I create Acrobat plug-ins for a living. When people hear that, they usually think something like &#8220;Don&#8217;t forget to pick up the dry cleaning&#8221; or &#8220;I need to bring my cat to the vet for the rabies shot&#8221;&#8230; Yes, I understand, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2009%2F04%2F14%2Facrobat-plug-ins%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2009%2F04%2F14%2Facrobat-plug-ins%2F&amp;source=khkremer&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>If you&#8217;ve seen my <a href="http://khk.net/wordpress/resume/">resume</a> &#8211; or talked to me lately, you know that I create Acrobat plug-ins for a living. When people hear that, they usually think something like &#8220;Don&#8217;t forget to pick up the dry cleaning&#8221; or &#8220;I need to bring my cat to the vet for the rabies shot&#8221;&#8230; Yes, I understand, this may not be the most exciting topic, but probably only because you don&#8217;t know enough about what these &#8220;plug-ins&#8221; are, so let me explain.</p>
<p><a title="View 'Conservatory-038' on Flickr.com" href="http://www.flickr.com/photos/68335338@N00/3440056708"></p>
<div style="text-align:center;"><img class="flickr" src="http://farm4.static.flickr.com/3584/3440056708_32cec4e199.jpg" alt="Conservatory-038" /></div>
<p></a></p>
<p><a title="View 'Conservatory-038' on Flickr.com" href="http://www.flickr.com/photos/68335338@N00/3440056708"></a></p>
<p>Â </p>
<p>Adobe Acrobat is a very powerful tool, more powerful that most users actually realize. I wont go into any details about how powerful exactly &#8211; at least not today. Lets just say that it has something for everybody. However, you may need something in addition to what Adobe provides, something that still is in the general area of PDF. Adobe may not have considered your needs because either the target market for &#8220;your&#8221; feature is too small, or to far out there&#8230; Or you are so far ahead of everybody else that they have not even thought about that feature yet.</p>
<p>Adobe did however do a very interesting thing: They created an interface that allows 3rd party developers to create solutions based on Adobe Acrobat &#8211; using plug-ins. It is a very powerful interface, and hence not something that you can pick up in an afternoon. There are several thousand pages of API documentation that one needs to understand before a plug-in should be written.</p>
<p>A plug-in is &#8211; from a technical point of view &#8211; a module or library that gets loaded dynamically at runtime. Acrobat will scan it&#8217;s plug-ins directory and will load any modules it finds. Once loaded, such a plug-in can extend Acrobat by e.g. adding menu items, toolbuttons, or event handlers (e.g. a function that gets executed whenever a documents gets loaded).</p>
<p><a title="View 'Conservatory-013' on Flickr.com" href="http://www.flickr.com/photos/68335338@N00/3439227641"></p>
<div style="text-align:center;"><img class="flickr" src="http://farm4.static.flickr.com/3577/3439227641_2f7148f1cf.jpg" alt="Conservatory-013" /></div>
<p></a></p>
<p><a title="View 'Conservatory-013' on Flickr.com" href="http://www.flickr.com/photos/68335338@N00/3439227641"></a></p>
<p>Â </p>
<p>Interestingly enough, the plug-ins directory of a fresh Adobe Acrobat installation is not empty&#8230; A lot of Acrobat&#8217;s functionality is actually implemented as plug-ins. You can verify that on a Windows system by temporarily disabling all plug-ins by holding down the Shift key when bringing up Acrobat. That will load the application without any plug-ins. When you compare the toolbar or the menu bar with a fully loaded application, you&#8217;ll see what portion of the Acrobat core functionality is actually implemented in plug-ins.</p>
<p>The plug-in interface has different abstraction levels (COS, PDE, AV, &#8230;). If there is enough interest, I will provide information about how to navigate that API, and how to structure a plug-in.</p>
<p>The Acrobat SDK is available for free from Adobe&#8217;s <a href="http://www.adobe.com/devnet/acrobat/">Acrobat Development Center</a>.</p>
<p>Here are a few examples of commercially available plug-ins that I&#8217;ve used:</p>
<ul>
<li><em>Enfocus PitStop Professional:</em><br />
This is a preflight tool.</li>
<li><em>Quite Imposing Plus:</em><br />
The best PDF based imposition tool that I am aware of.</li>
<li><em>Enfocus Browser:</em><br />
Allows to review and change the internal structure of a PDF file.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.khk.net/wordpress/2009/04/14/acrobat-plug-ins/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Gutting a PDF</title>
		<link>http://www.khk.net/wordpress/2009/04/08/gutting-a-pdf/</link>
		<comments>http://www.khk.net/wordpress/2009/04/08/gutting-a-pdf/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 15:23:31 +0000</pubDate>
		<dc:creator>khk</dc:creator>
				<category><![CDATA[PDF]]></category>
		<category><![CDATA[Photos]]></category>
		<category><![CDATA[cos]]></category>
		<category><![CDATA[dictionary]]></category>
		<category><![CDATA[fish]]></category>
		<category><![CDATA[itext]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[meta data]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xmp]]></category>

		<guid isPermaLink="false">http://khk.net/wordpress/?p=314</guid>
		<description><![CDATA[OK, I have to admit, the title is just for show I don&#8217;t really want to gut a PDF &#8211; that would mean to kill it, and PDFs are pretty useful, so we should treat them well&#8230; What I&#8217;m after is to extract arbitrary information from a PDF file &#8211; information that may not be [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2009%2F04%2F08%2Fgutting-a-pdf%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.khk.net%2Fwordpress%2F2009%2F04%2F08%2Fgutting-a-pdf%2F&amp;source=khkremer&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>OK, I have to admit, the title is just for show <img src='http://www.khk.net/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I don&#8217;t really want to gut a PDF &#8211; that would mean to kill it, and PDFs are pretty useful, so we should treat them well&#8230;</p>
<p><a href="http://www.flickr.com/photos/68335338@N00/2651668890" title="View 'He's Dead, Jim!' on Flickr.com">
<div style="text-align:center;"><img src="http://farm4.static.flickr.com/3146/2651668890_89bd1c3971.jpg" alt="He's Dead, Jim!" class="flickr" /></div>
<p></a></p>
<p>What I&#8217;m after is to extract arbitrary information from a PDF file &#8211; information that may not be accessible in any other way. Some 3rd party Acrobat plug-ins save information in a PDF file so that once the document is opened again, the plug-in &#8220;knows&#8221; that the current file was already processed, or that a user interface window can be populated with the previously saved settings, or &#8230; There are many reasons why that could come in handy. </p>
<p>If you take a look at the <a href="http://www.adobe.com/devnet/pdf/pdf_reference.html">PDF Reference document</a>, you can find all the information necessary to understand how data can be saved in a PDF file. Adobe does allow 3rd party developers to store information in a PDF file as long as it is clear that the data is private. The developer can make sure that nobody else reads that information by accident by using a four letter developer prefix for all such data. </p>
<p>I&#8217;ve mentioned before that there are tools that allow us to look at the structure of a PDF file (e.g. the Enfocus Browser, or with Acrobat&#8217;s own Preflight tool). For now let&#8217;s assume that the data we are interested in is actually saved in the PDF&#8217;s metadata stream &#8211; if you don&#8217;t know what that means, please go back to the PDF Reference document. </p>
<p>[more after the jump]  <span id="more-314"></span>For this example, let&#8217;s try something simple that just illustrates the process and the tools we need. With that knowledge and background, it is easy to perform more sophisticated tasks with PDF files. </p>
<p>Every newer PDF files does not only contain the meta data in form of the document info dictionary, but also as XMP meta data &#8211; this is a XML based format. Let&#8217;s try to extract that XML data stream from a PDF file. </p>
<p>Because I don&#8217;t want to hide the interesting parts of the solution by infrastructure, I am hardcoding the PDF filename and the text output file name, I&#8217;m also assuming that the iText library JAR file is in the same directory as the source code. </p>
<p>Here is the complete program, I&#8217;ll go through the different sections once we&#8217;ve compiled and executed it:<br />
<pre><pre>
/* based on some sample code from iText library */

import java.io.*;

import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfDictionary;
import com.lowagie.text.pdf.PdfName;
import com.lowagie.text.pdf.PdfStream;
import com.lowagie.text.pdf.PRStream;

public class MetaData {

&nbsp;&nbsp;&nbsp;&nbsp;public static void main(String[] args) {

&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(&quot;Trying to extract XML metadata&quot;);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PdfReader reader = new PdfReader(&quot;first.pdf&quot;);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PdfDictionary dict = reader.getCatalog();

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PdfDictionary metaData = dict.getAsStream(new PdfName(&quot;Metadata&quot;));
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (metaData == null)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(&quot;Cannot get metaData&quot;);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (metaData.isStream())
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OutputStream f = new FileOutputStream(&quot;metaData.txt&quot;);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;byte[] data = PdfReader.getStreamBytes((PRStream) metaData);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f.write(data);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f.close();

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(&quot;Metadata is not a stream object&quot;);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (Exception de) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; de.printStackTrace();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}
}
</pre></pre></p>
<p>Let&#8217;s assume that the source code is in a file named MetaData.java, to compile and run the program, we would need to execute the following commands:<br />
<pre><pre>
javac MetaData.java
java MetaData
</pre></pre></p>
<p>Before you execute the program, make sure that there is a PDF file named &#8220;first.pdf&#8221; in the same directory as the program and the iText library. </p>
<p><H3>How Does It Work?</H3><br />
At first we need to import a bunch of &#8220;stuff&#8221; &#8211; we need the Java IO system, and then a few classes from the iText library:<br />
<pre><pre>
import java.io.*;

import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfDictionary;
import com.lowagie.text.pdf.PdfName;
import com.lowagie.text.pdf.PdfStream;
import com.lowagie.text.pdf.PRStream;
</pre></pre></p>
<p>In the next few lines, we define our class and declare our main function. Also, the whole iText related code is in one try/catch block. For a real application, you want to create smaller try/catch blocks so that you can recover from problems.<br />
<pre><pre>
public class MetaData {

&nbsp;&nbsp;&nbsp;&nbsp;public static void main(String[] args) {

&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(&quot;Trying to extract XML metadata&quot;);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {
</pre></pre></p>
<p>Now we are ready to create a new PdfReader object &#8211; this is how iText accesses the data in a PDF file. From that PdfReader object we can then get the &#8220;Catalog&#8221; which is the root object of all COS objects that are used in this dococument:<br />
<pre><pre>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PdfReader reader = new PdfReader(&quot;first.pdf&quot;);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PdfDictionary dict = reader.getCatalog();
</pre></pre></p>
<p>The meta data is stored as a stream (if you don&#8217;t know what that is, read up on it in the PDF spec) as a direct child of the Catalog dictionary (again, if you don&#8217;t know what that is, read up on it). This means that we can access it without any further navigating through the COS objects. For a real project, chances are that you have to go a few more levels deep into the COS structure. The PdfDictionary object has a method to get a stream:<br />
<pre><pre>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PdfDictionary metaData = dict.getAsStream(new PdfName(&quot;Metadata&quot;));
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (metaData == null)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(&quot;Cannot get metaData&quot;);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</pre></pre></p>
<p>When it comes to software, I&#8217;m not a very trusting person, so I want to make sure that we are indeed dealing with a stream and nothing else. Therefore I will call the isStream() method to find out if that&#8217;s the case. If we are dealing with a stream, I&#8217;m creating a new FileOutputStream (a text file that will receive the XML data), and then I am reading the actual COS stream data and writing it to the output file. iText will take care of any filters that were applied to the stream data (e.g. compression), so I don&#8217;t have to deal with that directly.<br />
<pre><pre>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (metaData.isStream())
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OutputStream f = new FileOutputStream(&quot;metaData.txt&quot;);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;byte[] data = PdfReader.getStreamBytes((PRStream) metaData);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f.write(data);

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f.close();

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(&quot;Metadata is not a stream object&quot;);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
</pre></pre></p>
<p>That&#8217;s it. Now we just need to make sure that we do have  catch block for our exception handler:<br />
<pre><pre>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (Exception de) {
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; de.printStackTrace();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
&nbsp;&nbsp;&nbsp;&nbsp;}
}

</pre></pre></p>
<p>Instead of saving the XML meta data to a file, we could have used a Java based XML parser and extracted data from it. </p>
<p>The same technique can also be used to read other data from a PDF file (e.g. names, numbers, &#8230;).</p>
<p>Let me know if you have more questions about either iText, or how to access information in a PDF file with it. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.khk.net/wordpress/2009/04/08/gutting-a-pdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

