Op 22/04/2013 10:04, Deepti Banana schreef:
> Yes, I have created the instance of CustomSchema object and added to xmp 
> schema as below
>
>          CustomSchema mySchema=new CustomSchema();
>          mySchema.addLabelId("TEST");
>          xmp.addRdfDescription(mySchema);


I'd expect a code snippet like this:

         ByteArrayOutputStream os = new ByteArrayOutputStream();
         XmpWriter xmp = new XmpWriter(os);
         XmpSchema dc = new com.itextpdf.text.xml.xmp.DublinCoreSchema();
         XmpArray subject = new XmpArray(XmpArray.UNORDERED);
         subject.add("Hello World");
         subject.add("XMP & Metadata");
         subject.add("Metadata");
         dc.setProperty(DublinCoreSchema.SUBJECT, subject);
         xmp.addRdfDescription(dc);
         PdfSchema pdf = new PdfSchema();
         pdf.setProperty(PdfSchema.KEYWORDS, "Hello World, XMP, Metadata");
         pdf.setProperty(PdfSchema.VERSION, "1.4");
         xmp.addRdfDescription(pdf);
         CustomSchema mySchema=new CustomSchema();
         mySchema.addLabelId("TEST");
         xmp.addRdfDescription(mySchema);
         xmp.close();
         writer.setXmpMetadata(os.toByteArray());

Can you send the resulting PDF after you've done this?

------------------------------------------------------------------------------
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

Reply via email to