Welcome pdf-cli user manual
Usage:
pdf [OPTIONS] COMMAND [ARGS]...
Options:
--version
--help Show this message and exit.
decrypt
Remove password protection from PDF files.
Usage:
pdf decrypt [OPTIONS] INPUT_FILE
Options:
-o, --output FILENAME [required]
-v, --verbosity INTEGER
-p, --password TEXT
--help Show this message and exit.
encrypt
Add password protection to PDF files. Owner and user passwords can be specified, along with a set of user permissions.
The encryption algorithm used for protecting the file is configurable.
Usage:
pdf encrypt [OPTIONS] INPUT_FILE
Options:
-o, --output FILENAME [required]
-v, --verbosity INTEGER
-p, --password TEXT
-a, --algorithm [RC4-40|RC4-128|AES-128|AES-256-R5|AES-256]
encrypt algorithm. Values may be one of
--help Show this message and exit.
extract
extract one or multiple pages and build a new document.
Usage:
pdf extract [OPTIONS] INPUT_FILE
Options:
-p, --pages RANGE starting page to extract
-o, --output FILENAME [required]
-v, --verbosity INTEGER
--help Show this message and exit.
info
dump pdf information.
Usage:
pdf info [OPTIONS] INPUT_FILE
Options:
-v, --verbosity INTEGER
--help Show this message and exit.
join
join multiple pdf together in a single file.
Usage:
pdf join [OPTIONS] [INPUTS]...
Options:
-o, --output FILENAME [required]
-v, --verbosity INTEGER
--help Show this message and exit.
ocr
Extract text from PDF using OCR
Usage:
pdf ocr [OPTIONS] INPUT_FILE
Options:
-p, --pages RANGE pages to extract
-v, --verbosity INTEGER verbosity level
-d, --destination PATH destination directory to create extracted files
-o, --output FILENAME output file
-f, --format TEXT page filename pattern
--help Show this message and exit.
rotate
Rotate selected pages and outputs in new pdf
Usage:
pdf rotate [OPTIONS] INPUT_FILE
Options:
-p, --pages RANGE starting page to extract
-o, --output FILENAME
-v, --verbosity INTEGER
-r, --rotate [left|right|inverted]
--help Show this message and exit.
split
split pdf into multiple single page file.
Usage:
pdf split [OPTIONS] INPUT_FILE
Options:
-p, --pages RANGE starting page to extract
-f, --format TEXT page filename pattern
-d, --destination PATH
-v, --verbosity INTEGER
--help Show this message and exit.
watermark
use first page of pdf and add it as watermark to other document
Usage:
pdf watermark [OPTIONS] INPUT_FILE WATERMARK
Options:
-o, --output FILENAME [required]
-v, --verbosity INTEGER
--help Show this message and exit.