gsc -sDEVICE=tiffsep -sOutputFile=/tmp/test -r30 -f /storage/archive/20259SIC322.pdf AFPL Ghostscript CVS PRE-RELEASE 8.53 (2005-10-07) Copyright (C) 2005 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Processing pages 1 through 1. Page 1 Error: /invalidfont in --.type42execchar-- Operand stack: --dict:7/7(L)-- --dict:12/12(ro)(L)-- 237 iacute 116 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- %finish_show --nostringval-- --nostringval-- 10 11 1 --nostringval-- (gs_show_enum) %op_show_continue Dictionary stack: --dict:1122/1686(ro)(G)-- --dict:2/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:105/127(ro)(G)-- --dict:258/347(ro)(G)-- --dict:21/24(L)-- --dict:4/6(L)-- --dict:20/31(L)-- --dict:4/5(L)-- --dict:16/20(L)-- Current allocation mode is local Last OS error: 2 AFPL Ghostscript CVS PRE-RELEASE 8.53: Unrecoverable error, exit code 1
Created attachment 1936 [details] Bad file
Acrobat 5 cannot render the sample file either. First, there's a white rectangle that obscures most of the view. After removing the rectangle, one can see that the word maiz (with iacute, ( ma\355z) Tj ) is rendered as ma . After removing the offending character, it's rendered as maz. Most likely the font is invalid.
Acrobat Reader 6 and 7 show the word maiz correctly. It looks like Ghostscript need one more hack in the font interpreter.
fwiw, MacOS X Preview (Apple Quartz) renders this without complaining too.
Created attachment 1953 [details] hack3inf.pdf simplified sample file The error is detected at ttinterp.c:3650 diring execution of SHC instruction. I didn't figure out yet ehether this is a font or interpreter bug. Attached is a sample file most of unrelated objects removed.
Created attachment 1966 [details] patch Following FreeType 2 implementation, ignore incorrect SHC command. We don't have test cases that exercise this branch. So the regression test detects no differences.
Please commit.
The patch is committed in rev. 6559.