Ghostscript cannot find CMaps in Poppler
Vonobow Smith
smith@cygwin.akamoz.jp
Wed Feb 7 01:40:00 GMT 2018
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 :
> /usr/share/poppler/cMap/Adobe-Korea1
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:
/usr/share/poppler/cMap/Adobe-Japan1/CMap/UniJIS-UTF8-H
^^^^
The old version of the Ghostscript held CMap's under:
/usr/share/ghostscript/ver.sion/Resources/CMap
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
Sorry if it is alread reported. Best Regards.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.tar.gz
Type: application/gzip
Size: 4717 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20180207/3e37d820/attachment.gz>
-------------- next part --------------
--
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
More information about the Cygwin
mailing list