Hi

Great - with getInfo() it  works and I can get the metadata
I was not aware of the fact that GetMetaData can only read XMP Metadata.

Thanks for your help - very much appreciated.

Alen

-----Original Message-----
From: iText Info [mailto:i...@1t3xt.info]
Sent: Mittwoch, 11. September 2013 13:13
To: Post all your questions about iText here
Subject: Re: [iText-questions] Pdfreader / getMetadata returns NULL for some 
pdfs

Op 11/09/2013 12:19, Zurfluh, Alen schreef:
>
> here is a non-working sample file (attached)
>

Open a working example in a text editor. Scroll until you see XML.
That's XMP metadata.Open a non-working example in a text editor.Scroll until 
you see XML. You won't find any.

In your initial question, you said that getting XMP metadata "didn't work" for 
the latter files.Now that you've shared your PDF, we know that your allegation 
was false. There is no XMP metadata in that file.And if there's no XMP 
metadata, then it's NORMALthat iText returns null. iText can't give you 
something that isn't there.

Then where does the metadata you see in Adobe Reader come from?

Well, that isn't XMP metadata, is it? That's the metadata stored in the Info 
dictionary!You can get the keys and values as a Map<String, String> in the info 
dictionary using the getInfo() method.See for instance
http://itextpdf.com/examples/iia.php?id=216 where the metadata is changed in 
the manipulatePdf() method.This is something completely different from the XMP 
question you were asking:
http://itextpdf.com/examples/iia.php?id=217

Based on this experience, may I ask you a favor?

"It doesn't work" isn't a problem description that a software developer should 
give when asking a question on an internet forum. That's a problem description 
most commonly employed by standard users that do not care how software 
works.Try avoiding such language in the future and it will be more gratifying 
for people like me to answer your question.

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT 2. 
Standardize and globalize service processes across IT 3. Implement zero-touch 
automation to replace manual, redundant tasks 
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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


This email is confidential. If you are not the intended recipient, please 
advise us immediately and delete this message. See 
https://www.swissglobal-am.com/Disclaimer_Email for further information on 
confidentiality, the risks of non-secure electronic communication, and certain 
disclosures which we are required to make in accordance with applicable 
legislation and regulations. If you cannot access this link, please notify us 
by reply message and we will send the contents to you.



------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
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

Reply via email to