Bug 692262 - error when gsview show eps
Summary: error when gsview show eps
Status: RESOLVED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Interpreter (show other bugs)
Version: 8.71
Hardware: PC Windows Vista
: P4 normal
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-08 03:41 UTC by simeng
Modified: 2011-06-08 07:26 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
error when gsview show this eps (375.42 KB, application/postscript)
2011-06-08 03:41 UTC, simeng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description simeng 2011-06-08 03:41:34 UTC
Created attachment 7574 [details]
error when gsview show this eps

but photoshop can show this.
Comment 1 Ken Sharp 2011-06-08 07:26:38 UTC
The EPS file is invalid. Most likely Photoshop is opening the attached TIFF preview rather than rendering the PostScript. Adobe Distiller gives the same error as Ghostscript does.

The likely problem is the inclusion of a type 3 font, it appears that the BuildChar procedure has been edited, chunks of the code have been commented out:

/BuildChar {
	Adobe_Illustrator_AI5_vars exch /_bitlobyte exch put
	Adobe_Illustrator_AI5_vars exch /_bitfont exch put
	_bitfont /FontScript get 25 eq
	_bithibyte 0 eq
	_bitlobyte 161 ge _bitlobyte 254 le and
	and and
	{
		Adobe_Illustrator_AI5_vars /_bithibyte Adobe_Illustrator_AI5_vars /_bitlobyte get put
		0 0 setcharwidth
	}
	{
		_bithibyte 256 mul _bitlobyte add
		16 4 string cvrs dup length (K) dup length
		dup 4 -1 roll add string Adobe_Illustrator_AI5_vars exch /_bitkey exch put
		exch _bitkey copy pop _bitkey exch 3 -1 roll putinterval
%		_lineorientation 1 eq _bithibyte 0 ne and {
%			0 _bitfont /FontAscent get neg translate
%		} if
		_bitfont /CharMetrics get _bitkey cvn get 0 setcharwidth
		_bitfont /CharStrings get _bitkey cvn get exec
%		_lineorientation 1 eq _bithibyte 0 ne and {
%			0 _bitfont /FontAscent get translate
%		} if
		Adobe_Illustrator_AI5_vars /_bithibyte 0 put
	} ifelse
} bind def

Other portions of the job exhibit signs that the file has been hand-edited as well.

The error is caused by trying to extract 'K31' from a dictionary, given that the CharStrings in the font are all of the form Kxx, and there is no K31, I would have to guess that someone has removed a glyph definition which the program relies on.