Bug 692258 - pdf_info.ps does not follow resources to report fonts
Summary: pdf_info.ps does not follow resources to report fonts
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: master
Hardware: All All
: P4 enhancement
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-07 07:13 UTC by Ken Sharp
Modified: 2011-11-25 04:34 UTC (History)
0 users

See Also:
Customer: 580
Word Size: ---


Attachments
sample file (443.48 KB, application/pdf)
2011-06-07 07:19 UTC, Ken Sharp
Details
patch (443.48 KB, patch)
2011-06-10 04:27 UTC, Alex Cherepanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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