Skip to content
A PDF processor written in Go.
Branch: master
Clone or download
Latest commit f9a4092 May 10, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
_scripts Add N-up cmd Jan 13, 2019
ccitt Fix #75, #76 Apr 13, 2019
cmd/pdfcpu Add page insert, remove Mar 25, 2019
lzw name tree fixes Nov 27, 2018
pkg Fix #80, #81 May 10, 2019
resources Update Mar 17, 2019
tiff Fix #75, #76 Apr 13, 2019
.gitignore cleanup Feb 13, 2018
.travis.yml wip Mar 21, 2019 COD and fix watermarks, contributors Nov 19, 2018
LICENSE.txt watermarks & Apache-2.0 Sep 13, 2018 Fix #27, #61, #63 Mar 30, 2019 all types refactored other than PDFDict Sep 18, 2018
go.mod Support modules Jan 23, 2019
go.sum Support modules Jan 23, 2019

pdfcpu: a golang pdf processor

Build Status GoDoc Coverage Status Go Report Card


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).


This is an effort to build a comprehensive PDF processing library from the ground up written in Go. Over time pdfcpu aims to support the standard range of PDF processing features and also any interesting use cases that may present themselves along the way.





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.

Command Set


The main entry point is

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.



Version: 0.1.23

  • Support for multiline stamps/watermarks such as in pdfcpu stamp 'This\nis a\nmultiline stamp' test.pdf
  • Fixes #27, #61, #63


Always make sure your work is based on the latest commit!
pdfcpu is still Alpha - bugfixes are committed on the fly and will be mentioned on the next release notes.

Demo Screencast

(using older version with a smaller command set)



There are no dependencies outside the Go standard library other than pkg/errors.
Required go version for building: go1.10 and up


go get
cd $GOPATH/src/
go install
pdfcpu version

Using Go Modules (go1.11 and up)

git clone
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.


Thanks goes to these wonderful people:

Horst Rutter



Erik Unger

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.


Usage of pdfcpu assumes you know about and respect all copyrights of any PDF content you may be processing. This applies to the PDF files as such, their content and in particular all embedded resources like font files or images. Credit goes to Renee French for creating our beloved Gopher.



Powered By

You can’t perform that action at this time.