JPG to PDF conversion failing for some files

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
yiland
Posts: 1
Joined: 2012-10-14T17:13:31-07:00
Authentication code: 67789

JPG to PDF conversion failing for some files

Post by yiland »

I'm running a batch PDF to JPG conversion on Mint Linux using Version: ImageMagick 6.5.7-8 2012-08-17 Q16.
I've tried it using :

Code: Select all

mogrify -format pdf *.jpg
as well as using a shell script:

Code: Select all

for i in `ls *.jpg`; do convert "$i" "$i".pdf; 
done
Some of the jpegs get converted, but others create only blank PDF files.

I've tried -debug and get a line like this for each file (same 1083 on each):

Code: Select all

convert: unrecognized event type `agreement.jpg' @ convert.c/ConvertImageCommand/1083.
The weirdest part is that the fourth time I ran convert it worked for the files it had previously only created blanks for. Since I ran it via a batch file that time, I assumed that some small change I had made to spacing or some such made the difference, so I kept that batch file and tried it with a new set of jpegs. Once again, some were correct, others only became blank PDFs.

All the jpegs I want to convert are documents scanned on the same photocopier. Jpegs from other sources seem to convert fine.

Any ideas?
Thanks!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: JPG to PDF conversion failing for some files

Post by fmw42 »

convert: unrecognized event type `agreement.jpg' @ convert.c/ConvertImageCommand/1083.
Can you convert this one file without doing all the rest? Or do you get the same error message. If you get this message, then perhaps that jpg is corrupt or malformed.
Post Reply