Page 1 of 1
Missing accented characters in output file
Posted: 2014-08-29T14:11:07-07:00
by vokietukass
Hi, i've faced a problem with PDF -> PNG conversion. When i'm trying to convert PDF file to images, i get those images without any accented characters.
The original pdf looks like:
The converted png have no accented letters
Is there any bugor could be issue with some configuration?
I use that code for converting:
Code: Select all
convert -density 300 -depth 8 -quality 85 {$path}".$data['id'].".pdf[".$i."] {$path}".$data['id']."/".$data['id']."-".$i.".png
Would be very thankful for your help.
Re: Missing accented characters in output file
Posted: 2014-08-29T14:21:20-07:00
by fmw42
IM uses Ghostscript to convert vector files like pdf to raster. I suspect that you do not have the equivalent font file in your Ghostscript fonts.
Re: Missing accented characters in output file
Posted: 2014-08-29T23:57:54-07:00
by vokietukass
I have the IM installed over other PC (with GS v. 9.07) and it does the job well, the IM with GS v. 9.10 - fails. The fontmaps of GS in both cases are the same.
Re: Missing accented characters in output file
Posted: 2014-08-30T03:59:51-07:00
by vokietukass
I've noticed, that during conversion Ghostscript uses -sDEVICE=pbmraw. Trying to change device to -sDEVICE=png16m solved the problem. Is there any way to order sDEVICE to be used by IM's convert options or sDEVICE is chosen according to some kind of an algorithm?
fmw42 wrote:IM uses Ghostscript to convert vector files like pdf to raster. I suspect that you do not have the equivalent font file in your Ghostscript fonts.
Re: Missing accented characters in output file
Posted: 2014-08-30T04:05:45-07:00
by dlemstra
Can you try Ghostscript 9.14?
Re: Missing accented characters in output file
Posted: 2014-08-30T04:55:35-07:00
by vokietukass
The same problem. Everything is OK when converting directly through Ghostscript, but converting with imagemagick fails. I feel there is something about configuration
dlemstra wrote:Can you try Ghostscript 9.14?
Re: Missing accented characters in output file
Posted: 2014-08-30T10:00:26-07:00
by fmw42
IM sDEVICE are just some default settings that have been selected in delegates.xml. You may change those to anything you want that works. I do not believe there is any algorithm for how they are set. They are set depending upon each delegate libraries. I usually reset ps/pdf sDevice to pngalpha.
Re: Missing accented characters in output file
Posted: 2014-08-31T15:56:43-07:00
by vokietukass
I've solved that issue. I think that there was some permission issues with my cron. I've just added 'sudo' to my command and now all is working as it should.
Code: Select all
sudo convert -density 300 -depth 8 -quality 85 {$path}".$data['id'].".pdf[".$i."] {$path}".$data['id']."/".$data['id']."-".$i.".png
Thanx for your help
