galkahana/PDF-Writer
FreeHigh performance library for creating, modiyfing and parsing PDF files in C++
FreeFree tier
About galkahana/PDF-Writer
PDF-Writer (also known as PDFHummus) is a fast, free, and open-source C++ library for creating, parsing, and manipulating PDF files and streams. It supports cross-platform builds with CMake on Windows, Linux, and macOS, and can optionally handle PDF 2.0 encryption via OpenSSL. The library includes bundled dependencies for Zlib, LibTiff, LibJpeg, LibPng, and FreeType, and offers flexible build options to exclude specific image formats. Developers can integrate it via CMake FetchContent, find_package, or by copying source files. The project includes a comprehensive test suite and a separate Node.js wrapper.
Key Features
Create, parse, and manipulate PDF files and streams
Cross-platform build with CMake (Windows, Linux, macOS)
Optional PDF 2.0 encryption via OpenSSL
Support for JPEG, TIFF, and PNG images with bundled dependencies
FreeType font rendering support
Bundled dependencies (Zlib, LibJpeg, LibPng, LibTiff, FreeType, LibAesgm)
Comprehensive test suite with ctest
Node.js wrapper available for JavaScript integration
Apache 2.0 open source license
Pros & Cons
Pros
- Fast performance with C++ native implementation
- Free and open source with permissive Apache 2.0 license
- Cross-platform support (Windows, Linux, macOS)
- Comprehensive format support (multiple image types, fonts)
- Optional bundled dependencies simplify build setup
- Active maintenance with test suite and fuzzing harness
- Flexible integration methods (CMake FetchContent, find_package, copy sources)
Cons
- C++ only library requiring a C++ development environment
- No GUI or high-level scripting interface
- Encryption requires optional OpenSSL dependency
- Learning curve for those unfamiliar with PDF specification
- Limited to PDF creation and manipulation; no PDF rendering/viewing functionality
Best For
Generate PDF documents programmatically in C++Parse and modify existing PDF filesEmbed images and fonts in PDF outputsCreate PDF streams for server-side generationAdd PDF encryption for secure document distributionBuild PDF manipulation tools and utilities
FAQ
What is PDF-Writer?
PDF-Writer (also known as PDFHummus) is a fast, free, open-source C++ library for creating, parsing, and manipulating PDF files and streams.
How do I build PDF-Writer?
Use CMake: create a build directory, run cmake .., then cmake --build . --config Release. Tests can be run with ctest --test-dir . -C Release.
How can I use PDF-Writer in my project?
The recommended method is CMake FetchContent. Alternatively, use find_package or copy the source folders directly into your project.
What dependencies does PDF-Writer require?
Required: a C++ compiler (Visual Studio, GCC, Clang) and CMake. Optional: OpenSSL for PDF 2.0 encryption. Bundled dependencies are available for Zlib, LibTiff, LibJpeg, LibPng, FreeType, and LibAesgm.
What license is PDF-Writer under?
PDF-Writer is licensed under the Apache License 2.0.