Zurück zum Ranking

pdfcpu/pdfcpu

Gopdfcpu.io

PDF tooling for Go and the command line.

gogolanggolang-librarypdfpdf-filesclipdf-tools
Sterne-Wachstum
Sterne
8.7k
Forks
620
Wochenwachstum
Issues
144
5k
Juli 2017Juli 2020Juli 2023Juli 2026
ArtefakteGo Modulesgo get github.com/pdfcpu/pdfcpu
README

pdfcpu: PDF tooling for Go and the command line

Test Coverage Status Go Reference Go Report Card License Sponsor

pdfcpu provides a Go API and command-line tools for working with PDF files.

It supports PDFs across versions. PDF 2.0 (ISO-32000-2) validation support is basic and continuously improving.


Installation

CLI

👉 CLI Installation instructions

Go API

👉 API Installation instructions


Usage

CLI

Validate a PDF:

pdfcpu validate input.pdf

Merge two PDFs:

pdfcpu merge merged.pdf in1.pdf in2.pdf

Go API

See API documentation for usage examples.


Features

  • Validate, optimize, split, trim, and merge PDFs
  • Extract and manipulate images, fonts, and metadata
  • Encrypt and decrypt PDFs
  • Resize and rotate pages
  • Add and remove stamps and watermarks
  • Validate signature integrity, report signature evidence, and remove signatures
  • Manage attachments and more...

In Action

Common operations and examples:

         

         

 


Command Set

Complete list of supported commands:

annotations attachments booklet
bookmarks boxes certificates
change owner password change user password collect
config create crop
cut decrypt encrypt
extract fonts form
grid images import
info keywords merge
ndown nup optimize
pagelayout pagemode pages
permissions portfolio poster
properties resize rotate
signatures split stamp
trim validate viewerpref
watermark zoom

Motivation

pdfcpu aims to provide comprehensive PDF processing capabilities implemented in Go.

It focuses on correctness, robustness and independence from external dependencies.


Focus

  • comprehensive PDF processing functionality
  • minimal external dependencies
  • predictable and stable behavior

Documentation

CLI

  • Command help: pdfcpu [command] --help

Go API


Contributing

Contributions are welcome.

  • Report bugs or propose changes via issues
  • Discuss ideas on the discussion board
  • For PRs, please open an issue or discussion first

Guidelines

  • Base your work on the latest commit
  • Include verbose output (pdfcpu cmd -vv ...) and a sample PDF when reporting issues
  • Please sign your commits

Reporting crashes

Crashes may occur due to the wide variety of PDF producers and formats in use, including older or non-compliant files. In many cases this is related to validation issues or edge cases in the parser.

Even with relaxed validation, some files cannot be processed. These cases are essential for improving pdfcpu by extending validation and handling additional real-world PDFs.

If you encounter a crash, please report it.

Start by validating the file using the CLI:

pdfcpu validate -vv <file.pdf>

Include in your report:

  • the command used
  • verbose output (-vv)
  • a sanitized sample PDF

If validation crashes for a PDF that opens in Adobe Reader or macOS Preview, it is likely we can extend relaxed validation and provide a fix.

If the file cannot be opened by both Adobe Reader and macOS Preview, we cannot support it.

Please include a sample PDF to reproduce the issue whenever possible.


Contributors

Thanks 💚 to all contributors:


Horst Rutter

haldyr

Vyacheslav

Erik Unger

Richard Wilkes

minenok-tutu

Mateusz Burniak

Dmitry Harnitski

ryarnyah

Sam Giffney

Carlos Eduardo Witte

minusworld

Witold Konior

joonas.fi

Henrik Reinstädtler

VMorozov-wh

Benoit KUGLER

Adam Greenhall

moritamori

JanBaryla

TheDiscordian

Rafael Garcia Argente

truyet

Christian Nicola

Benjamin Krill

Peter Wyatt

Kroum Tzanev

Stefan Huber

Juan Iscar

Eng Zer Jun

Dmitry Ivanov

Rene Kaufmann

Christian Heusel

Chris

Lukasz Czaplinski

Joel Silva Schutz

semvis123

guangwu

Yoshiki Nakagawa

Steve van Loben Sels

Yaofu

vsenko

Alexis Hildebrandt

Sivukhin Nikita

Joachim Bauch

kalimit

Andreas Erhard

Matsumoto Toshi

Carl Wilson

LNAhri

vishal

Andreas Deininger

Robert Raines

Frank Anderson

Sven Lilienthal

Florian Kinder

mdmcconnell

Bradley Erickson

doronbehar

joeyave

Zhenbang Wei

HarishTeens

Code of Conduct

This project is released with a Contributor Code of Conduct. By participating, you agree to abide by its terms.


Disclaimer

Use of pdfcpu assumes compliance with all applicable copyrights for any processed PDF content, including embedded resources such as fonts and images.

Gopher artwork by Renee French


License

Apache License 2.0


Ähnliche Repositories
avelino/awesome-go

A curated list of awesome Go frameworks, libraries and software

GoGo ModulesMIT Licensegolanggolang-library
awesome-go.com
178.8k13.4k
ollama/ollama

Get up and running with Kimi-K2.6, GLM-5.2, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

GoGo ModulesMIT Licensellamallm
ollama.com
176.6k17.1k
golang/go

The Go programming language

GoGo ModulesBSD 3-Clause "New" or "Revised" Licenseprogramming-languagelanguage
go.dev
135.3k19.3k
kubernetes/kubernetes

Production-Grade Container Scheduling and Management

GoGo ModulesApache License 2.0kubernetesgo
kubernetes.io
123.9k43.7k
fatedier/frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.

GoGo ModulesApache License 2.0proxyreverse-proxy
108.2k15.1k
gohugoio/hugo

The world’s fastest framework for building websites.

GoGo ModulesApache License 2.0gohugo
gohugo.io
89k8.3k
gin-gonic/gin

Gin is a high-performance HTTP web framework written in Go. It provides a Martini-like API but with significantly better performance—up to 40 times faster—thanks to httprouter. Gin is designed for building REST APIs, web applications, and microservices.

GoGo ModulesMIT Licenseservermiddleware
gin-gonic.com
88.9k8.7k
syncthing/syncthing

Open Source Continuous File Synchronization

GoGo ModulesMozilla Public License 2.0synchronizationgo
syncthing.net
86.8k5.4k
junegunn/fzf

:cherry_blossom: A command-line fuzzy finder

GoGo ModulesMIT Licensefzfgo
junegunn.github.io/fzf/
81.9k2.8k
grafana/grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.

TypeScriptnpmGNU Affero General Public License v3.0grafanamonitoring
grafana.com
75.7k14.3k
caddyserver/caddy

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

GoGo ModulesApache License 2.0goweb-server
caddyserver.com
74.2k4.8k
moby/moby

The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems

GoGo ModulesApache License 2.0dockercontainers
mobyproject.org
71.9k19k