PdfReader.getInfo returns null for Keywords

bhopB <[email protected]> Thu, 10 Mar 2016 12:31:04 -0800 (PST)
Newsgroups gmane.comp.java.lib.itext.general
Message-ID <[email protected]>
I am creating a new Pdf from an existing Pdf ( original ) and add customized
pages on top of that Pdf. I am able at this moment to retrieve metadata from
Pdf by using: info = reader.getInfo(); However, when I want to get the value
for "Keywords" info.get("Keywords") it is returning null; When I go through
the map and look at the key-value pairs returned I do not see the key:
Keywords. However, the Pdf ( original ) has value for Keywords. 
*Question*: How do I get the value for keywords which is present in the
metadata section of the original Pdf?

*Sample Code:*
// Step 2.5 Copying Pdf Properties.
			reader = new PdfReader(secondFile);
			HashMap<String, String> map = reader.getInfo();
			
			String title = map.get("Title");
			String author = map.get("Author");
			String subject = map.get("Subject");
			String keywords = map.get("Keywords"); ------------> This one returns
null for the original Pdf.
<http://itext.2136553.n4.nabble.com/file/n4661008/Screenshot_%2829%29.png> 
<http://itext.2136553.n4.nabble.com/file/n4661008/Screenshot_%2830%29.png> 
			String creator = map.get("Creator");
			
			if (title != null)
				document.addTitle(title);
			if (author != null)
				document.addAuthor(author);
			if (subject != null)
				document.addSubject(subject);
			if (keywords != null) {
				document.addKeywords(map.get("Keywords"));
			}


Any help will be appreciated. 

Thanks.



--
View this message in context: http://itext.2136553.n4.nabble.com/PdfReader-getInfo-returns-null-for-Keywords-tp4661008.html
Sent from the iText mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php