com.groupdocs.metadata

Interfaces

Classes

Exceptions

com.groupdocs.metadata

Class PdfFormat

    • Constructor Detail

      • PdfFormat

        public PdfFormat(String fileName)

        Initializes a new instance of the PdfFormat class.

        Parameters:
        fileName - Absolute path to the file.
      • PdfFormat

        public PdfFormat(InputStream input)

        Initializes a new instance of the PdfFormat class.

        Parameters:
        input - File stream.
    • Method Detail

      • getType

        public int getType()

        Gets document type.

        Specified by:
        getType in class FormatBase
        Returns:
        Document type.
      • getVersion

        public final String getVersion()

        Gets PDF version. Read-only property.

        Returns:
        PDF version.
      • hasDigitalSignatures

        public final boolean hasDigitalSignatures()

        Gets a value indicating whether document contains DigitalSignature.

        Specified by:
        hasDigitalSignatures in interface ISignedFormat
        Returns:
        true if document has digital signatures; otherwise, false.
        Throws:
        GroupDocsException - Could not read digital signatures. Value: true if document has digital signatures; otherwise, false.
      • isProtected

        public final boolean isProtected()

        Gets a value indicating whether PDF document is encrypted and requires a password to open.

        Specified by:
        isProtected in interface IProtectableFormat
        Returns:
        Gets true if PDF is protected; otherwise, false.
      • hasXmp

        public final boolean hasXmp()

        Gets a value indicating whether PdfFormat contains XMP data.

        Specified by:
        hasXmp in interface IXmp
        Returns:
        true if file has XMP; otherwise, false.
      • getXmpValues

        public final XmpEditableCollection getXmpValues()

        Gets XmpEditableCollection. Provides access for all XMP properties in edit mode.

        Specified by:
        getXmpValues in interface IXmp
        Returns:
        XMP values.
      • getXmpData

        public final XmpPacketWrapper getXmpData()

        Returns the XMP packet.

        Specified by:
        getXmpData in interface IXmp
        Returns:
        XmpPacketWrapper if XMP data is presented; otherwise null.
      • getXmpProperties

        public final XmpProperties getXmpProperties()

        Returns all XMP properties presented in PDF document.

        Specified by:
        getXmpProperties in interface IXmp
        Returns:
        XmpProperties if XMP data is presented; otherwise null.
      • setXmpData

        public final boolean setXmpData(XmpPacketWrapper package_)

        Updates XMP packet.

        Specified by:
        setXmpData in interface IXmp
        Parameters:
        package - XMP packet wrapper.
        Returns:
        true if the XMP is successfully updated; otherwise false.
        Throws:
        ArgumentNullException - Xmp packet could not be null.
      • removeXmpData

        public final void removeXmpData()

        Removes all XMP data.


        This feature is not available in trial mode.

        Specified by:
        removeXmpData in interface IXmp
      • getDublinCore

        public final DublinCoreMetadata getDublinCore()

        Gets Dublin Core metadata.

        Specified by:
        getDublinCore in interface IDublinCore
        Returns:
        DublinCoreMetadata if Dublin Core metadata is presented; otherwise null.


        This feature is not supported in trial mode.

      • cleanMetadata

        public void cleanMetadata()

        Remove custom metadata and reset built-in properties like PdfMetadata.CreatedDate.


        This feature is not available in trial mode.

        Overrides:
        cleanMetadata in class FormatBase