pdfcpu is a simple PDF processing library written in Go supporting encryption. It provides both an API and a CLI. Supported are all versions up to PDF 1.7 (ISO-32000).


The main focus lies on strong support for batch processing and scripting via a rich command line. At the same time pdfcpu wants to make it easy to integrate PDF processing into your Go based backend system by providing a robust command set.



The main entry point is pdfcpu.io.

There you will find explanations of all the commands, their parameters and examples which use the CLI because this makes it easier to understand how the commands work.
Even if you want to dive right into pdfcpu backend integration it is highly recommended to read the docs first.

Using Go Modules (go1.11 and up)

git clone https://github.com/hhrutter/pdfcpu
cd pdfcpu/cmd/pdfcpu
go install
pdfcpu ve




  • Please open an issue if you find a bug or want to propose a change.
  • Feature requests - always welcome!
  • Bug fixes - always welcome!
  • PRs - also welcome, although I can't promise a merge-in right now.
  • pdfcpu is stable but still Alpha and occasionally undergoing heavy changes.


  • If you want to report a bug please attach the very verbose (pdfcpu cmd -vv ...) output and ideally a test PDF that you can share.
  • Always make sure your contribution is based on the latest commit.
  • Please sign your commits.
  • Please sign the CLA before you submit a PR.