pdfio/README.md

97 lines
2.7 KiB
Markdown
Raw Normal View History

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