Hello,
I am updating the XMP metadata in a PDF so following the XMP spec I am trying
to set the value for xmp:MetadataDate using the XmpBasicSchema. Working from
example 12.4 in iText in Action Second Edition I was partially successful using:
XmpSchema xmp = new XmpBasicSchema();
xmp.setProperty(XmpBasicSchema.METADATADATE,
ModifyXMP.generateXmpDateString());
xmpWriter.addRdfDescription(xmp);
Which outputs:
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/">
<xmp:MetadataDate>2011-08-25T08:28:03-07:00</xmp:MetadataDate>
<xmp:ModifyDate>2011-08-25T08:28:03-07:00</xmp:ModifyDate>
</rdf:Description>
While retaining the xmp:ModifyDate unfortunately I've lost the CreateDate and
CreatorTool values as seen in this output with the 3 lines of code seen above
commented out.
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/">
<xmp:CreateDate>2011-08-18T09:55:55-07:00</xmp:CreateDate>
<xmp:CreatorTool>PScript5.dll Version 5.2.2</xmp:CreatorTool>
<xmp:ModifyDate>2011-08-25T08:12:34-07:00</xmp:ModifyDate>
</rdf:Description>
Is there a way to retain the original CreateDate and CreatorTool values while
setting the MetadataDate value?
Thanks in advance,
Chris
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
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