Wrong order during the conversion pdf to jpg with resizing.

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
ziemo
Posts: 1
Joined: 2012-12-13T06:51:46-07:00
Authentication code: 6789
Location: Poznan, Poland

Wrong order during the conversion pdf to jpg with resizing.

Post 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
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

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

Post 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".
Post Reply