# hhrutter-pdfcpu **Repository Path**: tickCoder-mirrors/hhrutter-pdfcpu ## Basic Information - **Project Name**: hhrutter-pdfcpu - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-11-20 - **Last Updated**: 2024-11-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # pdfcpu: a Go PDF processor and CLI [![Test](https://github.com/pdfcpu/pdfcpu/workflows/Test/badge.svg)](https://github.com/pdfcpu/pdfcpu/actions) [![Coverage Status](https://coveralls.io/repos/github/pdfcpu/pdfcpu/badge.svg?branch=master)](https://coveralls.io/github/pdfcpu/pdfcpu?branch=master) [![GoDoc](https://godoc.org/github.com/pdfcpu/pdfcpu?status.svg)](https://pkg.go.dev/github.com/pdfcpu/pdfcpu) [![Go Report Card](https://goreportcard.com/badge/github.com/pdfcpu/pdfcpu)](https://goreportcard.com/report/github.com/pdfcpu/pdfcpu) [![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)](https://opensource.org/licenses/Apache-2.0) [![Latest release](https://img.shields.io/github/release/pdfcpu/pdfcpu.svg)](https://github.com/pdfcpu/pdfcpu/releases) [![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/hhrutter) pdfcpu is a PDF processing library written in [Go](http://golang.org) that supports encryption and offers both an API and a command-line interface (CLI). It is compatible with all PDF versions with basic support and ongoing improvement for PDF 2.0 (ISO-32000-2). ## Motivation 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.

         

         

 

## Focus The primary emphasis is on providing robust assistance for batch processing and scripting through a comprehensive command-line interface. Simultaneously, pdfcpu aims to simplify the integration of PDF processing into your Go-based backend system by offering a versatile set of commands. ## Command Set * [annotations](https://pdfcpu.io/annot/annot) * [attachments](https://pdfcpu.io/attach/attach) * [booklet](https://pdfcpu.io/generate/booklet) * [bookmarks](https://pdfcpu.io/bookmarks/bookmarks) * [boxes](https://pdfcpu.io/boxes/boxes) * [change owner password](https://pdfcpu.io/encrypt/change_opw) * [change user password](https://pdfcpu.io/encrypt/change_upw) * [collect](https://pdfcpu.io/core/collect) * [create](https://pdfcpu.io/generate/create) * [crop](https://pdfcpu.io/core/crop) * [cut](https://pdfcpu.io/generate/cut) * [decrypt](https://pdfcpu.io/encrypt/decryptPDF) * [encrypt](https://pdfcpu.io/encrypt/encryptPDF) * [extract](https://pdfcpu.io/extract/extract) * [fonts](https://pdfcpu.io/fonts/fonts) * [form](https://pdfcpu.io/form/form) * [grid](https://pdfcpu.io/generate/grid) * [images](https://pdfcpu.io/images/images) * [import](https://pdfcpu.io/generate/import) * [info](https://pdfcpu.io/info) * [keywords](https://pdfcpu.io/keywords/keywords) * [merge](https://pdfcpu.io/core/merge) * [ndown](https://pdfcpu.io/generate/ndown) * [nup](https://pdfcpu.io/generate/nup) * [optimize](https://pdfcpu.io/core/optimize) * [pagelayout](https://pdfcpu.io/pagelayout/pagelayout) * [pagemode](https://pdfcpu.io/pagemode/pagemode) * [pages](https://pdfcpu.io/pages/pages) * [permissions](https://pdfcpu.io/encrypt/perm_add) * [portfolio](https://pdfcpu.io/portfolio/portfolio) * [poster](https://pdfcpu.io/generate/poster) * [properties](https://pdfcpu.io/properties/properties) * [resize](https://pdfcpu.io/core/resize) * [rotate](https://pdfcpu.io/core/rotate) * [split](https://pdfcpu.io/core/split) * [stamp](https://pdfcpu.io/core/stamp) * [trim](https://pdfcpu.io/core/trim) * [validate](https://pdfcpu.io/core/validate) * [viewerpref](https://pdfcpu.io/viewerpref/viewerpref) * [watermark](https://pdfcpu.io/core/watermark) * [zoom](https://pdfcpu.io/core/zoom) ## Documentation * [pdfcpu.io](https://pdfcpu.io) * [API tests](https://github.com/pdfcpu/pdfcpu/tree/master/pkg/api/test) * [API samples](https://github.com/pdfcpu/pdfcpu/tree/master/pkg/samples) * CLI usage: `$ pdfcpu help cmd` ### GoDoc * [pdfcpu package](https://pkg.go.dev/github.com/pdfcpu/pdfcpu) * [pdfcpu API](https://pkg.go.dev/github.com/pdfcpu/pdfcpu/pkg/api) * [pdfcpu CLI](https://pkg.go.dev/github.com/pdfcpu/pdfcpu/pkg/cli) ## Reminder * 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 in the next release notes.
* Follow [pdfcpu](https://twitter.com/pdfcpu) for news and release announcements. * For quick questions or discussions get in touch on the [Gopher Slack](https://invite.slack.golangbridge.org/) in the #pdfcpu channel. ## Demo Screencast (using older version with a smaller command set) [![asciicast](resources/demo.png)](https://asciinema.org/a/P5jaAo9kgZXKj2iSA1OqIdLAU) ## Installation ### Download Get the latest binary [here](https://github.com/pdfcpu/pdfcpu/releases). ### Using Go Modules ``` $ git clone https://github.com/pdfcpu/pdfcpu $ cd pdfcpu/cmd/pdfcpu $ go install $ pdfcpu version ``` or directly through Go install: ``` $ go install github.com/pdfcpu/pdfcpu/cmd/pdfcpu@latest ``` ### Using Homebrew (macOS) ``` $ brew install pdfcpu $ pdfcpu version ``` ### Using DNF/YUM (Fedora) ``` $ sudo dnf install golang-github-pdfcpu $ pdfcpu version ``` ### Run in a Docker container ```shell $ docker build -t pdfcpu . # mount current host folder into container as /app to process files in the local host folder $ docker run -it -v "$(pwd)":/app pdfcpu validate a.pdf ``` ## Contributing ### What * Please [create](https://github.com/pdfcpu/pdfcpu/issues/new/choose) an issue if you find a bug or want to propose a change. * Feature requests - always welcome! * Bug fixes - always welcome! * PRs - let's [discuss](https://github.com/pdfcpu/pdfcpu/discussions) first or [create](https://github.com/pdfcpu/pdfcpu/issues/new/choose) an issue. * pdfcpu is stable but still *Alpha* and occasionally undergoing heavy changes. ### How * The pdfcpu [discussion board](https://github.com/pdfcpu/pdfcpu/discussions) is open! Please engage in any form helpful for the community. * 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. ### Reporting Crashes Unfortunately crashes do happen :( For the majority of the cases this is due to a diverse pool of PDF Writers out there and millions of PDF files using different versions waiting to be processed by pdfcpu. Sometimes these PDFs were written more than 20(!) years ago. Often there is an issue with validation - sometimes a bug in the parser. Many times even using relaxed validation with pdfcpu does not work. In these cases we need to extend relaxed validation and for this we are relying on your help. By reporting crashes you are helping to improve the stability of pdfcpu. If you happen to crash on any pdfcpu operation be it on the command line or in your Go backend these are the steps to report this: Regardless of the pdfcpu operation, please start using the pdfcpu command line to validate your file: ``` sh $ pdfcpu validate -v &> crash.log ``` or to produce very verbose output ``` sh $ pdfcpu validate -vv &> crash.log ``` will produce what's needed to investigate a crash. Then open an issue and post `crash.log` or its contents. Ideally post a test PDF you can share to reproduce this. You can also email to hhrutter@gmail.com or if you prefer Slack you can get in touch on the Gopher slack #pdfcpu channel. If processing your PDF with pdfcpu crashes during validation and can be opened by Adobe Reader and Mac Preview chances are we can extend relaxed validation and provide a fix. If the file in question cannot be opened by both Adobe Reader and Mac Preview we cannot help you! ## Contributors Thanks 💚 goes to these wonderful people: |||||||| | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | [
Horst Rutter](https://github.com/hhrutter) | [
haldyr](https://github.com/haldyr) | [
Vyacheslav](https://github.com/SimePel) | [
Erik Unger](https://github.com/ungerik) | [
Richard Wilkes](https://github.com/richardwilkes) | [
minenok-tutu](https://github.com/minenok-tutu) | [
Mateusz Burniak](https://github.com/matbur) | | [
Dmitry Harnitski](https://github.com/dharnitski) | [
ryarnyah](https://github.com/ryarnyah) | [
Sam Giffney](https://github.com/s01ipsist) | [
Carlos Eduardo Witte](https://github.com/cewitte) | [
minusworld](https://github.com/minusworld) | [
Witold Konior](https://github.com/jozuenoon) | [
joonas.fi](https://github.com/joonas-fi) | | [
Henrik Reinstädtler](https://github.com/henrixapp) | [
VMorozov-wh](https://github.com/VMorozov-wh) | [
Benoit KUGLER](https://github.com/benoitkugler) | [
Adam Greenhall](https://github.com/adamgreenhall) | [
moritamori](https://github.com/moritamori) | [
JanBaryla](https://github.com/JanBaryla) | [
TheDiscordian](https://github.com/TheDiscordian) | | [
Rafael Garcia Argente](https://github.com/rgargente) | [
truyet](https://github.com/truyet) | [
Christian Nicola](https://github.com/christiannicola) | [
Benjamin Krill](https://github.com/kben) | [
Peter Wyatt](https://github.com/petervwyatt) | [
Kroum Tzanev](https://github.com/kpym) | [
Stefan Huber](https://github.com/signalwerk) | | [
Juan Iscar](https://github.com/juaismar) | [
Eng Zer Jun](https://github.com/Juneezee) | [
Dmitry Ivanov](https://github.com/hant0508)|[
Rene Kaufmann](https://github.com/HeavyHorst)|[
Christian Heusel](https://github.com/christian-heusel) | [
Chris](https://github.com/freshteapot) | [
Lukasz Czaplinski](https://github.com/scoiatael) | [
Joel Silva Schutz](https://github.com/joelschutz) | [
semvis123](https://github.com/semvis123) | [
guangwu](https://github.com/testwill) | [
Yoshiki Nakagawa](https://github.com/yyoshiki41) | [
Steve van Loben Sels](https://github.com/stevevls) | [
Yaofu](https://github.com/mygityf) | [
vsenko](https://github.com/vsenko) | [
Alexis Hildebrandt](https://github.com/afh) | [
Sivukhin Nikita](https://github.com/sivukhin) | [
Joachim Bauch](https://github.com/fancycode) | [
kalimit](https://github.com/kalimit) | [
Andreas Erhard](https://github.com/xelan) | [
Matsumoto Toshi](https://github.com/toshi1127) | [
Carl Wilson](https://github.com/carlwilson) | [
LNAhri](https://github.com/LNAhri) | | | | | | ## Code of Conduct Please note that this project is released with a Contributor [Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. ## Disclaimer 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](https://instagram.com/reneefrench) for creating our beloved Gopher. ## License Apache-2.0