开发者

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.

  1. To see which fonts are used (not necessarily embedded!) on pages 4-6 of a PDF:

    pdffonts ^
        -f 4 ^
        -l 6 ^
        input.pdf
    
  2. To get a list of all fonts used in a PDF, simply skip the -f 4 -l 6 part...

  3. Now to differentiate between embedded and non-embedded fonts, learn...

    (a) ...the general meaning of the yes and no keywords, and
    (b) ...how to interprete these keywords in the context of a list column carrying the heading emb

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