Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-26 Thread Deepti Banana
Hi, With respect to my previous post, I found somewhere that... to have custom xml tags, I need to extend XmpArray and implement the toString() method. I implemented the following.. public class CustomXmpArray extends XmpArray { private static final long serialVersionUID = -4551741336974797

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-24 Thread Deepti Banana
Hi, Using custom schema, the following xml is being generated.. -http://www.w3.org/1999/02/22-rdf-syntax-ns#";> - - arr0 arr1 I want to know, if this structure also can be custom. For example,

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-22 Thread iText Info
Op 22/04/2013 12:17, Deepti Banana schreef: > Is there any example or documentation with respect to implementing Custom > schema? http://partners.adobe.com/public/developer/en/xmp/sdk/XMPspecification.pdf -- Precog is a

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-22 Thread Deepti Banana
Is there any example or documentation with respect to implementing Custom schema?? Though I implemented the below and it works, I would like to know if this is the correct way. What are the variables serialVersionUID, DEFAULT_XPATH_ID and DEFAULT_XPATH_URI?? Are the values that I have substitute

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-22 Thread iText Info
Op 22/04/2013 11:21, Deepti Banana schreef: > But the custom property added using the below methods are shown in the Custom > Tab of Document properties. > > 1) addHeader method of com.itextpdf.text.Document class > document.addHeader("CUSTOM", "CUSTOM"); > > 2) setMoreInfo method of com.

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-22 Thread Deepti Banana
But the custom property added using the below methods are shown in the Custom Tab of Document properties. 1) addHeader method of com.itextpdf.text.Document class document.addHeader("CUSTOM", "CUSTOM"); 2) setMoreInfo method of com.itextpdf.text.pdf.PdfStamper. PdfStamper stamper

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-22 Thread iText Info
Op 22/04/2013 11:10, Deepti Banana schreef: > Now I have learnt that, properties added through XmpSchema do not reflect in > Document properties. Aha, OK, so that was the basic misunderstanding. It's normal that custom properties aren't shown in Document properties. Also: in PDF 2.0, the Info dict

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-22 Thread Deepti Banana
Yes, its working.!!!... I didn't know that, to add custom properties using Xmp, I had to create my own custom schema. (I got to know through this forum) Secondly, as there was no example that I could refer to, I wasn't sure about the correctness of my custom implementation. That's the reason I ke

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-22 Thread iText Info
Op 22/04/2013 10:31, Deepti Banana schreef: > Code mentioned by you is exactly what I tried. Please find the generated pdf > file attached. Yes, and it works perfectly, so why do you keep on asking about this??? If you look at the XMP metadata, you can clearly see that your custom TEST metadata

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-22 Thread Deepti Banana
Code mentioned by you is exactly what I tried. Please find the generated pdf file attached. LEGAL NOTICE: Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this e-mail by anyone else is unauthorized. If you

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-22 Thread iText Info
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 sn

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-22 Thread Deepti Banana
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); Regards, Deepti LEGAL NOTICE: Unless expressly stated otherwise, this message

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-22 Thread iText Info
Op 22/04/2013 6:36, Deepti Banana schreef: > How can I know, if this property has been set? Where do you set the property? Maybe you create an instance of the CustomSchema object, but we don't see your code adding this schema to the XMP. --

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-22 Thread Deepti Banana
We are using iText to generate our Pdfs. Now the requirement is to add custom properties to this PDF. Also, a xml file needs to be generated with these properties. As you suggested, I tried implementing the customSchema(not sure if this implementation is right) as shown below public class Cust

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-19 Thread Deepti Banana
We are using iText to generate our Pdfs. Now the requirement is to add custom properties to this PDF. Also, a xml file needs to be generated with these properties. As you suggested, I tried implementing the customSchema(not sure if this implementation is right) as shown below public class Cust

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-19 Thread 1T3XT BVBA
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, > DublinCoreSch

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-19 Thread Deepti Banana
Using these schemas, what I understand is, predefined properties can be set like Author, Title etc. To set custom properties(like WorkOrderNo) I tried using XmpSchema, DublinCoreSchema, PdfSchema's methods like XmpWriter : addRdfDescription(String, String) XmpSchema/ PdfSchema: addProperty(Stri

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-18 Thread 1T3XT BVBA
On 19/04/2013 7:08, Deepti wrote: > Does it mean I have to build the xml file myself by defining my tags? That would be one way to do it. The other way would be to use the helper classes in the com.itextpdf.text.xml.xmp package such as XmpSchema, DublinCoreSchema, PdfSchema,... Those are the clas

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-18 Thread Deepti
I have 2 queries regarding this 1) If adding custom metadata to the info dictionary is a bad idea (which if i am not wrong is done by document.addHeader or PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(dest)); HashMap info = reader.getInfo(); in

Re: [iText-questions] Adding & retrieve custom properties to PDF using XMP

2013-04-18 Thread iText Info
Op 18/04/2013 13:27, Deepti schreef: > 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. Of course not! How on earth would iText be able to guess which tag to us