Hi,
I have to write a windows command line shell script to convert pdf to Images. For the following sample command:
convert.exe -density 300x300 -resize 3508x <file>.pdf -units PixelsPerInch -profile srgb.icc <FILE>.jpg
This command works fine for pdfs with NON-White background but goes wrong with pdfs with WHITE background. Any idea how I can give a command that works for both?
Plus
1) If the PDF is converted to .png ( as opposed to .jpg). It works. Any idea why?
PDF to Image converstion problem
-
- Posts: 3
- Joined: 2012-05-09T09:40:11-07:00
- Authentication code: 13
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: PDF to Image converstion problem
you will need to post a link to one of your pdf files. you probably need to flatten it against some background as your pdf may have transparency. also you syntax is probably not correct for IM 6 though it probably won't matter at this time. The resize should be after you read the pdf. if your pdf is cmyk, then you probably need to put -colorspace sRGB before the input image
try
convert.exe -density 300x300 <file>.pdf -resize 3508x -units PixelsPerInch -profile srgb.icc -background white -flatten <FILE>.jpg
but better to post a link to your image, so we can see what is happening.
try
convert.exe -density 300x300 <file>.pdf -resize 3508x -units PixelsPerInch -profile srgb.icc -background white -flatten <FILE>.jpg
but better to post a link to your image, so we can see what is happening.