LinuxCommandLibrary

pdffonts

List fonts used in a PDF file

TLDR

Print PDF file fonts information

$ pdffonts [path/to/file.pdf]
copy

Specify user password for PDF file to bypass security restrictions
$ pdffonts -upw [password] [path/to/file.pdf]
copy

Specify owner password for PDF file to bypass security restrictions
$ pdffonts -opw [password] [path/to/file.pdf]
copy

Print additional information on location of the font that will be used when the PDF file is rasterized
$ pdffonts -loc [path/to/file.pdf]
copy

Print additional information on location of the font that will be used when the PDF file is converted to PostScript
$ pdffonts -locPS [path/to/file.pdf]
copy

SYNOPSIS

pdffonts [options] [PDF-file]

PARAMETERS

-h
    Display help message.

-v
    Print copyright and version information.

-f
    First page to examine (default: 1).

-l
    Last page to examine (default: end of document).

-enc
    Output text encoding name.

-unicode
    Output unicode font names.

-raster
    Output raster font information.

-embedding
    Only list fonts that are embedded in the PDF.

-no-embedding
    Only list fonts that are not embedded in the PDF.

-form
    Include form fonts.

-no-form
    Do not include form fonts.

- إصلاح
    Perform various fixes to get more correct fonts.

-no-fix
    Disable fixes to get more correct fonts.

[PDF-file]
    The PDF file to analyze. If not specified, pdffonts reads from standard input.

DESCRIPTION

The `pdffonts` command is a command-line utility, part of the `poppler-utils` package, used to analyze PDF files and extract information about the fonts used within them. It provides details such as font name, type, encoding, whether the font is embedded or not, and the object ID associated with the font in the PDF. This tool is valuable for troubleshooting PDF rendering issues related to fonts, auditing font usage in documents, and ensuring font embedding compliance for archival purposes.

It helps determine if all necessary fonts are present to correctly display the PDF, especially important when transferring PDFs between systems or when dealing with specific character sets. `pdffonts` simplifies the identification and debugging of font-related problems, and is frequently used by PDF developers, system administrators, and users who need to examine PDF document structure.

OUTPUT INTERPRETATION

The output of `pdffonts` presents information in columns. Key columns include:
name: The font's PostScript name.
type: The font type (e.g., Type 1, TrueType, Type 3).
encoding: The font's encoding (e.g., WinAnsi, Identity-H).
emb: Indicates whether the font is embedded (yes/no).
sub: Indicates whether the font is subsetted (yes/no).
object ID: The internal PDF object ID representing the font.

EXIT CODES

pdffonts returns an exit code of 0 if successful, >0 if an error occurred.

SEE ALSO

Copied to clipboard