Skip to content

neverabsolute/pdffonts-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDFFont Python Wrapper

This is a Python wrapper for the PDFFonts command line tool, which provides functionality for working with PDF fonts. The wrapper allows you to quickly list out the fonts in a PDF file along with their properties, such as font name, type, and encoding.

Installation

To install the PDFFonts Python wrapper, you can use pip:

pip install pdffonts-python

Usage

from pdffonts_python import PDFFonts

# Create an instance of PDFFonts
pdffonts = PDFFonts()

# List fonts in a PDF file
fonts = pdffonts.get_pdf_fonts("example.pdf")
print(fonts)

Example Output

[
  {
    "name": "AAAAAJ+Connections_Medium_CZEX0A80",
    "type": "Type 1C",
    "encoding": "Custom",
    "embedded": "yes",
    "subset": "yes",
    "unicode": "yes",
    "object": "12",
    "id": "0"
  },
  {
    "name": "AAAAAH+ConnectionsIta_CZEX0AC0",
    "type": "Type 1C",
    "encoding": "Custom",
    "embedded": "yes",
    "subset": "yes",
    "unicode": "yes",
    "object": "23",
    "id": "0"
  }
]

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

PDFFonts python wrapper

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages