PdfRootPackage
Leave feedback
On this page
Inheritance: java.lang.Object, com.groupdocs.metadata.core.MetadataPackage, com.groupdocs.metadata.core.RootMetadataPackage, com.groupdocs.metadata.core.DocumentRootPackage
All Implemented Interfaces: com.groupdocs.metadata.core.IXmp
public class PdfRootPackage extends DocumentRootPackage<PdfPackage> implements IXmp
Represents the root package allowing working with metadata in a PDF document.
Learn more
This code sample shows how to extract built-in metadata properties from a PDF document.
try (Metadata metadata = new Metadata(Constants.InputPdf)) { PdfRootPackage root = metadata.getRootPackageGeneric(); System.out.println(root.getDocumentProperties().getAuthor()); System.out.println(root.getDocumentProperties().getCreatedDate()); System.out.println(root.getDocumentProperties().getSubject()); System.out.println(root.getDocumentProperties().getProducer()); System.out.println(root.getDocumentProperties().getKeywords()); // … }
| Method | Description |
|---|---|
| getPdfType() | Gets the file type metadata package. |
| getInspectionPackage() | Gets a metadata package containing inspection results for the document. |
| getDocumentStatistics() | Gets the document statistics package. |
| getXmpPackage() | Gets the XMP metadata package. |
| setXmpPackage(XmpPacketWrapper value) | Sets the XMP metadata package. |
public final PdfTypePackage getPdfType()
Gets the file type metadata package.
Returns: PdfTypePackage - The file type metadata package.
public final PdfInspectionPackage getInspectionPackage()
Gets a metadata package containing inspection results for the document. The package contains information about document parts that can be considered as metadata in some cases.
Returns: PdfInspectionPackage - A metadata package containing inspection results for the document.
public final DocumentStatistics getDocumentStatistics()
Gets the document statistics package.
Returns: DocumentStatistics - The document statistics package.
public final XmpPacketWrapper getXmpPackage()
Gets the XMP metadata package.
Returns: XmpPacketWrapper - The XMP metadata package.
Learn more
public final void setXmpPackage(XmpPacketWrapper value)
Sets the XMP metadata package.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | XmpPacketWrapper | The XMP metadata package. |
Learn more
Working with XMP metadata: https://docs.groupdocs.com/display/metadatajava/Working+with+XMP+metadata |
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.