com.groupdocs.metadata.core

Interfaces

Classes

Enums

Exceptions

com.groupdocs.metadata.core

Class PdfRootPackage

  • All Implemented Interfaces:
    IXmp, Iterable<MetadataProperty>


    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 Detail

      • getPdfType

        public final PdfTypePackage getPdfType()

        Gets the file type metadata package.

        Returns:
        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:
        A metadata package containing inspection results for the document.
      • getDocumentStatistics

        public final DocumentStatistics getDocumentStatistics()

        Gets the document statistics package.

        Returns:
        The document statistics package.