Page 1 of 1

Wrong order during the conversion pdf to jpg with resizing.

Posted: 2012-12-13T07:04:33-07:00
by ziemo
I have 2 issues while converting pdf to jpg.
first of all: my jpg's are totally in the wrong order.
secondly: I allways get one jpg file which is empty. But only with inherit pdf files. When I convert something from pdf which I firstly converted from ppt to pdf through Google Drive everythig's fine.

This is my query:

Code: Select all

convert some.pdf -resize 800x600 -background white -gravity center -extent 800x600 -fill white xc:white -unsharp 0x1 some.jpg
I'll be very glad for your help!
Tom

Re: Wrong order during the conversion pdf to jpg with resizi

Posted: 2012-12-13T08:17:24-07:00
by glennrp
By "wrong order" I assume you mean that you are getting some.jpg.1 some.jpg.10 some.jpg.11 .... some.jpg.2
which is just a characteristic of the lexical sorting order of files by the operating system.

To get them in the same order as they are in the pdf, try using output format "some_%03d.jpg"
(or if you have more than 999 images in the pdf, "some_%04d.jpg"). The "04" means "four
digits with leading zeroes".

I don't think we can answer the question about the empty file without seeing a sample
"inherit pdf file".