PDFio is a simple C library for reading and writing PDF files.
Go to file
Michael R Sweet 53967552df
Add some documentation on the code128 example.
Clean up the code128 code a bit and use the Helvetica font for the text.

Add support for writing to a PDF file on the command-line vs. just doing
redirection.
2024-12-15 22:52:03 -05:00
.github Add Windows test script. 2024-06-28 19:00:51 -04:00
afl-input Fix AFL target, remove excess PDF test files. 2021-11-30 08:13:41 -05:00
doc Add some documentation on the code128 example. 2024-12-15 22:52:03 -05:00
examples Add some documentation on the code128 example. 2024-12-15 22:52:03 -05:00
pdfio.xcodeproj Bump version and put PDFIO_VERSION definition in the pdfio.h header. 2023-10-06 14:38:38 -04:00
testfiles Add ProPhotoRGB ICC profile. 2021-06-10 11:56:01 -04:00
.cppcheck Update Cppcheck exclusions. 2021-06-04 11:03:15 -04:00
.gitattributes Don't include AFL files in source archives. 2021-11-30 08:46:43 -05:00
.gitignore Save work on markdown formatting example code. 2024-12-10 16:35:12 -05:00
afl-pdf.dict Add AFL++ PDF dictionary. 2021-11-29 18:47:04 -05:00
CHANGES.md Add support for measuring base fonts (Issue #84) 2024-12-13 17:39:16 -05:00
CODE_OF_CONDUCT.md Add some supporting documentation files. 2021-09-27 07:42:19 -04:00
config.guess Adopt autoconf (Issue #54) 2023-12-03 19:16:34 -05:00
config.sub Adopt autoconf (Issue #54) 2023-12-03 19:16:34 -05:00
configure Start v1.4.0. 2024-10-25 17:17:38 -04:00
configure.ac Start v1.4.0. 2024-10-25 17:17:38 -04:00
CONTRIBUTING.md Update CONTRIBUTING docos. 2023-12-05 14:07:52 -05:00
EXAMPLES.md Save work on markdown formatting example code. 2024-12-10 16:35:12 -05:00
install-sh Adopt autoconf (Issue #54) 2023-12-03 19:16:34 -05:00
LICENSE Initial checkin. 2021-04-10 08:00:52 -04:00
Makefile.in Drop cert.py from cppcheck invocation. 2024-12-10 08:24:47 -05:00
makesrcdist Bump version in other files, update makesrcdist to support checking. 2024-06-24 07:28:54 -04:00
NOTICE Prep for 1.2.0 release, bump copyright. 2024-01-24 10:53:53 -05:00
packages.config Add initial Nuget packaging files. 2021-07-30 20:33:21 -04:00
pdfio1.def Update Windows DLL exports. 2024-10-25 17:57:17 -04:00
pdfio_native.nuspec Bump version to 1.3.2. 2024-08-09 10:55:32 -04:00
pdfio_native.props Update NuGet package info. 2021-09-01 17:09:05 -04:00
pdfio_native.redist.nuspec Bump version to 1.3.2. 2024-08-09 10:55:32 -04:00
pdfio-aes.c Documentation cleanup. 2023-12-05 13:49:58 -05:00
pdfio-array.c Add pdfioDictGetKey and pdfioDictGetNumPairs APIs (Issue #63) 2024-10-25 17:48:19 -04:00
pdfio-base-font-widths.h Fix name of ZapfDingbats. 2024-12-15 11:27:18 -05:00
pdfio-common.c Fix locale support (Issue #61) 2024-01-27 18:22:16 -05:00
pdfio-content.c Fix name of ZapfDingbats. 2024-12-15 11:27:18 -05:00
pdfio-content.h Bring back mis-named pdfioContentTextNextLine. 2023-12-05 13:33:07 -05:00
pdfio-crypto.c Fix whitespace. 2023-12-18 10:04:24 -05:00
pdfio-dict.c Add pdfioDictGetKey and pdfioDictGetNumPairs APIs (Issue #63) 2024-10-25 17:48:19 -04:00
pdfio-file.c Fix reading PDF files whose trailer is missing a newline (Issue #80) 2024-12-08 19:14:58 -05:00
pdfio-md5.c Fix warnings, update Xcode project. 2021-10-08 14:08:07 -04:00
pdfio-object.c Add pdfioDictGetKey and pdfioDictGetNumPairs APIs (Issue #63) 2024-10-25 17:48:19 -04:00
pdfio-page.c Documentation cleanup. 2023-12-05 13:49:58 -05:00
pdfio-private.h Add pdfioDictGetKey and pdfioDictGetNumPairs APIs (Issue #63) 2024-10-25 17:48:19 -04:00
pdfio-rc4.c Update crypto callback to return the number of output bytes (to account for AES 2021-10-23 14:37:25 -04:00
pdfio-sha256.c Fix build error due to mismatched function declarations. 2023-03-20 08:19:31 -04:00
pdfio-stream.c Make sure memory is freed on error conditions. 2024-10-09 15:32:48 -04:00
pdfio-string.c Switch string pool code to an insertion sort - provides a modest 25% improvement 2024-01-27 20:58:50 -05:00
pdfio-token.c Add some more debug printfs, relocate extra newline detection after stream 2023-12-15 12:57:31 -05:00
pdfio-value.c Add NULL checks in the private debug APIs that testpdfio calls. 2024-08-21 09:22:58 -04:00
pdfio.h Add pdfioDictGetKey and pdfioDictGetNumPairs APIs (Issue #63) 2024-10-25 17:48:19 -04:00
pdfio.pc.in pdfio.pc: use -lm as specified in configure 2023-12-10 16:32:52 -05:00
pdfio.sln Add testpdfio target for MSVC. 2021-07-26 11:58:20 -04:00
pdfio.vcxproj Bump version and put PDFIO_VERSION definition in the pdfio.h header. 2023-10-06 14:38:38 -04:00
pdfio.vcxproj.filters Fix Windows builds. 2021-10-26 07:12:41 -04:00
pdfio.vcxproj.user Initial Visual Studio support. 2021-06-21 11:39:06 -04:00
pdfiototext.c Fix pdfioStreamGetToken implementation (wasn't flushing input), update 2022-03-01 09:18:56 -05:00
README.md Prep for 1.2.0 release, bump copyright. 2024-01-24 10:53:53 -05:00
runtests.bat Add Windows test script. 2024-06-28 19:00:51 -04:00
SECURITY.md Prep for 1.2.0 release, bump copyright. 2024-01-24 10:53:53 -05:00
testpdfio.c Add --password option to PDFio test program. 2024-08-19 17:12:16 -04:00
testpdfio.vcxproj Add initial Nuget packaging files. 2021-07-30 20:33:21 -04:00
testpdfio.vcxproj.filters Add testpdfio target for MSVC. 2021-07-26 11:58:20 -04:00
testpdfio.vcxproj.user Add testpdfio target for MSVC. 2021-07-26 11:58:20 -04:00
testttf.c Merge TTF v1.0.0 source files. 2024-08-19 16:59:00 -04:00
ttf.c Make sure memory is freed on error conditions. 2024-10-09 15:32:48 -04:00
ttf.h Fixed compilation error MSVC 19.16.27039.0 32 bit 2024-12-08 22:56:25 +03:00

pdfio - PDF Read/Write Library

Version Apache 2.0 Build Status Coverity Scan Status

PDFio is a simple C library for reading and writing PDF files. The primary goals of PDFio are:

  • Read and write any version of PDF file
  • Provide access to pages, objects, and streams within a PDF file
  • Support reading and writing of encrypted PDF files
  • Extract or embed useful metadata (author, creator, page information, etc.)
  • "Filter" PDF files, for example to extract a range of pages or to embed fonts that are missing from a PDF
  • Provide access to objects used for each page

PDFio is not concerned with rendering or viewing a PDF file, although a PDF RIP or viewer could be written using it.

Requirements

PDFio requires the following to build the software:

  • A C99 compiler such as Clang, GCC, or MS Visual C
  • A POSIX-compliant make program
  • ZLIB (https://www.zlib.net) 1.1 or higher

IDE files for Xcode (macOS/iOS) and Visual Studio (Windows) are also provided.

Documentation

See the man page (pdfio.3) and full HTML documentation (pdfio.html) for information on using PDFio.

Installing PDFio

PDFio uses a configure script on Unix systems to generate a makefile:

./configure

If you want a shared library, run:

./configure --enable-shared

The default installation location is "/usr/local". Pass the --prefix option to make to install it to another location:

./configure --prefix=/some/other/directory

Once configured, run the following to make the library:

make all

To test it, run:

make test

To install it, run:

sudo make install

Visual Studio Project

The Visual Studio solution ("pdfio.sln") is provided for Windows developers and generates the PDFIO1 DLL. You can also use NuGet to install the pdfio_native package.

Xcode Project

There is also an Xcode project ("pdfio.xcodeproj") you can use on macOS which generates a static library that will be installed under "/usr/local" with:

sudo xcodebuild install

PDFio is Copyright © 2021-2024 by Michael R Sweet.

This software is licensed under the Apache License Version 2.0 with an (optional) exception to allow linking against GPL2/LGPL2 software. See the files "LICENSE" and "NOTICE" for more information.