Skip to content

A small collection of tools for pdf files built upon FastAPI and PyMuPDF with Docker

License

Notifications You must be signed in to change notification settings

lukasstorck/py-pdf-tools

Repository files navigation

Py PDF Tools

A small collection of tools for pdf files built upon PyMuPDF. A docker stack runs a web server which provides a front-end for the user to upload files and select the desired tasks. It also provides an API which handles and processes the requested tasks. It is also possible to use the tool locally via the command line python pdf_tools_cli.py -h or by importing the core package.

Installation and Usage

Clone the repository

git clone https://github.com/lukasstorck/pdf-tools.git
cd pdf-tools

Download, build and run the docker stack

docker compose up -d

Open the browser on localhost:8080 or whatever port you choose in the docker configuration.

Bookmark Editor

Bookmark editing is currently not included in the server, but can be accessed via the command line interface.

Extract the bookmark (outline) from a pdf file into .json with labels and linked page numbers. This can then be edited and then recombined into a new pdf file with updated bookmarks (outline).

Example:

python pdf_tools_cli.py path/to/file/or/folder.pdf -a edit_bookmarks
# edit the .json file
python pdf_tools_cli.py path/to/file/or/folder.pdf -a edit_bookmarks save

Dependencies

Install with pip install fastapi uvicorn PyMuPDF python-multipart (not needed when used with docker)

License

This software must be released under the GNU AGPLv3 license due to PyMuPDF's license. The .gitignore was created with gitignore.io. The icon .svg was provided by SVG Repo.

About

A small collection of tools for pdf files built upon FastAPI and PyMuPDF with Docker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published