pdfcpu

Logo

A PDF processor written in Go.

View the Project on GitHub pdfcpu/pdfcpu


Changelog

Remove Annotations

This command removes annotation from a PDF document by object number.

Have a look at some examples.

Usage

pdfcpu annotations remove [-p(ages) selectedPages] inFile [outFile] [objNr|annotId|annotType]...


Common Flags

name description values
v(erbose) turn on logging  
vv verbose logging  
q(uiet) quiet mode  
-o(ffline) disable http traffic  
c(onf) config dir $path, disable
opw owner password  
upw user password  
u(nit) display unit po(ints),in(ches),cm,mm


Arguments

name description required
inFile PDF input file yes
outFile PDF output file no
objNr… one or more objNrs no
annotId… one or more annotIds no
annotType… one or more annotTypes no


Examples

Remove annotation with object number 575 as taken from the output from pdfcpu annot list:

$ pdfcpu annot remove test.pdf 575
writing test.pdf...
pages: all


Remove annotations for first 5 pages:

$ pdfcpu annot remove -pages 1-5 test.pdf
writing test.pdf...
pages: 1,2,3,4,5


Remove all annotations:

$ pdfcpu annot remove test.pdf
writing test.pdf...
pages: all