On 19/04/2013 8:51, Deepti Banana wrote: > Using these schemas, what I understand is, predefined properties can be set > like Author, Title etc.
Yes, some of these Schema's are mandatory, so you MUST use them. > To set custom properties(like WorkOrderNo) I tried using XmpSchema, > DublinCoreSchema, PdfSchema's methods like > > XmpWriter : addRdfDescription(String, String) > XmpSchema/ PdfSchema: addProperty(String, String), setProperty(String, String) > > But these are neither being added under "Custom" properties tab of Document > properties nor are being retrieved by getMetadata() method. Er... you want to add CUSTOM data, so it kind of surprises me that you'd use something like PdfSchema. But take a look at PdfSchema. It extends the ABSTRACT class XmpSchema (abstract means: you can't use it as a class to create an object, you need to create a subclass first). You should implement the XmpSchema class like this "MyCustomSchema extends XmpSchema" and then code whatever custom info you need in your custom schema. Er... sorry for this answer. I got carried away and started teaching you how to write software. As you're a software developer you already knew this. I assume your question was rhetorical. ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ 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