PDF to image conversion question
PDF to image conversion question
When I convert a PDF file to PNG I get this rough edges all over the text. How can I convert it anti-aliased? I tried this command:
"convert -density 150 -colorspace RGB -units PixelPerInch a.pdf a.png"
You can see the screenshot of the actual PDF file and the result PNG:
"convert -density 150 -colorspace RGB -units PixelPerInch a.pdf a.png"
You can see the screenshot of the actual PDF file and the result PNG:
Re: PDF to image conversion question
Try a higher denisty, also read the image in first. I would also look at a quality setting http://www.imagemagick.org/script/comma ... hp#quality
Code: Select all
"convert -density 400 a.pdf -colorspace RGB -units PixelPerInch a.png"
Re: PDF to image conversion question
Add -resize 25% if you want to reduce the final image size. Also investigate Ghostscript fonts. The default fonts are not the best and you will get better results if you provide commercial quality fonts to Ghostscript.
Re: PDF to image conversion question
Higher density combined with resize did the trick, thanks a lot.
Another question: When I convert the pdf to gif it creates a single animated gif. How can I convert to separate gif files? I checked options page but couldn't see anything for this.
Another question: When I convert the pdf to gif it creates a single animated gif. How can I convert to separate gif files? I checked options page but couldn't see anything for this.
Re: PDF to image conversion question
You can create separate image files with the +adjoin option or even better embed %02d in your filename:
- convert image.pdf image-%02d.gif
Re: PDF to image conversion question
Thanks a lot, you rock.magick wrote:You can create separate image files with the +adjoin option or even better embed %02d in your filename:
- convert image.pdf image-%02d.gif
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: PDF to image conversion question
Of course you
1/ Have to pay for it
2/ its is windows only!
If you are going to pay for a solution I would recommend going to Adobe, the owners of the Postscript and PDF file format. But I don't know what products they have for it.
1/ Have to pay for it
2/ its is windows only!
If you are going to pay for a solution I would recommend going to Adobe, the owners of the Postscript and PDF file format. But I don't know what products they have for it.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: PDF to image conversion question
too many post of commercial tools to convert PDF files to images recently on this forum!
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: PDF to image conversion question
Perhaps a post to the Kudos and Rants area is in order?
I don't mind hearing about alternative solutions, as long as it is only the once.
I would prefer free solutions though.
I don't mind hearing about alternative solutions, as long as it is only the once.
I would prefer free solutions though.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
-
- Posts: 1
- Joined: 2016-01-21T15:05:23-07:00
- Authentication code: 1151
Re: PDF to image conversion question
Hi,
I have 55 pages pdf document and trying to convert each page in jpg/png. but getting below error, can some one please help me and tell me how we can do pdf to image conversion for multipage PDF document?
C:\ImageMagic\ImageMagick-6.9.3-1-portable-Q16-x64>convert test.pdf image-%
02d.png
convert.exe: FailedToExecuteCommand `"gswin32c.exe" -q -dQUIET -dSAFER -dBATCH -
dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEV
ICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=C
:/Temp/magick-9568gAo94o_OQzfS%d" "-fC:/Temp/magick-9568oVHaeshaJqPT" "-fC:/Temp
/magick-95680eCkiAcmOUsf"' (The system cannot find the file specified.
) @ error/delegate.c/ExternalDelegateCommand/480.
convert.exe: PDFDelegateFailed `The system cannot find the file specified.
' @ error/pdf.c/ReadPDFImage/800.
convert.exe: NoImagesDefined `image-%02d.png' @ error/convert.c/ConvertImageComm
and/3241.
Thank you
SK
I have 55 pages pdf document and trying to convert each page in jpg/png. but getting below error, can some one please help me and tell me how we can do pdf to image conversion for multipage PDF document?
C:\ImageMagic\ImageMagick-6.9.3-1-portable-Q16-x64>convert test.pdf image-%
02d.png
convert.exe: FailedToExecuteCommand `"gswin32c.exe" -q -dQUIET -dSAFER -dBATCH -
dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEV
ICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" "-sOutputFile=C
:/Temp/magick-9568gAo94o_OQzfS%d" "-fC:/Temp/magick-9568oVHaeshaJqPT" "-fC:/Temp
/magick-95680eCkiAcmOUsf"' (The system cannot find the file specified.
) @ error/delegate.c/ExternalDelegateCommand/480.
convert.exe: PDFDelegateFailed `The system cannot find the file specified.
' @ error/pdf.c/ReadPDFImage/800.
convert.exe: NoImagesDefined `image-%02d.png' @ error/convert.c/ConvertImageComm
and/3241.
Thank you
SK
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: PDF to image conversion question
In the future, please do not tack on new questions to old topics. Also always provide your platform (as well as IM version, though you have that here).
Looks like a problem with your Ghostscript. Do you have it installed?
Looks like a problem with your Ghostscript. Do you have it installed?