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 - Absolute path to the file.
      • DocFormat

        public DocFormat(InputStream input)

        Initializes a new instance of the DocFormat class.

        Parameters:
        input - File stream.
    • Method Detail

      • getType

        public int getType()

        Gets document type.

        Specified by:
        getType in class FormatBase
      • isProtected

        public final boolean isProtected()

        Returns true if the document is encrypted and requires a password to open.

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

        public final boolean hasDigitalSignatures()

        Gets true if document contains DigitalSignature.

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

        public void cleanMetadata()

        Removes custom document properties and reset built-in properties.


        This feature is not available in trial mode.

        Overrides:
        cleanMetadata in class FormatBase
      • extractComments

        public final DocComment[] extractComments()

        Extract array of DocComment presented in Word document.

        Returns:
        Returns array of DocComment.


        This feature is not available in trial mode.

      • extractComments

        public final DocComment[] extractComments(String author)

        Extracts array of DocComment presented in Word document by 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 the specific comment by id.

        Parameters:
        updatingCommentId - The updating comment identifier.
        comment - The comment.
        Throws:
        com.aspose.ms.System.ArgumentOutOfRangeException - Comment id could not be less zero.
        ArgumentNullException - Comment could not be null.
        GroupDocsException - Could not update 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()

        Returns number of words presented in document.

        Returns:
        Returns number of words.
      • getPagesCount

        public final int getPagesCount()

        Returns number of words presented in document.

        Returns:
        Returns number of pages.