Bug 441959 - OffendingCommand: .getmetrics32
Summary: OffendingCommand: .getmetrics32
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Interpreter (show other bugs)
Version: master
Hardware: All All
: P2 normal
Assignee: Igor Melichev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-07-17 02:37 UTC by Jack Moffitt
Modified: 2014-02-17 04:37 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Moffitt 2001-07-17 02:37:05 UTC
Originally reported by: jlsanz@users.sourceforge.net
I found a problem when using ps2ascii.
I'm using Adobe PS Generic PostScript Printer Version 5.2 on a Windows NT4 SP6 to generate a 
postcript file from Word97 (attached file). On my linux server, I can print it without any problem. 
But if I try to use ps2ascii I always get the following message:

%%[ Error: undefined; OffendingCommand: .getmetrics32 ]%%

My server is running RedHat 7.0 on a Intel MMX Pentium.
I've tried this command line:
   ps2ascii tmp.prn
or
   gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE -c save -f ps2ascii.ps tmp.prn        
-c quit

and this message appears in ghostscript versions:
GNU Ghostscript 5.50 (2000-2-13)  Packager: Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
GNU Ghostscript 6.51 (2001-03-28)  Packager: Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
AFPL Ghostscript 7.00 (2001-04-08)  Packager: Russell Lang <gsview@ghostgum.com.au>

Doesn't appear in version:
GNU Ghostscript 5.10 (1998-12-17) 
Packager: Red Hat Software <http://developer.redhat.com/bugzilla>

I didn't compile any of this packages by myself (see RPM Packager line).
I'm using the Adobe Postscript Printer driver as installed, whitout any other font substitution.
I've also tried pstotext and it fails too.

Any help is welcome.

NOTE: The attached file is a Microsoft Word template, without any changes, which appears in 
MSOffice97 spanish version.
Comment 1 Igor Melichev 2001-07-22 06:40:42 UTC
Comment originally by igorm@users.sourceforge.net
Logged In: YES 
user_id=79484

The problem is reproduced. Somewhat is wrong with 'bind'. 
Analyzing.
Comment 2 Igor Melichev 2001-07-22 07:40:50 UTC
Comment originally by igorm@users.sourceforge.net
Logged In: YES 
user_id=79484

The problem is reproduced. Somewhat is wrong with 'bind'. 
Analyzing.
Comment 3 Igor Melichev 2001-07-29 11:02:23 UTC
Comment originally by igorm@users.sourceforge.net
Logged In: YES 
user_id=79484

The binding is wrong due to -dNOBIND.
Specifically to .getmetrics32 it can be fixed easy with 
immediate binding in gs_typ32.ps . But so far another 
problem appears : ps2ascii.ps can't handle incremental 
fonts at all. Therefore it doesn't solve user's problem.
Sending message to the user :

Dear Jose Luis Sanz Boixader,

What you are doing is wrong in principle.
You convert a Spanish Word document into PS file with PS 
driver,
and then try to extract text from there.

The problem is that PS driver you are using misses 
information
being important for you. It uses incremental fonts for 
representing
character outlines. There is no way to restore character 
codes from this
PS document, because it uses random temporary character 
codes for
Spahish glyphs. 

Actually ps2ascii fails with "undefined .getmetrics32".
It is our bug. But once it is fixed, it cannot solve your 
problem.

Therefore I am recommending you to find a different method 
for
extracting text from Word document. The file you supplied
doesn't contain this information at all. It only contains 
glyph outlines.

Igor.
Comment 4 Igor Melichev 2001-08-06 03:38:27 UTC
Comment originally by igorm@users.sourceforge.net
Logged In: YES 
user_id=79484

The patch http://www.ghostscript.com/pipermail/gs-code-
review/2001-August/001053.html commited.