Skip to main content

Stitch together a PDF file from multiple sources in a declarative manner

Project description

pystitcher stitches your PDF files together, generating nice customizable bookmarks for you using a declarative input in the form of a markdown file. It is written in pure python and uses PyPDF3 for reading and writing PDF files.

Description

Given this input:

existing_bookmarks: flatten
title: Complete Guide to the Personal Data Protection Bill
author: Medianama
keywords: privacy, surveillance, personal data protection
subject: Personal Data Protection Bill
# A Complete Guide to the Personal Data Protection Bill

- [Cover](cover.pdf)

# The Bills

- [Personal Data Protection Bill, 2019](1.a.pdf)
- [Personal Data Protection Bill, 2018](1.b.pdf)

# Other key reading material

- [Srikrishna Committee Report](2.a.pdf)
- [Dvara Research's Personal Data Protection Bill](2.b.pdf)
- [MP Shashi Tharoor's Data Protection Bill](2.c.pdf)
- [MP Jay Panda's Data Protection Bill](2.d.pdf)
- [SaveOurPrivacy.in bill](2.e.pdf)
- [TRAI recommendations on privacy](2.f1.pdf)
- [Comments on TRAI recommendations on privacy](2.f2.pdf)

Will generate a PDF with proper bookmarks:

https://i.imgur.com/qPVpZGt.png

And the correct metadata:

Title:          Complete Guide to the Personal Data Protection Bill
Subject:        Personal Data Protection Bill
Keywords:       privacy, surveillance, personal data protection
Author:         Medianama
Creator:        pystitcher/1.0.0
Producer:       pystitcher/1.0.0

Configuration options can be specified with Meta data at the top of the file.

Option

Notes

fit

Default fit of the bookmark. Can be overwritten per bookmark See wiki for more details.

author

PDF Author

keywords

PDF Keywords

subject

PDF Subject

title

PDF Title. If left unspecified, first Heading (h1) in the document is used.

existing_bookmarks

What to do with existing bookmarks in individual files. Options are keep, flatten, and remove. See docs for more details.

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

pystitcher-1.0.0.zip (88.4 kB view details)

Uploaded Source

File details

Details for the file pystitcher-1.0.0.zip.

File metadata

  • Download URL: pystitcher-1.0.0.zip
  • Upload date:
  • Size: 88.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for pystitcher-1.0.0.zip
Algorithm Hash digest
SHA256 775ae35ebcb58d7d964093e771691422e04d00908af102ef9f7e44a0ec9618cb
MD5 8e2a04a58623a2583de8369141a7309e
BLAKE2b-256 d3a104dcd3d4f95a253300d3925ca747b1f7ed65698756ddddd3e449ffd0e2e3

See more details on using hashes here.

Supported by

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