Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Extracting author from PDF file using PDFBox

807605Sep 27 2007 — edited Sep 28 2007
Hi,

I am using PDFBox to write a utility that will extract the author information from a PDF file. The code that I am using is given below:

PDFParser pdfParser = new PDFParser(inputStream);
pdfParser.parse();
PDDocument pdDocument = pdfParser.getPDDocument();
PDDocumentInformation pdDocumentInfo = pdDocument.getDocumentInformation();
System.out.println("Author is: "+pdDocumentInfo.getAuthor());

While this does print a value of the author, it is not the same as it is seen in the PDF document. The author that I want extracted is the one seen in the PDF document just below the title.

Is there anyway I can get the author information?

Thanks for the help!

Manasee.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2007
Added on Sep 27 2007
1 comment
906 views