2021-04-10 08:00:52 -04:00
|
|
|
pdfio - PDF Read/Write Library
|
|
|
|
==============================
|
|
|
|
|
2021-06-01 18:36:22 -04:00
|
|
|

|
|
|
|

|
2022-03-02 09:50:14 -05:00
|
|
|
[](https://github.com/michaelrsweet/pdfio/actions/workflows/build.yml)
|
2021-06-01 18:36:22 -04:00
|
|
|
[](https://scan.coverity.com/projects/michaelrsweet-pdfio)
|
|
|
|
|
2021-05-30 07:43:35 -04:00
|
|
|
PDFio is a simple C library for reading and writing PDF files. The primary
|
|
|
|
goals of PDFio are:
|
2021-04-10 08:00:52 -04:00
|
|
|
|
2021-05-30 10:22:56 -04:00
|
|
|
- Read and write any version of PDF file
|
|
|
|
- Provide access to pages, objects, and streams within a PDF file
|
2021-10-24 11:03:19 -04:00
|
|
|
- Support reading and writing of encrypted PDF files
|
2021-04-10 08:00:52 -04:00
|
|
|
- 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
|
|
|
|
|
2021-05-30 07:43:35 -04:00
|
|
|
PDFio is *not* concerned with rendering or viewing a PDF file, although a PDF
|
2021-04-10 08:00:52 -04:00
|
|
|
RIP or viewer could be written using it.
|
|
|
|
|
|
|
|
|
2021-05-02 09:59:51 -04:00
|
|
|
Requirements
|
|
|
|
------------
|
|
|
|
|
2021-05-30 07:43:35 -04:00
|
|
|
PDFio requires the following to build the software:
|
2021-05-02 09:59:51 -04:00
|
|
|
|
|
|
|
- A C99 compiler such as Clang, GCC, or MS Visual C
|
|
|
|
- A POSIX-compliant `make` program
|
2023-12-03 19:56:25 -05:00
|
|
|
- ZLIB (<https://www.zlib.net>) 1.1 or higher
|
2021-05-02 09:59:51 -04:00
|
|
|
|
|
|
|
IDE files for Xcode (macOS/iOS) and Visual Studio (Windows) are also provided.
|
|
|
|
|
|
|
|
|
|
|
|
Documentation
|
|
|
|
-------------
|
|
|
|
|
2023-12-03 19:56:25 -05:00
|
|
|
See the man page (`pdfio.3`) and full HTML documentation (`pdfio.html`) for
|
|
|
|
information on using PDFio.
|
2021-05-02 09:59:51 -04:00
|
|
|
|
|
|
|
|
2023-12-03 19:56:25 -05:00
|
|
|
Installing PDFio
|
2021-04-10 08:00:52 -04:00
|
|
|
----------------
|
|
|
|
|
2023-12-03 19:56:25 -05:00
|
|
|
PDFio uses a configure script on Unix systems to generate a makefile:
|
2021-04-10 08:00:52 -04:00
|
|
|
|
2023-12-03 19:56:25 -05:00
|
|
|
./configure
|
2021-04-10 08:00:52 -04:00
|
|
|
|
2023-12-03 19:56:25 -05:00
|
|
|
If you want a shared library, run:
|
2021-04-10 08:00:52 -04:00
|
|
|
|
2023-12-03 19:56:25 -05:00
|
|
|
./configure --enable-shared
|
2021-04-10 08:00:52 -04:00
|
|
|
|
2023-12-03 19:56:25 -05:00
|
|
|
The default installation location is "/usr/local". Pass the `--prefix` option
|
|
|
|
to make to install it to another location:
|
2021-04-10 08:00:52 -04:00
|
|
|
|
2023-12-03 19:56:25 -05:00
|
|
|
./configure --prefix=/some/other/directory
|
2021-04-10 08:00:52 -04:00
|
|
|
|
2023-12-03 19:56:25 -05:00
|
|
|
Once configured, run the following to make the library:
|
|
|
|
|
|
|
|
make all
|
2021-04-10 08:00:52 -04:00
|
|
|
|
2023-12-03 19:56:25 -05:00
|
|
|
To test it, run:
|
2021-04-10 08:00:52 -04:00
|
|
|
|
2023-12-03 19:56:25 -05:00
|
|
|
make test
|
2021-04-10 08:00:52 -04:00
|
|
|
|
2023-12-03 19:56:25 -05:00
|
|
|
To install it, run:
|
|
|
|
|
|
|
|
sudo make install
|
2021-04-10 08:00:52 -04:00
|
|
|
|
|
|
|
|
2021-05-02 09:59:51 -04:00
|
|
|
Visual Studio Project
|
|
|
|
---------------------
|
|
|
|
|
2021-06-07 17:06:13 -04:00
|
|
|
The Visual Studio solution ("pdfio.sln") is provided for Windows developers and
|
2021-09-27 08:11:53 -04:00
|
|
|
generates the PDFIO1 DLL. You can also use NuGet to install the `pdfio_native`
|
|
|
|
package.
|
2021-05-02 09:59:51 -04:00
|
|
|
|
|
|
|
|
2021-05-01 07:43:39 -04:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2021-04-10 08:00:52 -04:00
|
|
|
Legal Stuff
|
|
|
|
-----------
|
|
|
|
|
2024-01-24 10:53:53 -05:00
|
|
|
PDFio is Copyright © 2021-2024 by Michael R Sweet.
|
2021-04-10 08:00:52 -04:00
|
|
|
|
|
|
|
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.
|