Bug 209720

Summary: print/ghostscript9-agpl-base: ghostscript fails on some EPS files required Japanise fonts
Product: Ports & Packages Reporter: mail_of_sergey
Component: Individual Port(s)Assignee: Document Engineering Group (Nobody) <doceng>
Status: Closed FIXED    
Severity: Affects Only Me CC: hrs, mail_of_sergey
Priority: --- Keywords: needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (doceng)
Hardware: Any   
OS: Any   
Attachments:
Description Flags
The broken EPS file none

Description mail_of_sergey 2016-05-23 18:22:19 UTC
Created attachment 170576 [details]
The broken EPS file

Some strange created EPS or PS files required Japanise fonts.
GS can't find this fonts and fail.

Here's the easy command to reproduce:

$ gs -q -sDEVICE=bbox -dNOPAUSE -dBATCH -dSAFER -dEPSCrop -r300 broken-on-ubuntu-1504.eps

The expected output:
%%BoundingBox: 87 81 1515 1510
%%HiResBoundingBox: 87.840941 81.600003 1514.790058 1509.385370

The result:
Error: /undefinedresource in resourcestatus
Operand stack:
   false   ct_StyleDicts   --dict:0/4(L)--   Adobe-Japan1   --dict:0/4(L)--   Serif   HeiseiMin-W3-83pv-RKSJ-H   Font   HeiseiMin-W3   CIDFont
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1967   1   3   %oparray_pop   1967   1   3   %oparray_pop   1966   1   3   %oparray_pop   --nostringval--   1950   1   3   %oparray_pop   1836   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   1915   10   9   %oparray_pop
Dictionary stack:
   --dict:1188/1684(ro)(G)--   --dict:0/20(G)--   --dict:94/200(L)--   --dict:57/75(L)--   --dict:2/10(L)--   --dict:39/70(L)--   --dict:0/4(L)--   --dict:0/4(L)--   --dict:20/27(ro)(G)--   --dict:20/26(ro)(G)--
Current allocation mode is local
Last OS error: Invalid argument
GPL Ghostscript 9.16: Unrecoverable error, exit code 1


I found this error when print PDF file via Adobe Acrobat Reader 11.00.15 form Windows workstation to CUPS printer.

Later I find the same error at Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/ghostscript/+bug/1449875

Not one workaround from Ubuntu can't help.
Comment 1 mail_of_sergey 2016-05-23 18:22:45 UTC
freebsd-version
10.3-RELEASE-p3
Comment 2 Hiroki Sato freebsd_committer freebsd_triage 2016-05-23 18:43:09 UTC
Please install japanese/font-std.  It should solve the problem.
Comment 3 mail_of_sergey 2016-05-23 21:23:32 UTC
(In reply to Hiroki Sato from comment #2)

Yes, its works:

gs -q -sDEVICE=bbox -dNOPAUSE -dBATCH -dSAFER -dEPSCrop -r300 broken-on-ubuntu-1504.eps
%%BoundingBox: 87 81 1515 1510
%%HiResBoundingBox: 87.840941 81.600003 1514.790058 1509.385370