Bug 692258

Summary: pdf_info.ps does not follow resources to report fonts
Product: Ghostscript Reporter: Ken Sharp <ken.sharp>
Component: PDF InterpreterAssignee: Alex Cherepanov <alex>
Status: NOTIFIED FIXED    
Severity: enhancement    
Priority: P4    
Version: master   
Hardware: All   
OS: All   
Customer: 580 Word Size: ---
Attachments: sample file
patch

Description Ken Sharp 2011-06-07 07:13:44 UTC

    
Comment 1 Ken Sharp 2011-06-07 07:17:46 UTC
When using pdf_info.ps and reporting font usage, the PostScript program does not take Form resources into account, and only reports on Fonts declared as Resources in the Page dictionary.

The attached example only uses the ZapfDingbats font in Form resources, and so it is not listed as being used in the PDF file.

There may be other cases of resource types which declare fonts, but I don't think so, at present.

This is not strictly a PDF interpreter problem, but updating pdf_info.ps will require knowledge of the structures it uses, so I think its best if this is handled by the relevant engineer.
Comment 2 Ken Sharp 2011-06-07 07:19:08 UTC
Created attachment 7572 [details]
sample file
Comment 3 Alex Cherepanov 2011-06-10 04:27:45 UTC
Created attachment 7587 [details]
patch

Search annots, forms, patterns for fonts.

Besides the contents, look into annotations to identify fonts used by
the PDF file. Add recursive enumeration of Form and Pattern resources.
Comment 4 Alex Cherepanov 2011-06-10 04:28:27 UTC
The patch has been committed as a rev f256d925aba7bd2c552e3598b5782bc3ab09cf4f