Page 1 of 1

PDF to PNG Conversion

Posted: 2012-02-11T03:27:37-07:00
by msamarnath
Hi All,

I am very new to this ImageMagick and to this forum. I am trying to convert bunch of PDFs to PNGs and in some pages, I am not able to get the text fonts converted to PNG as it is in the PDF. I am using the following command to convert the PDF to PNG and this PNGs need to be used on Mobile devices.

convert -density 144 -quality 100 -colorspace RGB -define pdf:use-cropbox=true "page1.pdf[0]" "page1.png"

I am just converting the page which has the issue and the problem is there are inconsistent spaces between the letters of the texts when it is converted to PNG.

The below URL has got the PDF which has the issue
http://cst-ts.excelindia.com/download/page1.pdf

The below Image is converted from the above command
http://cst-ts.excelindia.com/download/page1.png

Can anyone please help me to understand what could be the issue here and the solution to resolve this.

Many Thanks,

Re: PDF to PNG Conversion

Posted: 2012-02-11T06:21:45-07:00
by msamarnath
On Investigating the issue further, I found that some of the fonts are not embedded inside the PDF and also not found in my system. Is that can be a issue?

Re: PDF to PNG Conversion

Posted: 2012-02-11T08:27:00-07:00
by Drarakel
msamarnath wrote:Is that can be a issue?
Yeah. The "CenturyGothic" font is not embedded.
You probably have to:
a) get this font somewhere (on my Windows system, it was installed with Office, I guess) and
b) assure that Ghostscript can load the font (for example by specifying the path to this file with the GS_FONTPATH environment variable)

Then it should be better. (Though, on my system, Ghostscript and the Adobe Reader still use different fonts. Not sure why.)