Poppler:pdffonts の使い方

TOP > Poppler ツール > *


1285

機能

PDF のフォントを解析します。結果は標準出力(画面)に表示されます。

Pdffonts は各フォントのためのさまざまな情報と共にPDFファイルで使用されているフォントを一覧表示します。

Help の内容

001 >pdffonts -h 002 pdffonts version 0.45.0 003 Copyright 2005-2016 The Poppler Developers - http://poppler.freedesktop.org 004 Copyright 1996-2011 Glyph & Cog, LLC 005 Usage: pdffonts [options] <PDF-file> 006 -f <int> : first page to examine 007 -l <int> : last page to examine 008 -subst : show font substitutions 009 -opw <string> : owner password (for encrypted files) 010 -upw <string> : user password (for encrypted files) 011 -v : print copyright and version info 012 -h : print usage information 013 -help : print usage information 014 --help : print usage information 015 -? : print usage information


 Highlight:プログラミング言語のソースコードを構文で色分け (GUI編)
 

形式

pdffonts  [options]  [PDF-file]

  • options : オプション。複数の組み合わせ可能。
  • PDF-file : 入力のPDFファイル名

各区切りは1つ以上の半角の空白です。

実行結果のサンプル

input.pdf のフォントを解析して結果を画面に表示しました。

001 >pdffonts input.pdf 002 Syntax Error: Couldn't find a font for 'Times-Roman', subst is 'Helvetica' 003 Syntax Error: Couldn't find a font for 'Helvetica-Bold', subst is 'Helvetica' 004 Syntax Error: Couldn't find a font for 'Helvetica-Oblique', subst is 'Helvetica' 005 Syntax Error: Couldn't find a font for 'Helvetica-BoldOblique', subst is 'Helvetica' 006 Syntax Error: Couldn't find a font for 'Times-Bold', subst is 'Helvetica' 007 Syntax Error: Couldn't find a font for 'Times-Italic', subst is 'Helvetica' 008 Syntax Error: Couldn't find a font for 'Times-BoldItalic', subst is 'Helvetica' 009 Syntax Error: Couldn't find a font for 'Courier', subst is 'Helvetica' 010 Syntax Error: Couldn't find a font for 'Courier-Bold', subst is 'Helvetica' 011 Syntax Error: Couldn't find a font for 'Courier-Oblique', subst is 'Helvetica' 012 Syntax Error: Couldn't find a font for 'Courier-BoldOblique', subst is 'Helvetica' 013 Syntax Error: Couldn't find a font for 'Helvetica', subst is 'Helvetica' 014 name type encoding emb sub uni object ID 015 ------------------------------------ ----------------- ---------------- --- --- --- --------- 016 TimesNewRomanPS-BoldMT TrueType WinAnsi no no no 99 0 017 Times-Roman Type 1 WinAnsi no no no 113 0 018 Helvetica-Bold Type 1 WinAnsi no no no 111 0 019 Helvetica-Oblique Type 1 WinAnsi no no no 112 0 020 Helvetica-BoldOblique Type 1 WinAnsi no no no 110 0 021 SymbolMT TrueType WinAnsi no no no 114 0 022 ArialMT TrueType WinAnsi no no no 115 0 023 Arial-BoldMT TrueType WinAnsi no no no 116 0 024 Arial-ItalicMT TrueType WinAnsi no no no 117 0 025 Arial-BoldItalicMT TrueType WinAnsi no no no 109 0 026 Times-Bold Type 1 WinAnsi no no no 101 0 027 Times-Italic Type 1 WinAnsi no no no 108 0 028 Times-BoldItalic Type 1 WinAnsi no no no 104 0 029 Courier Type 1 WinAnsi no no no 106 0 030 Courier-Bold Type 1 WinAnsi no no no 103 0 031 Courier-Oblique Type 1 WinAnsi no no no 105 0 032 Courier-BoldOblique Type 1 WinAnsi no no no 102 0 033 Helvetica Type 1 WinAnsi no no no 107 0


 Highlight:プログラミング言語のソースコードを構文で色分け (GUI編)
 

上記の各フォント一覧に以下の情報が表示されます。

  • name : フォント名
    フォント名はPDFファイルで正確に指定されてます。
    (潜在的サブセットの接頭辞を含む)   
  • type : 種類
    フォントの種類。   
  • encoding : エンコーディング
    フォントのエンコーディングのタイプ。   
  • emb : 埋め込み
    "yes" はフォントがPDFファイルに埋め込まれている場合です。   
  • sub : サブセット
    "yes" はフォントがサブセットである場合です。   
  • uni : ユニコード
    "yes" はPDFファイル内で明示的なToUnicodeマップが存在する場合です。
    (ToUnicodeマップの不在は必ずしもテキストをUnicodeに変換することができないことを意味するものではありません。)   
  • object ID : オブジェクトID
    フォント辞書のオブジェクトID。 (番号と世代)     

種類のフォント

PDFファイルは以下の種類のフォントを含めることができます。

  • Type 1
  • Type 1C -- aka Compact Font Format (CFF)
  • Type 3
  • TrueType
  • CID Type 0 -- 16-bit font with no specified type
  • CID Type 0C -- 16-bit PostScript CFF font
  • CID TrueType -- 16-bit TrueType font

Options

各オプションはオプション文字列の前にハイフン「-」、そしてオプション名です。更に値が続く場合は1つ以上の半角の空白を入れてから、値を入れます。複数のオプションを連続で入れる時も1つ以上の半角の空白を入れます。

