ImageMagik PDF manipulation rotate, thumbnail, problems

Gary Stainburn gary.stainburn at ringways.co.uk
Tue Dec 4 09:31:37 UTC 2012


I'm writing a fax document import facility. We receive faxes using Hylafax 
which get converted to PDF and uploaded to a web server.

My web interface then allows the PDF documents to be split into single pages 
and injected into a database.

I create the thimbnails by calling 

convert -thumbnail 450 $1 ${1}.jpg

which creates a series of JPEG files one for each page.

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

which fixed the quality in the PDF file which then looks as good as the 
original, but is now the right way up.

My problem is then that if I use this new PDF file to create the thumbnails 
using the top convert command the resulting image is still the same size, but 
the whole of the contents of the page is squashed in the bottom left corner 
and the rest of the image is plain while.

Can anyone help with this?
-- 
Gary Stainburn
Group I.T. Manager
Ringways Garages
http://www.ringways.co.uk 


More information about the users mailing list