LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

cpdf

Command-line PDF manipulation tool

TLDR

Merge PDF files
$ cpdf [input1.pdf] [input2.pdf] -o [output.pdf]
copy
Extract pages
$ cpdf [input.pdf] [1-10] -o [output.pdf]
copy
Rotate pages
$ cpdf -rotate [90] [input.pdf] -o [output.pdf]
copy
Add password protection
$ cpdf -encrypt [128bit] [owner_password] [user_password] [input.pdf] -o [output.pdf]
copy
Remove password
$ cpdf -decrypt [input.pdf] owner=[password] -o [output.pdf]
copy
Split into single pages
$ cpdf -split [input.pdf] -o [page%%%.pdf]
copy
Scale pages
$ cpdf -scale-page "[2.0 2.0]" [input.pdf] -o [output.pdf]
copy

SYNOPSIS

cpdf [options] input.pdf [pages] -o output.pdf

DESCRIPTION

cpdf (Coherent PDF) is a command-line tool for manipulating PDF files. It can merge, split, encrypt, decrypt, rotate, scale, and perform many other operations on PDF documents without requiring a GUI.The tool provides precise control over PDF manipulation with support for page ranges, encryption levels, metadata editing, and transformations. It's designed for batch processing, automation, and scenarios where graphical PDF tools are impractical.cpdf is particularly useful for server-side PDF processing, shell scripts, and workflows requiring reliable, scriptable PDF operations. It handles complex operations like adding watermarks, stamping pages, and manipulating bookmarks.

PARAMETERS

-o file

Output file path.
-encrypt level owner user
Encrypt with specified bit level and passwords.
-decrypt
Decrypt a PDF.
-rotate degrees
Rotate pages by degrees.
-split
Split into individual pages.
-scale-page "x y"
Scale pages by factors.
-merge
Merge multiple PDFs.

INSTALL

sudo dnf install cpdf
copy
sudo apk add cpdf
copy
brew install cpdf
copy

SEE ALSO

pdftk(1), qpdf(1), gs(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid