Skip to main content

Merge PDF files with bookmarks

Project description

pdfmb

Merge PDF files with bookmarks.

folders outline

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 add and add_from_folder functions create a new PDF at the same location with a timestamp

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdfmb-0.0.6-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

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

Hashes for pdfmb-0.0.6.tar.gz
Algorithm Hash digest
SHA256 e01f9ade0d8e988d32e8c42e38a7f4f4d586fb552b41e535bec0844cd7e656e6
MD5 4d2cb5d2c64ad63c3f0e0edf2b190266
BLAKE2b-256 6a1ad6ed73edf34f5fc11c3d7450fd4f258045984c2df9d88be72c117163edd5

See more details on using hashes here.

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

Hashes for pdfmb-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0b2aedccb285678758c81f5bd6ecc7466d86e41a71d367d839db5452b5b88d61
MD5 090c6d466748ef3b910263fa95e2b5ca
BLAKE2b-256 ebff6714f0fb656aebf2fea563742c96c420bc1be51c38aea3091b69faec26db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page