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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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