例:

-f  1  -l  10

-f number

解析対象にするPDFの最初のページ番号を指定します。

-l number

解析対象にするPDFの最後のページ番号を指定します。

-subst

非埋め込みフォントに使用する poppler 代替フォントを一覧表示します。

例:

001 >pdffonts -subst input.pdf 002 Syntax Error: Couldn't find a font for 'Times-Roman', subst is 'Helvetica' 003 Syntax Error: Couldn't find a font for 'Helvetica-Bold', subst is 'Helvetica' 004 Syntax Error: Couldn't find a font for 'Helvetica-Oblique', subst is 'Helvetica' 005 Syntax Error: Couldn't find a font for 'Helvetica-BoldOblique', subst is 'Helvetica' 006 Syntax Error: Couldn't find a font for 'Times-Bold', subst is 'Helvetica' 007 Syntax Error: Couldn't find a font for 'Times-Italic', subst is 'Helvetica' 008 Syntax Error: Couldn't find a font for 'Times-BoldItalic', subst is 'Helvetica' 009 Syntax Error: Couldn't find a font for 'Courier', subst is 'Helvetica' 010 Syntax Error: Couldn't find a font for 'Courier-Bold', subst is 'Helvetica' 011 Syntax Error: Couldn't find a font for 'Courier-Oblique', subst is 'Helvetica' 012 Syntax Error: Couldn't find a font for 'Courier-BoldOblique', subst is 'Helvetica' 013 Syntax Error: Couldn't find a font for 'Helvetica', subst is 'Helvetica' 014 name object ID substitute font substitute font file 015 ------------------------------------ --------- ------------------------------------ ------------------------------------ 016 TimesNewRomanPS-BoldMT 99 0 [none] C:\WINDOWS\Fonts\timesbd.ttf 017 Times-Roman 113 0 C:\WINDOWS\Fonts\arial.ttf C:\WINDOWS\Fonts\arial.ttf 018 Helvetica-Bold 111 0 C:\WINDOWS\Fonts\arial.ttf C:\WINDOWS\Fonts\arial.ttf 019 Helvetica-Oblique 112 0 C:\WINDOWS\Fonts\arial.ttf C:\WINDOWS\Fonts\arial.ttf 020 Helvetica-BoldOblique 110 0 C:\WINDOWS\Fonts\arial.ttf C:\WINDOWS\Fonts\arial.ttf 021 SymbolMT 114 0 [none] C:\WINDOWS\Fonts\symbol.ttf 022 ArialMT 115 0 [none] C:\WINDOWS\Fonts\arial.ttf 023 Arial-BoldMT 116 0 [none] C:\WINDOWS\Fonts\arialbd.ttf 024 Arial-ItalicMT 117 0 [none] C:\WINDOWS\Fonts\ariali.ttf 025 Arial-BoldItalicMT 109 0 [none] C:\WINDOWS\Fonts\arialbi.ttf 026 Times-Bold 101 0 C:\WINDOWS\Fonts\arial.ttf C:\WINDOWS\Fonts\arial.ttf 027 Times-Italic 108 0 C:\WINDOWS\Fonts\arial.ttf C:\WINDOWS\Fonts\arial.ttf 028 Times-BoldItalic 104 0 C:\WINDOWS\Fonts\arial.ttf C:\WINDOWS\Fonts\arial.ttf 029 Courier 106 0 C:\WINDOWS\Fonts\arial.ttf C:\WINDOWS\Fonts\arial.ttf 030 Courier-Bold 103 0 C:\WINDOWS\Fonts\arial.ttf C:\WINDOWS\Fonts\arial.ttf 031 Courier-Oblique 105 0 C:\WINDOWS\Fonts\arial.ttf C:\WINDOWS\Fonts\arial.ttf 032 Courier-BoldOblique 102 0 C:\WINDOWS\Fonts\arial.ttf C:\WINDOWS\Fonts\arial.ttf 033 Helvetica 107 0 C:\WINDOWS\Fonts\arial.ttf C:\WINDOWS\Fonts\arial.ttf


 Highlight:プログラミング言語のソースコードを構文で色分け (GUI編)
 

-opw password

PDF ファイルのオーナーパスワードを指定します。

-upw password

ユーザーパスワードを指定します。

-v

著作権とバージョン情報を表示します。

-h , -help , --help

使い方の情報を表示します。

終了コード

pdffonts ツールは次の終了コードを返します。

  • 0 : エラー無し
  • 1 : 入力PDFファイルを開く時にエラーが発生した
  • 2 : 出力ファイルを開く時にエラーが発生した
  • 3 : 入力PDFファイルのアクセス権に関連するエラーが発生した
  • 99 : その他のエラー

VBA関数からの起動

以下のVBA関数を利用してPoppler の pdffonts.exe をコマンドライン起動できます。 

動作確認の環境

  • Windows 10 64bit Pro
  • Microsoft Office 2007 Excel 32bit

< Poppler へ戻る >

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA


★ 文章での質問は難しいですよネ。でも、早く解決して、家に帰りたい。


SAMURAI Plugin

コメントをする時は出来れば以下もお願いします。

  • OS名 バージョン
  • Acrobat バージョン
  • ツール(Excel等) バージョン
コメントにサンプルコードを入れる時はコードを全て全角文字列にしてください。コチラで半角に戻します。それでもエラーが回避できない時はコメント下さい。個別に対処します。



お仕事で当サイトを見ている方へ
考え込んだら、ご質問下さい。
一緒に解決策を考えましょう。

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください