Merge PDF files with bookmarks
Project description
pdfmb
Merge PDF files with bookmarks.
All the work is done by the excellent library pikepdf.
Installation
You can install this package via pip.
pip install pdfmb
Features
- merge PDFs from a list into a new pdf
- add PDFs from a list to an existing pdf
- merge all PDFs from a folder into a new pdf
- add all PDFs from a folder to an existing pdf
- option to conserve or flatten the folder structure in the bookmark outline
- existing PDF files are not modified
- the
addandadd_from_folderfunctions create a new PDF at the same location with a timestamp
- the
Usage
from pathlib import Path
import pdfmb
pdfmb.merge(
pdfs_to_merge=Path("example pdfs").rglob("*.pdf"),
output_folder=Path("output"),
)
pdfmb.add(
pdfs_to_add=Path("example pdfs").rglob("*.pdf"),
existing_pdf=Path("example pdfs/file1.pdf"),
)
pdfmb.merge_from_folder(
source_folder=Path("example pdfs"),
output_folder=Path("output"),
)
pdfmb.add_from_folder(
source_folder=Path("example pdfs"),
existing_pdf=Path("example pdfs/file1.pdf"),
add_flat_hierachy=True,
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pdfmb-0.0.6.tar.gz
(3.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pdfmb-0.0.6-py3-none-any.whl
(4.7 kB
view details)
File details
Details for the file pdfmb-0.0.6.tar.gz.
File metadata
- Download URL: pdfmb-0.0.6.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e01f9ade0d8e988d32e8c42e38a7f4f4d586fb552b41e535bec0844cd7e656e6
|
|
| MD5 |
4d2cb5d2c64ad63c3f0e0edf2b190266
|
|
| BLAKE2b-256 |
6a1ad6ed73edf34f5fc11c3d7450fd4f258045984c2df9d88be72c117163edd5
|
File details
Details for the file pdfmb-0.0.6-py3-none-any.whl.
File metadata
- Download URL: pdfmb-0.0.6-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b2aedccb285678758c81f5bd6ecc7466d86e41a71d367d839db5452b5b88d61
|
|
| MD5 |
090c6d466748ef3b910263fa95e2b5ca
|
|
| BLAKE2b-256 |
ebff6714f0fb656aebf2fea563742c96c420bc1be51c38aea3091b69faec26db
|