A PDF processor written in Go.
View the Project on GitHub pdfcpu/pdfcpu
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. Optionally check for broken links.
Have a look at some examples.
pdfcpu validate [-m(ode) strict|relaxed] [-l(inks)] inFile
name | description | required | values | default |
---|---|---|---|---|
m(ode) | validation mode | no | strict, relaxed | relaxed |
l(inks) | check links | no |
name | description | values |
---|---|---|
v(erbose) | turn on logging | |
vv | verbose logging | |
q(uiet) | quiet mode | |
u(nit) | display unit | po(ints),in(ches),cm,mm |
c(onf) | config dir | $path, disable |
upw | user password | |
opw | owner password |
name | description | required |
---|---|---|
inFile | PDF input file | yes |
This mode validates against the specification PDF 32000-1:2008 covering all PDF versions up to 1.7.
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.
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
Check for broken links:
pdfcpu val -l PDF32000_2008.pdf
validating(mode=relaxed) PDF32000_2008.pdf ...
validating URIs..
...........................
Page 8: http://www.aiim.org/pdfrefdocs status=404
Page 10: http://adobe.com/go/pdf_ref_bibliography status=404
Page 10: http://www.adobe.com/go/pdf_ref_bibliography status=404
Page 11: http://www.aiim.org/pdfnotes status=404
Page 753: http://developer.apple.com/fonts/TTRefMan/ status=404
Page 754: http://www.agfamonotype.com/printer/pan1.asp status=404
Page 755: http://www.rsasecurity.com/rsalabs/node.asp?id=2125 status=404
validation error: broken links detected