PdfPackage
Leave feedback
On this page
Inheritance: java.lang.Object, com.groupdocs.metadata.core.MetadataPackage, com.groupdocs.metadata.core.CustomPackage, com.groupdocs.metadata.core.DocumentPackage
public class PdfPackage extends DocumentPackage
Represents native metadata in a PDF document.
Learn more
This code snippet demonstrates how to update built-in metadata properties in a PDF document.
try (Metadata metadata = new Metadata(Constants.InputPdf)) { PdfRootPackage root = metadata.getRootPackageGeneric(); root.getDocumentProperties().setAuthor(“test author”); root.getDocumentProperties().setCreatedDate(new Date()); root.getDocumentProperties().setTitle(“test title”); root.getDocumentProperties().setKeywords(“metadata, built-in, update”); // … metadata.save(Constants.OutputPdf); }
| Method | Description |
|---|---|
| getAuthor() | Gets the document author. |
| setAuthor(String value) | Sets the document author. |
| getCreatedDate() | Gets the date of document creation. |
| setCreatedDate(Date value) | Sets the date of document creation. |
| getCreator() | Gets the creator of the document. |
| setCreator(String value) | Gets the creator of the document. |
| getKeywords() | Gets the keywords. |
| setKeywords(String value) | Sets the keywords. |
| getModifiedDate() | Gets the date of the last modification. |
| setModifiedDate(Date value) | Sets the date of the last modification. |
| getProducer() | Gets the document producer. |
| setProducer(String value) | Gets the document producer. |
| getSubject() | Gets the subject of the document. |
| setSubject(String value) | Sets the subject of the document. |
| getTitle() | Gets the title of the document. |
| setTitle(String value) | Sets the title of the document. |
| getTrappedFlag() | Gets the trapped flag. |
| setTrappedFlag(Boolean value) | Sets the trapped flag. |
| set(String propertyName, String value) | Adds or replaces the metadata property with the specified name. |
public final String getAuthor()
Gets the document author.
Returns: java.lang.String - The document author.
public final void setAuthor(String value)
Sets the document author.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The document author. |
public final Date getCreatedDate()
Gets the date of document creation.
Returns: java.util.Date - The date of document creation.
public final void setCreatedDate(Date value)
Sets the date of document creation.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.util.Date | The date of document creation. |
public final String getCreator()
Gets the creator of the document.
Returns: java.lang.String - The creator of the document.
public final void setCreator(String value)
Gets the creator of the document.
Value: The creator of the document.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String |
public final String getKeywords()
Gets the keywords.
Returns: java.lang.String - The keywords.
public final void setKeywords(String value)
Sets the keywords.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The keywords. |
public final Date getModifiedDate()
Gets the date of the last modification.
Returns: java.util.Date - The date of the last modification.
public final void setModifiedDate(Date value)
Sets the date of the last modification.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.util.Date | The date of the last modification. |
public final String getProducer()
Gets the document producer.
Returns: java.lang.String - The document producer.
public final void setProducer(String value)
Gets the document producer.
Value: The document producer.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String |
public final String getSubject()
Gets the subject of the document.
Returns: java.lang.String - The subject of the document.
public final void setSubject(String value)
Sets the subject of the document.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The subject of the document. |
public final String getTitle()
Gets the title of the document.
Returns: java.lang.String - The title of the document.
public final void setTitle(String value)
Sets the title of the document.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String | The title of the document. |
public final Boolean getTrappedFlag()
Gets the trapped flag.
Returns: java.lang.Boolean - true if the trapped flag is set; otherwise, false .
public final void setTrappedFlag(Boolean value)
Sets the trapped flag.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.Boolean | true if the trapped flag is set; otherwise, false . |
public final void set(String propertyName, String value)
Adds or replaces the metadata property with the specified name.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| propertyName | java.lang.String | The property name. |
| value | java.lang.String | The property value. |
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.