Note that there are some explanatory texts on larger screens.

plurals
  1. POHigh-res images from PDFS
    primarykey
    data
    text
    <p>I'm working on a project in which I need to extract a TIFF per page from multi-page PDFs. The PDFs contain images only and there is one image per page (I believe they were made on some kind of photocopier/scanner, but haven't confirmed this). The TIFFs are then used to create several other derivative versions of the document so the higher the resolution the better.</p> <p>I've found two recipes, both with helpful aspects, but neither is ideal. Hoping someone can help me tune one of them, or offer a third option.</p> <p><strong>Recipe 1</strong>, pdfimages and ImageMagick: </p> <p>First do:</p> <pre><code>$ pdfimages $MY_PDF.pdf foo" </code></pre> <p>Which results in several <code>.pbm</code> files (named <code>foo-000.pbm</code>, <code>foo-001.pbm</code>), etc.</p> <p>Then for each <code>*.pbm</code> do:</p> <pre><code>$ convert $each -resize 3200x3200\&gt; -quality 100 $new_name.tif </code></pre> <p>Pro: The resultant TIFFs are a healthy 3300+ pixels on the long dimension, (-resize just serves to normalize everything)</p> <p>Con: The orientation of the pages is lost, and they come out rotated different directions (they follow logical patterns, so probably they are the orientation in which they were fed to the scanner??).</p> <p><strong>Recipe 2</strong> Imagemagick solo:</p> <pre><code>convert +adjoin $MY_PDF.pdf pages.tif </code></pre> <p>This gives me a TIFF per page (<code>pages-0.tif</code>, <code>pages-1.tif</code>, etc.).</p> <p>Pro: Orientation stays!</p> <p>Con: The long dimension of the resultant file is &lt; 800 px, which is too small to be useful, and it looks as though there is some compression applied.</p> <p>How can I ditch the scaling of the image stream in the PDF, but retain the orientation? Is there some more magick in ImageMagick that I'm missing? Something else entirely?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload