ImageMagik PDF manipulation rotate, thumbnail, problems

Tethys tethys at gmail.com
Tue Dec 4 12:01:57 UTC 2012


On Tue, Dec 4, 2012 at 9:31 AM, Gary Stainburn
<gary.stainburn at ringways.co.uk> wrote:

> Because some people don't know which way up to put pages into a fax machine I
> also give the user the ability to invert a fax by calling
>
> /usr/bin/convert $1 -rotate 180 $2
>
> However, the resulting PDF file is very poor quality so I changed this to
>
> /usr/bin/convert $1 -density 300x300 -rotate 180 $2

Use the right tool for the job, which in this case isn't ImageMagick:

	pdftk $1 cat 1-endS output $2

In general, ImageMagick is rarely the right option anyway. Here, pdftk
is better for manipulating pdf files, and netpbm is usually better for
images. I'd be using pdftoppm to create the thumbnails, for example
(although it would need a small script to convert them to a more suitable
format afterwards -- either png or jpg).

Tet

-- 
"Java is a DSL for taking large XML files and converting them to stack
traces" -- Bulat Shakirzyanov


More information about the users mailing list