<?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>anoved.net &#187; pdf</title>
	<atom:link href="http://anoved.net/tag/pdf/feed/" rel="self" type="application/rss+xml" />
	<link>http://anoved.net</link>
	<description></description>
	<lastBuildDate>Sun, 13 May 2012 18:44:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Save PDF Pages as Images</title>
		<link>http://anoved.net/2008/11/save-pdf-pages-as-images/</link>
		<comments>http://anoved.net/2008/11/save-pdf-pages-as-images/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 01:38:00 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[automator]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[pdf]]></category>

		<guid isPermaLink="false">http://anoved.net/2008/11/save-pdf-pages-as-images/</guid>
		<description><![CDATA[Here is an Automator application to save each page of a PDF file as an image. You can do this with Preview, but it is tedious for documents with many pages. Download &#8220;Save PDF Pages as Images.app&#8221; (219 KB; Mac OS X 10.5 required) When you run the application, it begins by prompting you to [...]]]></description>
			<content:encoded><![CDATA[<p>Here is an Automator application to save each page of a PDF file as an image. You can do this with Preview, but it is tedious for documents with  many pages.</p>
<p><strong><a href="http://anoved.net/files/SavePDFPagesasImages.zip">Download &#8220;Save PDF Pages as Images.app&#8221; (219 KB; Mac OS X 10.5 required)</a></strong></p>
<hr />
<p>When you run the application, it begins by prompting you to select a PDF file. You can select any sort of file, but nothing much will happen if it&#8217;s not a PDF.</p>
<p><a href="http://www.flickr.com/photos/93931947@N00/3042507892" title="View '1-input' on Flickr.com"><img src="http://farm4.static.flickr.com/3073/3042507892_3bd867b63f_m.jpg" alt="1-input" border="0" width="240" height="186" /></a></p>
<p>Next you can choose the output image format. 150 DPI PNG is the default format. I don&#8217;t think the compression setting applies to PNG images, but it does apply to JPEGs.</p>
<p><a href="http://www.flickr.com/photos/93931947@N00/3042507928" title="View '2-format' on Flickr.com"><img src="http://farm4.static.flickr.com/3044/3042507928_9f7009f862_m.jpg" alt="2-format" border="0" width="240" height="133" /></a></p>
<p>Rendering the images may take a moment. Then you&#8217;ll be asked to define how the output files should be named. I recommend the &#8220;Make Sequential&#8221; option. By default, page images from a three-page document will be named <code>page-01.png</code>, <code>page-02.png</code>, and <code>page-03.png</code>.</p>
<p><a href="http://www.flickr.com/photos/93931947@N00/3041664747" title="View '3-naming' on Flickr.com"><img src="http://farm4.static.flickr.com/3225/3041664747_699813ff75_m.jpg" alt="3-naming" border="0" width="240" height="119" /></a></p>
<p>Lastly, you can choose where to save the results. Choose &#8220;Other&hellip;&#8221; from the menu to select a folder that doesn&#8217;t appear among the default locations.</p>
<p><a href="http://www.flickr.com/photos/93931947@N00/3042508002" title="View '4-output' on Flickr.com"><img src="http://farm4.static.flickr.com/3166/3042508002_4191c1c133_m.jpg" alt="4-output" border="0" width="240" height="86" /></a></p>
<p>Now you have an image of each page in the PDF.</p>
<p><a href="http://www.flickr.com/photos/93931947@N00/3041664893" title="View '5-results' on Flickr.com"><img src="http://farm4.static.flickr.com/3156/3041664893_50373f2ffd_m.jpg" alt="5-results" border="0" width="240" height="167" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://anoved.net/2008/11/save-pdf-pages-as-images/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Pdftk 1.41 for Intel Macs</title>
		<link>http://anoved.net/2007/11/pdftk-141-for-intel-macs/</link>
		<comments>http://anoved.net/2007/11/pdftk-141-for-intel-macs/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 01:46:00 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[tcl]]></category>

		<guid isPermaLink="false">http://anoved.net/2007/11/pdftk-141-for-intel-macs/</guid>
		<description><![CDATA[Pdftk is a useful utility for manipulating PDF files. A Macintosh binary of the current version was not available, except perhaps from Fink or Darwin Ports, so I built it myself. My version is not universal, but it doesn&#8217;t require a package manager, either. Until such time as this binary is available directly from the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.pdfhacks.com/pdftk/">Pdftk</a> is a useful utility for manipulating PDF files. A Macintosh binary of the current version was not available, except perhaps from <a href="http://finkproject.org/">Fink</a> or <a href="http://darwinports.com/">Darwin Ports</a>, so I built it myself. My version is not <a href="http://en.wikipedia.org/wiki/Universal_binary">universal</a>, but it doesn&#8217;t require a package manager, either.</p>
<p>Until such time as this binary is available directly from the official pdftk site, you can get it here:</p>
<p><a href="http://anoved.net/files/pdftk.zip"><strong>Download pdftk 1.41 for Intel Macs</strong></a> 1MB</p>
<p><em>Note: the default pdftk Makefile settings result in a binary that still relies on gcj. Until such time as this issue is resolved, the binary probably won&#8217;t be much use!</em></p>
<hr />
<p>Building <code>pdftk</code> requires <code>gcj</code>, which comes with <code>gcc</code>, but apparently not with Mac OS X. So, I downloaded and built <a href="http://gcc.gnu.org/gcc-4.2/">GCC 4.2.2</a>. Why 4.2.2? Because it was the most recent version.</p>
<pre><code>./configure --prefix=/usr/local/gcc/4.2.2 --disable-multilib
make
make install
</code></pre>
<p>The <code>--prefix</code> option installs everything out of the way in its own little directory; I wasn&#8217;t really interested in upgrading to a new version of <code>gcc</code> just to build <code>pdftk</code>.  The <code>--disable-multilib</code> option <a href="http://gcc.gnu.org/ml/gcc-help/2007-06/msg00245.html">turns off some crap</a> that caused build errors.</p>
<p>Once that&#8217;s done, building <code>pdftk</code> is just a matter of pointing the makefile at the new <code>gcc</code> stuff.</p>
<pre><code>cd pdftk
# In Makefile.MacOSX, define TOOLPATH=/usr/local/gcc/4.2.2/bin/
make -f Makefile.MacOSX
make install
</code></pre>
<p>So that&#8217;s how you roll your own.</p>
]]></content:encoded>
			<wfw:commentRss>http://anoved.net/2007/11/pdftk-141-for-intel-macs/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>strpdf</title>
		<link>http://anoved.net/2007/11/strpdf/</link>
		<comments>http://anoved.net/2007/11/strpdf/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 01:18:00 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[pdf]]></category>
		<category><![CDATA[tcl]]></category>

		<guid isPermaLink="false">http://anoved.net/2007/11/strpdf/</guid>
		<description><![CDATA[strpdf creates single-page PDF files populated with one-line text strings. The page size and string placement are configured with command line options. It is a purposely simple tool. Download Installation instructions and other notes are included with the downloads. strpdf-1.0-mac.zip (1.9M) Requires Mac OS X 10.4; untested on Mac OS X 10.5. strpdf-1.0-win.zip (640K) Untested, [...]]]></description>
			<content:encoded><![CDATA[<p><code>strpdf</code> creates single-page PDF files populated with one-line text strings. The page size and string placement are configured with command line options. It is a purposely simple tool.</p>
<h3>Download</h3>
<p>Installation instructions and other notes are included with the downloads.</p>
<ul>
<li><a href="http://anoved.net/files/strpdf/strpdf-1.0-mac.zip">strpdf-1.0-mac.zip</a> (1.9M) Requires Mac OS X 10.4; untested on Mac OS X 10.5.</li>
<li><a href="http://anoved.net/files/strpdf/strpdf-1.0-win.zip">strpdf-1.0-win.zip</a> (640K) Untested, but might work at the Windows command prompt.</li>
<li><a href="http://anoved.net/files/strpdf/strpdf-1.0-kit.zip">strpdf-1.0-kit.zip</a> (95K) Requires a <a href="http://www.equi4.com/pub/tk/downloads.html">Tclkit</a> for your platform (8.4.16 recommended).</li>
</ul>
<h3>Usage</h3>
<p>Strings are placed on the page with the <code>-text</code> option. General configuration options must be given before the first <code>-text</code> option. PDF data is printed to <code>stdout</code>, so <a href="http://en.wikipedia.org/wiki/Redirection_%28Unix%29#Redirecting_standard_input_and_standard_output">redirection</a> should be used to capture the result.</p>
<p>Here is a simple example:</p>
<pre>strpdf -text 'Hello, world!' center middle &gt; <a href="http://anoved.net/files/strpdf/helloworld.pdf" title="796B">helloworld.pdf</a></pre>
<p>The <code>-text</code> option has three parameters. The first is the string to print. The second and third specify the horizontal and vertical locations of the string on the page, respectively. Valid horizontal positions are <code>left</code>, <code>center</code>, and <code>right</code>. Valid vertical positions are <code>top</code>, <code>middle</code>, and <code>bottom</code>. The <code>left</code>, <code>right</code>, <code>top</code>, and <code>bottom</code> positions must each be followed by an additional parameter which specifies the distance from the indicated edge of the page to the closest side of the string.</p>
<p>Multiple instances of the <code>-text</code> option can be used to place multiple strings on the page:</p>
<pre>strpdf -text 'Upper right' right 0.5 top 0.5 -text 'Lower left' left 0.5 bottom 0.5 &gt; <a href="http://anoved.net/files/strpdf/corners.pdf" title="860B">corners.pdf</a></pre>
<p>The default page size is 8.5 &times; 11 inches (<code>letter</code>). The <code>-paper</code> option understands a few other common paper sizes, which can be listed with <code>strpdf paper</code>:</p>
<pre>strpdf -paper a4 -text 'A4 FTW' center top 1 &gt; <a href="http://anoved.net/files/strpdf/a4.pdf" title="814B">a4.pdf</a></pre>
<p>Alternatively, arbitrary page dimensions can be specified with the <code>-width</code> and <code>-height</code> options:</p>
<pre>strpdf -width 5 -height 5 -text 'Square' center middle &gt; <a href="http://anoved.net/files/strpdf/square.pdf" title="789B">square.pdf</a></pre>
<p>By default, page dimensions and string position parameters are interpreted as inches. The <code>-units</code> option allows these values to be given in millimeters or <a href="http://en.wikipedia.org/wiki/Point_(typography)#Current_DTP_point_system">points</a>. The supported <code>-units</code> parameters are <code>mm</code>, <code>pt</code>, and <code>in</code>.</p>
<p>The <code>-orient</code> option provides a landscape mode that swaps the width and height of the page. This can be done manually with the <code>-width</code> and <code>-height</code> options, but the landscape option is convenient for use with preset paper sizes:</p>
<pre>strpdf -paper legal -orient landscape -text 'Legal fine print' center bottom 0.5 &gt; <a href="http://anoved.net/files/strpdf/landscape.pdf" title="799B">landscape.pdf</a></pre>
<p>The default font is 12-point Helvetica. The <code>-size</code> option sets the font size (in points) and the <code>-font</code> option sets the font face. If given before the first <code>-text</code> string, these options set the default font. Given after the parameters of a particular <code>-text</code> option, they modify only that string:</p>
<pre>strpdf -font Times-Roman -size 18 -text 'One' left 1 top 1 -text 'Two' center top 1 -size 24 -font Courier -text 'Three' right 1 top 1 &gt; <a href="http://anoved.net/files/strpdf/fonts.pdf" title="1K">fonts.pdf</a></pre>
<p>Valid font faces can be listed with <code>strpdf font</code>. Valid fonts are not necessarily available on your computer, nor are the fonts on your computer necessarily compatible with <code>strpdf</code>.</p>
<p>There is a <code>-compress</code> option which will compress the PDF data if given the<br />
parameter <code>1</code>, but in most cases it yields little benefit. For small files such<br />
as the examples on this page, compression may actually result in slightly larger files.</p>
<h3>Applications</h3>
<p>I use <code>strpdf</code> in conjunction with <a href="http://www.pdfhacks.com/pdftk/"><code>pdftk</code></a> to &#8220;stamp&#8221; otherwise static PDF documents with bits of variable text. Because these are both free command line utilities, the process is easily automated and requires no commercial software. Here a registration string is stamped on each page of a report:</p>
<pre>strpdf -text 'Registered to John Doe' center top 0.25 &gt; <a href="http://anoved.net/files/strpdf/registration.pdf" title="804B">registration.pdf</a>
pdftk <a href="http://anoved.net/files/strpdf/document.pdf" title="149K">document.pdf</a> stamp registration.pdf output <a href="http://anoved.net/files/strpdf/registered-document.pdf" title="149K">registered-document.pdf</a></pre>
<p>Alternatively, <code>strpdf</code>&#8217;s output can be piped directly to <code>pdftk</code>:</p>
<pre>strpdf -text 'Registered to John Doe' center top 0.25 | pdftk document.pdf stamp - output registered-document.pdf</pre>
]]></content:encoded>
			<wfw:commentRss>http://anoved.net/2007/11/strpdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

