Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit PDF properties in java?

Tags:

java

pdf

pdfbox

I need to edit existing properties or set new PDF properties such as author name, title, subject, etc. from a java application. Is there any way to do that? I have found the apache.pdfbox library but I don't know whether it will solve my issues or not?

like image 401
dhiraj Avatar asked Sep 07 '25 19:09

dhiraj


1 Answers

Yes, Apache PDFBox has an API to retrieve and update PDF metadata.

Looking at the example code, it does look like you have to get your hands dirty with XML a little, though.

like image 194
Thilo Avatar answered Sep 09 '25 07:09

Thilo