LinuxCommandLibrary

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.

SEE ALSO

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

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community