pdfcpu

Logo

A PDF processor written in Go.

View the Project on GitHub pdfcpu/pdfcpu


Changelog

Validate

This command checks inFile for compliance with the specification PDF 32000-1:2008 (PDF 1.7). Any PDF file you would like to process needs to pass validation. Have a look at some examples.

Usage

pdfcpu validate [-v(erbose)|vv] [-q(uiet)] [-mode strict|relaxed] [-upw userpw] [-opw ownerpw] inFile


Flags

name description required values default
verbose turn on logging no    
vv verbose logging no    
quiet quiet mode no    
mode validation mode no strict, relaxed relaxed
upw user password no    
opw owner password no    


Arguments

name description required
inFile PDF input file yes


Mode

Strict

This mode validates against the specification PDF 32000-1:2008 covering all PDF versions up to 1.7.

Relaxed

This is the default mode for validation.
It behaves like strict but does not complain about common seen violations of the specification by PDF writers.


Examples

An example using strict validation:

pdfcpu validate -mode strict test.pdf
validating(mode=strict) test.pdf ...
validation ok


An example using default validation:

pdfcpu validate test.pdf
validating(mode=relaxed) test.pdf ...
validation ok