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()); // ... }
Modifier and Type | Method and Description |
---|---|
DocumentStatistics |
getDocumentStatistics()
Gets the document statistics package.
|
PdfInspectionPackage |
getInspectionPackage()
Gets a metadata package containing inspection results for the document.
|
PdfTypePackage |
getPdfType()
Gets the file type metadata package.
|
XmpPacketWrapper |
getXmpPackage()
Gets the XMP metadata package.
|
void |
setXmpPackage(XmpPacketWrapper value)
Sets the XMP metadata package.
|
getDocumentProperties
getFileType, sanitize
addProperties, contains, findProperties, get_Item, getCount, getKeys, getKnowPropertyDescriptors, getMetadataType, getPropertyDescriptors, iterator, removeProperties, setProperties, updateProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public final PdfTypePackage getPdfType()
Gets 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.
public final DocumentStatistics getDocumentStatistics()
Gets the document statistics package.
public final XmpPacketWrapper getXmpPackage()
Gets the XMP metadata package.
getXmpPackage
in interface IXmp
Learn more
public final void setXmpPackage(XmpPacketWrapper value)
Sets the XMP metadata package.
setXmpPackage
in interface IXmp
value
- The XMP metadata package.
Learn more