PHP: How to tell if PDF has embedded fonts?
Given a PDF document, is there a way to tell if it has embedded fonts? I'm working on the problem posted 开发者_如何学JAVAhere: PDF: How to Optimize Filesize & Convert to PNG (embedded fonts problem). Perhaps I can rework some of my application's logic based on whether a PDF has embedded fonts or not.
Use pdffonts
(*nix) or pdffonts.exe
(*doz). They are part of XPDF.
To see which fonts are used (not necessarily embedded!) on pages 4-6 of a PDF:
pdffonts ^ -f 4 ^ -l 6 ^ input.pdf
To get a list of all fonts used in a PDF, simply skip the
-f 4 -l 6
part...Now to differentiate between embedded and non-embedded fonts, learn...
(a) ...the general meaning of the
yes
andno
keywords, and
(b) ...how to interprete these keywords in the context of a list column carrying the headingemb
精彩评论