Skip to main content

A pdftk wrapper.

Project description

Welcome to pdftk-wrapper

Installation

python3 -m pip install pdftk-wrapper

Has been tested with python>=3.8.

Usage

This is a Python wrapper over pdftk. At present it supports only removing pages from a pdf. Example of a run:

pdftk-remove-pages ./sample_1.pdf 1,3-195 ./gitignore_sample_1.pdf

Assuming the file sample_1.pdf has 195 pages. The above would remove the first page and pages 3 up to 195 and output the resulting pdf to gitignore_sample_1.pdfSo the resulting file gitignore_sample_1.pdf would just contain one page which was the second page in sample_1.pdf

$  pdftk-remove-pages --help
usage: pdftk-remove-pages [-h] input_file page_string output_file

A wrapper over pdftk to remove pages from a pdf.

positional arguments:
  input_file   Path to the pdf file to remove pages from.
  page_string  Remove specific pages from the pdf. Example: 1-10,13,15-20,32
  output_file  Path of the output file.

options:
  -h, --help   show this help message and exit

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

pdftk-wrapper-0.0.4.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

pdftk_wrapper-0.0.4-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file pdftk-wrapper-0.0.4.tar.gz.

File metadata

  • Download URL: pdftk-wrapper-0.0.4.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.2

File hashes

Hashes for pdftk-wrapper-0.0.4.tar.gz
Algorithm Hash digest
SHA256 d23436c6f8fc72fa98edffbf656547930dba12b904050f87486318b656e1f2ec
MD5 fc75b7941e607541e70b16e59abc23b0
BLAKE2b-256 b5b7d59e6324a9de23c8b7a14ea9b359adf12080d28e3977d6ef62f8e1cbf0d1

See more details on using hashes here.

File details

Details for the file pdftk_wrapper-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for pdftk_wrapper-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b6c5fb3df61ebad08d53787aba2bc948b00f14e6a5ebb7429f61ca1e6797f37d
MD5 133d139d9d09e846ba93ccfad7001938
BLAKE2b-256 599d19b527091e7991dfd22102ed8dbb63cf89f4557a916fa5ad36bd63f6058f

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