Analyzing PDF Font Properties with PDFium VCL in Delphi

Understanding the fonts used in a PDF document is essential for quality control, accessibility compliance, and document forensics. The Font Properties demo shows how to access detailed font information for characters in a PDF using PDFium VCL.

Overview

This demo allows you to click on any character in a PDF and view its font properties including family name, weight, style, size, and whether the font is embedded. It’s invaluable for PDF analysis and troubleshooting.

Key Features

  • Interactive Selection – Click on any character to analyze it
  • Font Family Name – The font family (e.g., “Arial”, “Times New Roman”)
  • Font Base Name – The internal PDF font name
  • Font Weight – Numeric weight (400 = normal, 700 = bold)
  • Font Size – Size in points
  • Italic Angle – Slant angle for italic fonts
  • Ascent/Descent – Vertical metrics
  • Embedded Status – Whether the font is embedded in the PDF
  • Font Data – Access raw font data if embedded

PDFium DLL Requirements

Before running any PDFium VCL application, ensure the PDFium DLL files are installed:

  • pdfium32.dll / pdfium64.dll – Standard versions (~5-6 MB)
  • pdfium32v8.dll / pdfium64v8.dll – With V8 JavaScript engine (~23-27 MB)

Installation: Run PDFiumVCL\DLLs\CopyDlls.bat as Administrator to automatically copy the DLLs to Windows system directories.

Accessing Font Properties

Click to Analyze Character

Manual Character Index Input

Font Properties Available

PDFium VCL exposes these font-related properties:

Using Font Properties for Analysis

Checking Font Embedding

Extracting Embedded Font Data

Understanding Font Weight Values

Weight Value Common Name
100 Thin
200 Extra Light
300 Light
400 Normal/Regular
500 Medium
600 Semi Bold
700 Bold
800 Extra Bold
900 Black

Use Cases

  • Quality Control – Verify correct fonts are used in documents
  • Accessibility – Check fonts meet accessibility requirements
  • Forensic Analysis – Analyze document origins and modifications
  • Print Preflight – Verify font embedding before production
  • Font Inventory – Catalog fonts used across documents

Conclusion

The Font Properties demo shows how PDFium VCL provides deep access to font information in PDF documents. Whether you’re checking font embedding for print production or analyzing document typography, these APIs give you the tools you need.

The ability to click on any character and instantly see its font properties makes PDF analysis intuitive and efficient.

Explore PDF fonts in depth with PDFium Delphi VCL Component.