wxPdfDocument Logo

wxPdfDocument

wxPdfDocument is a C++ class that allows wxWidgets applications to generate PDF files. The project was started as a port of the freely available PHP class FPDF (Free PDF) using the wxWidgets library. Several extension scripts found on the FPDF web pages have been incorporated. In the meantime, several extensions have been added that are not found in FPDF, including support for OpenType fonts, kerning, and layers. wxPdfDocument does not rely on libraries such as PDFlib or ClibPDF, which are subject to fees, at least for commercial use. wxPdfDocument is licensed under the wxWidgets (formerly wxWindows) license. This means that the component can also be used free of charge in commercial applications and modified according to the user’s needs. Current and future development is and will continue to be strongly influenced by the well-known Java PDF library iText.

license

Latest wxPdfDocument version is the latest version. The API documentation can be viewed online. The component itself is hosted on GitHub:

wxPdfDocument - Generation of PDF documents from wxWidgets applications

C++ 81 32

Features

The most important features of wxPdfDocument are:

  • Choice of unit, page format, and page margins
  • Management of page headers and footers
  • Automatic page breaks
  • Automatic line breaks and text alignment
  • Support for various graphic formats (GIF, JPEG, PNG, and WMF)
  • Colors
  • Links
  • 14 Adobe standard fonts
  • TrueType and Type1 fonts (with or without embedding) and support for various character set encodings
  • TrueType Unicode, OpenType Unicode, and Type0 fonts (for Chinese, Japanese, and Korean) in the Unicode version
  • Page compression
  • Graphics operations for creating simple drawings
  • Definition of area boundaries
  • Creation of an outline view
  • Rotations
  • Password protection and/or access rights management for documents

This class can be used to create documents in many languages: Western European, Central European, Cyrillic, Greek, Baltic, and Thai, provided that TrueType or Type1 fonts with the required character sets are available. Chinese, Japanese, and Korean are also supported in Unicode mode.

Examples

The following examples illustrate the PDF generation capabilities offered by wxPdfDocument:

History

A detailed version history can be found in the change log.

0%