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 - A string that contains the full name of the file from which to create a PdfFormat instance.
      • PdfFormat

        public PdfFormat(String fileName,
                 LoadOptions loadOptions)

        Initializes a new instance of the PdfFormat class.

        Parameters:
        fileName - A string that contains the full name of the file from which to create a PdfFormat instance.
        loadOptions - Additional options to use when loading a document.
      • PdfFormat

        public PdfFormat(InputStream input)

        Initializes a new instance of the PdfFormat class.

        Parameters:
        input - A stream that contains the data for this PdfFormat.
      • PdfFormat

        public PdfFormat(InputStream input,
                 LoadOptions loadOptions)

        Initializes a new instance of the PdfFormat class.

        Parameters:
        input - A stream that contains the data for this PdfFormat.
        loadOptions - Additional options to use when loading a document.
    • Method Detail

      • getType

        public int getType()

        Gets the type of the loaded file.

        Specified by:
        getType in class FormatBase
        Returns:
        The type of the loaded file.
      • getVersion

        public final String getVersion()

        Gets the PDF version.

        Returns:
        The PDF version.
      • hasDigitalSignatures

        public final boolean hasDigitalSignatures()

        Gets a value indicating whether the document contains a 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 the document has digital signatures; otherwise, false.
      • isProtected

        public final boolean isProtected()

        Gets a value indicating whether the 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 the file contains XMP metadata.

        Specified by:
        hasXmp in interface IXmp
        Returns:
        true if the file contains an XMP metadata package; otherwise, false.
      • getXmpValues

        public final XmpEditableCollection getXmpValues()

        Gets a collection containing the XMP metadata properties. Provides access to all XMP properties in edit mode.

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

        public final XmpPacketWrapper getXmpData()

        Returns the XMP packet.

        Specified by:
        getXmpData in interface IXmp
        Returns:
        The XmpPacketWrapper if the file contains an XMP metadata package; otherwise, null.
      • getXmpProperties

        public final XmpProperties getXmpProperties()

        Returns all XMP properties presented in a specific format.

        Specified by:
        getXmpProperties in interface IXmp
        Returns:
        The XmpProperties if the file contains an XMP metadata package; otherwise, null.
      • setXmpData

        public final boolean setXmpData(XmpPacketWrapper package_)

        Updates the XMP packet.

        Specified by:
        setXmpData in interface IXmp
        Parameters:
        package - An XMP packet wrapper.
        Returns:
        true if the XMP package is successfully updated; otherwise, false.
      • removeXmpData

        public final void removeXmpData()

        Removes the XMP metadata.


        This feature is not available in trial mode.

        Specified by:
        removeXmpData in interface IXmp
      • getDublinCore

        public final DublinCoreMetadata getDublinCore()

        Retrieves the Dublin Core metadata.

        Specified by:
        getDublinCore in interface IDublinCore
        Returns:
        The DublinCoreMetadata if the appropriate package is found; otherwise, null.
      • cleanMetadata

        public void cleanMetadata()

        Removes metadata found in the document.


        This feature is not available in trial mode.

        Overrides:
        cleanMetadata in class FormatBase
      • dispose

        protected void dispose(boolean disposing)

        Releases unmanaged and optionally managed resources.

        Overrides:
        dispose in class FormatBase
        Parameters:
        disposing - true to release both managed and unmanaged resources; false to release only unmanaged resources.