PdfRootPackage
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()); // … }
Methods
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. |
getPdfType()
public final PdfTypePackage getPdfType()
Gets the file type metadata package.
Returns: PdfTypePackage - The file type metadata package.
getInspectionPackage()
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.
getDocumentStatistics()
public final DocumentStatistics getDocumentStatistics()
Gets the document statistics package.
Returns: DocumentStatistics - The document statistics package.
getXmpPackage()
public final XmpPacketWrapper getXmpPackage()
Gets the XMP metadata package.
Returns: XmpPacketWrapper - The XMP metadata package.
Learn more
setXmpPackage(XmpPacketWrapper value)
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 |