com.groupdocs.metadata

Interfaces

Classes

Exceptions

com.groupdocs.metadata

Class DocFormat

    • Constructor Detail

      • DocFormat

        public DocFormat(String fileName)

        Initializes a new instance of the DocFormat class.

        Parameters:
        fileName - A string that contains the full name of the file from which to create a DocFormat instance.
      • DocFormat

        public DocFormat(String fileName,
                 LoadOptions loadOptions)

        Initializes a new instance of the DocFormat class.

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

        public DocFormat(InputStream input)

        Initializes a new instance of the DocFormat class.

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

        public DocFormat(InputStream input,
                 LoadOptions loadOptions)

        Initializes a new instance of the DocFormat class.

        Parameters:
        input - A stream that contains the data for this DocFormat.
        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.
      • isProtected

        public final boolean isProtected()

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

        Specified by:
        isProtected in interface IProtectableFormat
        Returns:
        true if document is protected; otherwise, false.
      • hasDigitalSignatures

        public final boolean hasDigitalSignatures()

        Gets a value indicating whether the document contains a DigitalSignature.

        Specified by:
        hasDigitalSignatures in interface ISignedFormat
        Returns:
        true if the document has digital signatures; otherwise, false.
      • 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
      • extractComments

        public final DocComment[] extractComments()

        Extract an array of DocComment presented in the document.

        Returns:
        Returns array of DocComment.


        This feature is not available in trial mode.

      • extractComments

        public final DocComment[] extractComments(String author)

        Extracts an array of DocComment presented in the document filtered by a specific author.

        Parameters:
        author - Name of the author.


        This feature is not available in trial mode.

        Returns:
        Returns array of DocComment.
      • clearComments

        public final void clearComments()

        Removes all comments presented in Word document.


        This feature is not available in trial mode.

      • updateComment

        public final void updateComment(int updatingCommentId,
                         DocComment comment)

        Updates a specific comment by its id.

        Parameters:
        updatingCommentId - The updating comment identifier.
        comment - The comment.
      • getRevisions

        public final RevisionCollection getRevisions()

        Gets a collection of revisions (tracked changes) that exist in this document.


        This feature is not supported in trial mode.

      • getWordsCount

        public final int getWordsCount()

        Gets an estimate of the number of words in the document.

        Returns:
        The number of words.


        This method also updates the value of the P:DocumentProperties.Words property.

      • getPagesCount

        public final int getPagesCount()

        Gets an estimate of the number of pages in the document.

        Returns:
        The number of pages.


        This method also updates the value of the P:DocumentProperties.Pages property.

      • 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.