# pdfcpu **Repository Path**: dockingwork/pdfcpu ## Basic Information - **Project Name**: pdfcpu - **Description**: pdfcpu 是一个用 Go 编写的简单 PDF 处理库,支持加密 - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 11 - **Created**: 2019-08-21 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # pdfcpu: a Go PDF processor [![Build Status](https://travis-ci.org/pdfcpu/pdfcpu.svg?branch=master)](https://travis-ci.org/pdfcpu/pdfcpu) [![GoDoc](https://godoc.org/github.com/pdfcpu/pdfcpu?status.svg)](https://godoc.org/github.com/pdfcpu/pdfcpu) [![Coverage Status](https://coveralls.io/repos/github/pdfcpu/pdfcpu/badge.svg?branch=master)](https://coveralls.io/github/pdfcpu/pdfcpu?branch=master) [![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) pdfcpu is a simple PDF processing library written in [Go](http://golang.org) supporting encryption. It provides both an API and a CLI. Supported are all versions up to PDF 1.7 (ISO-32000). ## 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 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 * [attachments](https://pdfcpu.io/attach/attach) * [change owner password](https://pdfcpu.io/encrypt/change_opw) * [change user password](https://pdfcpu.io/encrypt/change_upw) * [decrypt](https://pdfcpu.io/encrypt/decryptPDF) * [encrypt](https://pdfcpu.io/encrypt/encryptPDF) * [extract](https://pdfcpu.io/extract/extract) * [grid](https://pdfcpu.io/core/grid) * [import](https://pdfcpu.io/generate/import) * [info](https://pdfcpu.io/info) * [merge](https://pdfcpu.io/core/merge) * [nup](https://pdfcpu.io/core/nup) * [optimize](https://pdfcpu.io/core/optimize) * [pages](https://pdfcpu.io/pages/pages) * [permissions](https://pdfcpu.io/encrypt/perm_add) * [split](https://pdfcpu.io/core/split) * [rotate](https://pdfcpu.io/core/rotate) * [stamp](https://pdfcpu.io/core/stamp) * [trim](https://pdfcpu.io/core/trim) * [validate](https://pdfcpu.io/core/validate) * [watermark](https://pdfcpu.io/core/watermark) ## Documentation * The main entry point is [pdfcpu.io](https://pdfcpu.io). * For CLI examples also go to [pdfcpu.io](https://pdfcpu.io). There you will find explanations of all the commands and their parameters. * For API examples of all pdfcpu operations please refer to [GoDoc](https://godoc.org/github.com/pdfcpu/pdfcpu/pkg/api). ### GoDoc * [pdfcpu package](https://godoc.org/github.com/pdfcpu/pdfcpu) * [pdfcpu API](https://godoc.org/github.com/pdfcpu/pdfcpu/pkg/api) * [pdfcpu CLI](https://godoc.org/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 on the next release notes.
## 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 GOPATH There are no dependencies outside the Go standard library other than `pkg/errors`.
Required go version for building: go1.10 and up ``` go get github.com/pdfcpu/pdfcpu/cmd/... cd $GOPATH/src/github.com/pdfcpu/pdfcpu/cmd/pdfcpu go install pdfcpu version ``` ### Using Go Modules (go1.11 and up) ``` git clone https://github.com/pdfcpu/pdfcpu cd pdfcpu/cmd/pdfcpu go install pdfcpu ve ``` ## Note We recently transfered this repo to the pdfcpu organisation. All links to the previous repository location are automatically redirected to the new location. However, to avoid confusion, we strongly recommend updating any existing local clones to point to the new repository URL. You can do this by using git remote on the command line: ``` git remote set-url origin https://github.com/pdfcpu/pdfcpu ``` ## Contributing ### What * 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. ### How * 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. ## 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)
|||| | :---: | :---: | :---: | :---: | :---: | :---: | :---: | ## 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 ## Powered By