Extracting author from PDF file using PDFBox
807605Sep 27 2007 — edited Sep 28 2007Hi,
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.