PDF to JPG can not be viewed in IE6 or IE7
Posted: 2008-09-26T16:29:04-07:00
So, for work, I was asked to convert PDF files into JPG images.
Immediately I thought of ImageMagick and wrote this:
Unfortunately, for some reason, the .jpg file can not show up in IE7 on Windows XP and Vista, nor IE6 through Wine on Linux. It works in Firefox, GIMP, Image Viewer (Gnome), some KDE applications, etc.
Is there a header I'm missing?
I also ran the command 'file' to see if the file was recognized as a JPG. It was of course, including the .jpg that was converted from a PDF file before I was hired (in folder 'old').
Immediately I thought of ImageMagick and wrote this:
Code: Select all
for file in `ls *.pdf`; do
convert $file -resize 800x800 `echo $file | sed 's/\.pdf$/\.jpg/'`
done
Is there a header I'm missing?
I also ran the command 'file' to see if the file was recognized as a JPG. It was of course, including the .jpg that was converted from a PDF file before I was hired (in folder 'old').
$ file page01.jpg
page01.jpg: JPEG image data, JFIF standard 1.01
$ file old/page01.jpg
old/page01.jpg: JPEG image data, JFIF standard 1.01