Page 1 of 1

JPG to PDF conversion failing for some files

Posted: 2012-10-14T18:33:55-07:00
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!

Re: JPG to PDF conversion failing for some files

Posted: 2013-03-13T21:14:05-07:00
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.