Bug 693490

Summary: Problems with fontnames
Product: Ghostscript Reporter: artifex
Component: PDF InterpreterAssignee: Alex Cherepanov <alex>
Status: NOTIFIED FIXED    
Severity: normal    
Priority: P2    
Version: 9.06   
Hardware: PC   
OS: All   
Customer: 870 Word Size: ---
Attachments: AUFTRAG.pdf
patch

Description artifex 2012-12-06 13:00:59 UTC
Created attachment 9135 [details]
AUFTRAG.pdf

When interpreting the attached PDF-file AUFTRAG.pdf a lot of warnings are printed in the following form:


Substituting font Courier for QuickPDFFd3d79d5b.
   **** Warning: Tf refers to an unknown resource name: QuickPDFFd3d79d5b Assuming it's a font name.
   **** Warning: Tf refers to an unknown resource name: QuickPDFFd3d79d5b Assuming it's a font name.
   **** Warning: Tf refers to an unknown resource name: QuickPDFFd3d79d5b Assuming it's a font name.
   **** Warning: Tf refers to an unknown resource name: QuickPDFFd3d79d5b Assuming it's a font name.
   **** Warning: Tf refers to an unknown resource name: QuickPDFFad82229b 
.
.
.

I tried to define the fonts in Fontmap.GS and as resources, but I don't had success. All fonts are substituted with the same default font and the encoding is not correct, the german "Umlaute Ä,Ö,Ü..." are missing.
The output with the AcrobatReader seems to be ok.
Comment 1 Alex Cherepanov 2012-12-08 15:53:25 UTC
Created attachment 9138 [details]
patch

The sample file assumes that a form XObject can access resources of
the external scope. PDF specification doesn't allow this, but Acrobat,
and muPDF can access such resources.

This patch saves pointer to XObject resources on the graphic state.
When resource cannot be found in a standard way< the stack of graphic
states is searched.

This patch is not yet committed because it appears
to increase memory consumption.
Comment 2 Alex Cherepanov 2012-12-25 18:31:35 UTC
Adobe Acrobat appears to search all nested XObjects for resource names
contrary to the PDF specification. This patch follows the reference
implementation and saves a pointer to XObject resource dictionary on
the graphic state. When a resource cannot be found in a standard way,
the stack of graphic states is searched.

A patch that fixes this bug has been committed as a rev.
23e7e3054c095cd5157f2f7768f95a75b86f9779