com.groupdocs.watermark.common

Interface IDocumentInfo



  • public interface IDocumentInfo
    Defines the methods that are required for getting the basic document information.

    Learn more

    The following example demonstrates how to retrieve the general document information using IDocumentInfo.

    Watermarker watermarker = new Watermarker("D:\\input.pdf");
       IDocumentInfo docInfo = watermarker.getDocumentInfo();
       System.out.println("File type: " + docInfo.getFileType());
       System.out.println("Number of pages: " + docInfo.getPageCount());
       System.out.println("Document size: " + docInfo.getSize() + " bytes");
       watermarker.close();
     
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      FileType getFileType()
      Gets the file format description.
      int getPageCount()
      Gets the total page count.
      long getSize()
      Gets the document size in bytes.
      boolean isEncrypted()
      Gets a value indicating whether the document is encrypted and requires a password to open.
    • Method Detail

      • getFileType

        FileType getFileType()

        Gets the file format description.

        Returns:
        The file format description.
      • getPageCount

        int getPageCount()

        Gets the total page count.

        Returns:
        The total page count.
      • getSize

        long getSize()

        Gets the document size in bytes.

        Returns:
        The document size in bytes.
      • isEncrypted

        boolean isEncrypted()

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

        Returns:
        True if the document is encrypted and requires a password to open; otherwise, false.