Metadata-Version: 2.4
Name: comicbox-pdffile
Version: 0.4.1
Summary: A ZipFile like API for PyMuPDF
Keywords: pdf,zipfile
Author: AJ Slater
Author-email: AJ Slater <aj@slater.net>
License-Expression: GPL-3.0-only
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Dist: filetype~=1.2
Requires-Dist: pymupdf~=1.24
Requires-Dist: python-dateutil~=2.9
Requires-Dist: typing-extensions~=4.13
Requires-Python: >=3.10, <4.0
Project-URL: News, https://github.com/ajslater/comicbox-pdffile
Project-URL: Documentation, https://pdffile.readthedocs.io/
Project-URL: Issues, https://github.com/ajslater/comicbox-pdffile/issues
Project-URL: Source, https://github.com/ajslater/comicbox-pdffile
Description-Content-Type: text/markdown

# PDFFile

A ZipFile like API for PDFs using [PyMuPDF](https://pymupdf.readthedocs.io/) as
a backend.

## 📜 News

PDFFile has a [NEWS file](NEWS.md) to summarize changes that affect users.

## 🕸️ HTML Docs

[HTML formatted docs are available here](https://pdffile.readthedocs.io)

## 📦 Dependencies

The pymupdf dependency usually has wheels that install a local version of
libmupdf. But for some platforms (e.g. Windows) it may require libstdc++ and
c/c++ build tools installed to compile a libmupdf. More detail on this is
available in the
[pymupdf docs](https://pymupdf.readthedocs.io/en/latest/installation.html#installation-when-a-suitable-wheel-is-not-available).

## 🧶 Data Types

MuPDF reads and writes all data types as strings. PDFFile automatically converts
pdf date strings to python datetimes and pdf/xml boolean strings to python bools
and back.

The helper functions to_datetime, to_pdf_date, to_bool, and to_xml_bool are
available on the PDFFile class.

#### Installing on Linux on ARM (AARCH64) with Python 3.13

Pymupdf has no pre-built wheels for AARCH64 so pip must build it and the build
fails on Python 3.13 without this environment variable set:

```sh
PYMUPDF_SETUP_PY_LIMITED_API=0 pip install comicbox-pdffile
```

You will also have to have the `build-essential` and `python3-dev` or equivalent
packages installed on on your Linux.

## 🛠️ API

Attached to these docs in the navigation header there are some auto generated
API docs that might be better than nothing. But the code is really small and
shouldn't be difficult to interpret.

## 🛠 Development

PDFfile code is hosted at [Github](https://github.com/ajslater/pdffile)
