Missing accented characters in output file

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
vokietukass
Posts: 5
Joined: 2014-08-29T13:52:25-07:00
Authentication code: 6789

Missing accented characters in output file

Post 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:
Image

The converted png have no accented letters
Image

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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Missing accented characters in output file

Post 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.
vokietukass
Posts: 5
Joined: 2014-08-29T13:52:25-07:00
Authentication code: 6789

Re: Missing accented characters in output file

Post 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.
vokietukass
Posts: 5
Joined: 2014-08-29T13:52:25-07:00
Authentication code: 6789

Re: Missing accented characters in output file

Post 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.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Missing accented characters in output file

Post by dlemstra »

Can you try Ghostscript 9.14?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
vokietukass
Posts: 5
Joined: 2014-08-29T13:52:25-07:00
Authentication code: 6789

Re: Missing accented characters in output file

Post 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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Missing accented characters in output file

Post 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.
vokietukass
Posts: 5
Joined: 2014-08-29T13:52:25-07:00
Authentication code: 6789

Re: Missing accented characters in output file

Post 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 ;)
Post Reply