Hi All,

I have a PDF generated using iText-5.4.0 which has few custom properties set.

I used the below code to add custom properties

        PdfReader reader = new PdfReader(src);
        PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(dest));
        HashMap<String, String> info = reader.getInfo();
        info.put("CUSTOM", "CUSTOM");
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        XmpWriter xmp = new XmpWriter(baos, info);
        xmp.close();
        stamper.setXmpMetadata(baos.toByteArray());
        stamper.close();
        reader.close();

I have used the below code to write the metadata to the xml file

         PdfReader reader = new PdfReader(RESULT2);
        FileOutputStream fos = new FileOutputStream(dest);
        byte[] b = reader.getMetadata();
        System.out.println(b);
        fos.write(b, 0, b.length);
        fos.flush();
        fos.close();
        reader.close();



When I open the pdf document, and check document properties, my CUSTOM
property can be seen under the “Custom Tab” but
the xml file being generated does not have the custom property.

I read & tried various xmp schemas provided by iText but could not
find a solution.
I need the custom properties to be added to the xml file. How can this be done?



Thanks & Regards,

Deepti

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