Remove ID field from PDF with Apache PDFBox -


i need compare pdf documents habe been created itext. managed compare documents i'm stumbling on tiny difference.

when opening pdfs in editor notepad++ can see there towares end of file:

/root 1 0 r /id [<some id here> <some other id here>] 

as have found out here (what id field in pdf file?) element belongs called "trailer".

can access , modify "field" apache pdfbox?

the following snippet works fine me.

pddocument doc = pddocument.load(pdf); cosarray cosarray = doc.getdocument().getdocumentid(); // clear or set whatever values... cosarray.clear(); doc.getdocument().setdocumentid(cosarray); 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -