aspose.pdf
Class XmpMetadata

java.lang.Object
  extended by aspose.pdf.XmpMetadata

public class XmpMetadata
extends java.lang.Object

Represents the XmpMetadata of a pdf document.

Typical usages are the following:

[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); Text text = new Text("This is a test for XMP Metadata"); sec1.getParagraphs().add(text); pdf1.setXmpMetadata(new XmpMetadata()); pdf1.getXmpMetadata().addCreationDate((new java.util.Date()).toString()); pdf1.getXmpMetadata().addUserProperty("xmlns:dc=\"http://purl.org/dc/elements/1.1/\"","dc:contributor","Aspose"); pdf1.save(....); [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <XmpMetadata> <MetadataItem Name="CreationDate" Value="2007-7-15 10:51:55" /> <MetadataItem XmlNamespace="xmlns:dc='http://purl.org/dc/elements/1.1/'" Name="dc:contributor" Value="Aspose" /> </XmpMetadata> <Section> <Text> <Segment>This is a test for XMP Metadata</Segment> </Text> </Section> </Pdf>


Field Summary
 aspose.pdf.pdftext.Hashmap MetadataCatalog
          Classification be composited by the xmlns and another Hashmap, the latter represents the metadata of the directory.
 aspose.pdf.pdftext.Hashmap MetadataEntries
          All MetadataEntries be composited by the name and the value.
 
Constructor Summary
XmpMetadata()
          Represents a constructor of the XmpMetadata object.
 
Method Summary
 void addCreationDate(java.lang.String date)
          Adds the CreationDate property.
 void addCreatorTool(java.lang.String tool)
          Adds the CreatorTool property.
 void addMetaDataDate(java.lang.String date)
          Adds the MetaDataDate property.
 void addModifyDate(java.lang.String date)
          Adds the ModifyDate property.
 void addUserProperty(java.lang.String xmlns, java.lang.String name, java.lang.String val)
          Adds a user defined property.
 byte[] getXmpMetadata()
          Get the xmp meta data
 void processEntries()
          Process all the entries included in the document .
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MetadataEntries

public aspose.pdf.pdftext.Hashmap MetadataEntries
All MetadataEntries be composited by the name and the value.


MetadataCatalog

public aspose.pdf.pdftext.Hashmap MetadataCatalog
Classification be composited by the xmlns and another Hashmap, the latter represents the metadata of the directory.

Constructor Detail

XmpMetadata

public XmpMetadata()
Represents a constructor of the XmpMetadata object.

Method Detail

getXmpMetadata

public byte[] getXmpMetadata()
Get the xmp meta data


addCreationDate

public void addCreationDate(java.lang.String date)
Adds the CreationDate property. It will be added into "xmlns:xap='http://ns.adobe.com/xap/1.0/'" namespace.

Parameters:
date - The value of the property.

addCreatorTool

public void addCreatorTool(java.lang.String tool)
Adds the CreatorTool property. It will be added into "xmlns:xap='http://ns.adobe.com/xap/1.0/'" namespace.

Parameters:
tool - The value of the property.

addModifyDate

public void addModifyDate(java.lang.String date)
Adds the ModifyDate property. It will be added into "xmlns:xap='http://ns.adobe.com/xap/1.0/'" namespace.

Parameters:
date - The value of the property.

addMetaDataDate

public void addMetaDataDate(java.lang.String date)
Adds the MetaDataDate property. It will be added into "xmlns:xap='http://ns.adobe.com/xap/1.0/'" namespace.

Parameters:
date - The value of the property.

addUserProperty

public void addUserProperty(java.lang.String xmlns,
                            java.lang.String name,
                            java.lang.String val)
Adds a user defined property.

Parameters:
xmlns - The xml namespace.
name - The name of the property.
val - The value of the property.

processEntries

public void processEntries()
Process all the entries included in the document .