Web lists-archives.com

Re: Ghostscript cannot find CMaps in Poppler

On 2/6/2018 8:40 PM, Vonobow Smith wrote:
  From Cygwin which is bundled with Ghostscript 9.21,
Ghostscript cannot find CMap's at all. As a result, CJK characters
cannot be rendered at all.

$ gsnd
GPL Ghostscript 9.22 (2017-10-04)
Copyright (C) 2017 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
GS>/UniJIS-UTF8-H /CMap findresource
Error: /undefinedresource in findresource

This is caused by incorrect setting of search path for Ghostscript,
or the directory hierarchy of Poppler.

  GS search path is set as following:

$ gs --help
GPL Ghostscript 9.22 (2017-10-04)
Copyright (C) 2017 Artifex Software, Inc.  All rights reserved.
Usage: gs [switches] [file1.ps file2.ps ...]
... snip ...
Search path:
    /usr/share/ghostscript/9.22/Resource/Init :
    /usr/share/ghostscript/9.22/lib :
    /usr/share/ghostscript/9.22/Resource/Font :
    /usr/share/ghostscript/fonts : /usr/share/fonts/urw-base35 :
    /usr/share/fonts : /usr/share/poppler/cMap/Adobe-CNS1 :
    /usr/share/poppler/cMap/Adobe-GB1 :
    /usr/share/poppler/cMap/Adobe-Japan1 :
    /usr/share/poppler/cMap/Adobe-Japan2 :

However, CMap files are placed at:
$ cd /usr/share/poppler/cMap/Adobe-Japan1/; ls
78-EUC-H                Adobe-Japan1-H-CID   UniHojo-UTF32-H
78-EUC-V                Adobe-Japan1-H-Host  UniHojo-UTF32-V
78-H                    Adobe-Japan1-H-Mac   UniHojo-UTF8-H
... snip ...

The problem is directory hierachy lacks the element "CMap".
CMap files must be found in CMap directory under the search path, like:

The old version of the Ghostscript held CMap's under:


and this is correct.

The easiest way to solve this problem is creating symbolic links
which name is "CMap" in each directories containing CMap files,
target of the links are the directories itself, like that:

cd /usr/share/poppler/cMap; for i in *; do (cd $i; ln -s . CMap); done

Thanks for the report. I'll fix this in a slightly different way with a new ghostscript release. It might take a week or so before I can get to this.


Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple