ghostscript can just get images

78 views Asked by At

I am trying to get images from a pdf with ghostscripts using this sentence:

gs -dNOPAUSE -sDEVICE=jpeg -dFirstPage=1 -dLastPage=5 -sOutputFile=output%d.jpg -dJPEGQ=100 -r500 -q intput.pdf -c q

but when convert the image throws:

Substituting font: ...

There is some way existing to do conversion without substitute the font?, just generate the image exactly like pdf.

2

There are 2 answers

0
KenS On

'exactly like the PDF' doesn't necessarily make sense. The PDF clearly uses a font which it doesn't embed, so any PDF consumer will have to use a 'substitute'. The substitute might be the original font, if that's available.

If you have the original font available, you can edit the Ghostscript fontmap (or cidfmap) to add that font to the list of fonts which Ghostscript knows about, and it will then use that font when an input file requests a font of that name (and doesn't define it).

0
Spirit Software On

Thanks a lot, I was converting a pdf to png files for a flipbook library and read the info into pdf is not necessary.

I used a pdftopdm is a tool from poppler-utils from poppler-0.33.0.tar.xz, in ubuntu 14 and centos 6 is natively installed, converting the pdf to png images whitout problems.

Thanks for Help!