shell - Problems using ImageMagick for converting PDF with accented characters -


i having problem when converting pdf images using imagemagick or ghostscript. accented characters disappear converted image. found couple of people having same problem , apparently updating imagemagick package , ghostscript fixed it, not me.

i using pdf file on every tests made: https://www.dropbox.com/s/3gso0sw1e1n8f9r/error-with-accents.pdf?dl=0

i have ubuntu 14.04.2 lts server on azure need imagemagick work. official repositories have imagemagick 6.7.7 , ghostscript 9.10. later, tried upgrading them in order fix issue , have imagemagick 6.8.9-10 running on /opt/imagemagick-6.8 folder , added ubuntu's 15.04 repository install ghostscript 9.15 directly through apt-get. none of these fixed problem me.

here latests attempts on ubuntu 14.04 server:

$ lsb_release -a no lsb modules available. distributor id: ubuntu description:    ubuntu 14.04.2 lts release:    14.04 codename:   trusty  $ /opt/imagemagick-6.8/bin/convert -version version: imagemagick 6.8.9-10 q16 x86_64 2015-07-30 http://www.imagemagick.org copyright: copyright (c) 1999-2014 imagemagick studio llc features: dpc openmp delegates: jng jpeg png x xml zlib  $ /opt/imagemagick-6.8/bin/convert -list configure |grep delegates delegates      mpeg jng jpeg png ps x xml zlib  $ /opt/imagemagick-6.8/bin/convert error-with-accents.pdf -verbose -alpha off -resample 150 -density 150 -quality '80' im-test.jpg    **** warning: considering '0000000000 xxxxx n' free entry.     **** file had errors repaired or ignored.    **** file produced by:     **** >>>> mac os x 10.10.4 quartz pdfcontext <<<<    **** please notify author of software produced    **** file not conform adobe's published pdf    **** specification.  error-with-accents.pdf=>im-test.jpg pdf 595x794=>1240x1654 1240x1654+0+0 16-bit srgb 172kb 0.440u 0:00.240  $ gs -v gpl ghostscript 9.15 (2014-09-22) copyright (c) 2014 artifex software, inc.  rights reserved.  $ gs -dbatch -dnopause -sdevice=jpeg -soutputfile=gs-test.jpg error-with-accents.pdf  gpl ghostscript 9.15 (2014-09-22) copyright (c) 2014 artifex software, inc.  rights reserved. software comes no warranty: see file public details.    **** warning: considering '0000000000 xxxxx n' free entry. processing pages 1 through 1. page 1     **** file had errors repaired or ignored.    **** file produced by:     **** >>>> mac os x 10.10.4 quartz pdfcontext <<<<    **** please notify author of software produced    **** file not conform adobe's published pdf    **** specification.  $ convert -version version: imagemagick 6.7.7-10 2014-03-06 q16 http://www.imagemagick.org copyright: copyright (c) 1999-2012 imagemagick studio llc features: openmp      $ convert -list configure |grep delegates delegates     bzlib djvu fftw fontconfig freetype jbig jpeg jng jp2 lcms2 lqr lzma openexr pango png rsvg tiff x11 xml wmf zlib  $ convert error-with-accents.pdf -verbose -alpha off -resample 150 -density 150 -quality '80' im-test-6.7.7.jpg    **** warning: considering '0000000000 xxxxx n' free entry.     **** file had errors repaired or ignored.    **** file produced by:     **** >>>> mac os x 10.10.4 quartz pdfcontext <<<<    **** please notify author of software produced    **** file not conform adobe's published pdf    **** specification.  error-with-accents.pdf=>im-test-6.7.7.jpg pdf 595x794=>1240x1654 1240x1654+0+0 16-bit directclass 160kb 0.490u 0:00.279 

all same results:

gs-test.jpg

im-test.jpg

im-test-6.7.7.jpg

i able run ghostscript , imagemagick correctly on mac os. and, according this post, versions have on ubuntu should work. i'm thinking it's related freetype fonts. know nothing on how fix this. help?

the pdf document trying process very often modified , re-saved: 455 times between 2010-03-06 , 2014-06-17.

you can verify running pdfinfo -meta error-with-accents.pdf.

i not speak or read portuguese, cannot recognize if accent missing in output image 1 should be.

when tried command, im v6.9.0-0 q16 x86_64 2015-05-14 (using ghostscript v9.16), no see error:

enter image description here

your pdf has fonts uses embedded (see emb column). means, freetype not employed replacement/substitute font:

$ pdffonts error-with-accents.pdf     name                       type       encoding         emb sub uni object id   -------------------------- ---------- ---------------- --- --- --- ---------   ruxyww+conduititc-light    type 1c    macroman         yes yes no      14  0   noyzmg+y2kneophyte         truetype   winansi          yes yes yes     10  0   mvlykx+conduititc-medium   type 1c    macroman         yes yes no      15  0   jdnvdm+conduititc-bold     type 1c    macroman         yes yes no      13  0 

in case: should concentrate version of ghostscript processes pdf correctly. because imagemagick not pdf processing on own -- relies on ghostscript "delegate" so.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -