public class XmpMetadata extends XmlEntityWithInternals
Represents the XmpMetadata of a pdf document.
[Java] Pdf pdf = new Pdf(); Section s = pdf.getSections().add(); Text text1 = new Text("This is a test for XMP Metadata"); s.getParagraphs().add(text1); pdf.XmpMetadata = new XmpMetadata(); //core properties pdf.getXmpMetadata().addCreationDate(new Date().toString()); //user properties pdf.getXmpMetadata().addUserProperty("xmlns:dc=\"http://purl.org/dc/elements/1.1/\"","dc:contributor","Aspose"); pdf.save("d:\\test\\test.pdf"); [XML] <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>
Constructor and Description |
---|
XmpMetadata()
Represents a constructor of the XmpMetadata object.
|
Modifier and Type | Method and Description |
---|---|
void |
addCreationDate(String date)
Adds the CreationDate property.
|
void |
addCreatorTool(String tool)
Adds the CreatorTool property.
|
void |
addMetaDataDate(String date)
Adds the MetaDataDate property.
|
void |
addModifyDate(String date)
Adds the ModifyDate property.
|
void |
addUserProperty(String xmlns,
String name,
String val)
Adds a user defined property.
|
load
public XmpMetadata()
Represents a constructor of the XmpMetadata object.
public void addCreationDate(String date)
Adds the CreationDate property. It will be added into "xmlns:xap='http://ns.adobe.com/xap/1.0/'" namespace.
date
- The value of the property.public void addCreatorTool(String tool)
Adds the CreatorTool property. It will be added into "xmlns:xap='http://ns.adobe.com/xap/1.0/'" namespace.
tool
- The value of the property.public void addModifyDate(String date)
Adds the ModifyDate property. It will be added into "xmlns:xap='http://ns.adobe.com/xap/1.0/'" namespace.
date
- The value of the property.public void addMetaDataDate(String date)
Adds the MetaDataDate property. It will be added into "xmlns:xap='http://ns.adobe.com/xap/1.0/'" namespace.
date
- The value of the property.Copyright © 2014 Aspose. All Rights Reserved.