Skip to content

pygaiwan/pdf-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruff

Simple CMD tool for merging and splitting PDF files.

Installation

$ git clone https://github.com/pygaiwan/pdf-cli/
$ cd pdf-cli
$ pip install .

This will create a shell command pdfcli which will invoke the CLI app.

Usage

Split a PDF

$ pdfcli split large_pdf.pdf

Optionally the options name_suffix and output can be specified. name_suffix specifies the end of the files produced which will then become: 0_<suffix>, 1_<suffix> etc. output determines the path of the output, the default is the current working directory.

Merge PDFs

$ pdfcli merge /path/to/pdf1.pdf /path/to/pdf2.pdf /path/to/sample*.pdf

By default the dedupliation of files based on the same path is set to True. It can be switched off with --no-dedup. Similarly to split, the output option can be set to define the path where the merged file will be created.

The expansion of characters like * is handled by bash. Not tested in Windows.

About

Python CLI utility to work with pdf

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages