In this program, we’re going to see how we can extract PDF document information like author, created date, bookmarks from the PDF. We are going to create an object of the info extractor class, load a document and then just fetch the information which is Author, Creator, Producer, subject, etc. We’re already having one sample PDF file and let’s see what we can fetch out of it.
First we are going to have the object which is like using (infoExtractor extractor = new InfoExtractor(“demo”,”demo”)) pass a registration name and key here.
Now Load Document extractor.LoadDocumentFromFile(“sample_program3.pdf”); then display information that we can get the Author name from the extractor.author, we also can get a Creator name by using the extractor.creator and let us see what we can fetch it.
After execution, we can see some trial information because we’re using demo keys. The creator is none, producer: SKia/PDF. We have the Subject, Title Creation Date. This (Trial version expires) line will be removed after we use the actual keys.