com.groupdocs.viewer.results

Class Page



  • public class Page
    extends Object

    Represents single page that can be viewed.

    • Constructor Summary

      Constructors 
      Constructor and Description
      Page(int number, boolean visible)
      Initializes new instance of Page class.
      Page(int number, boolean visible, int width, int height)
      Initializes new instance of Page class.
      Page(int number, boolean visible, int width, int height, List<Line> lines)
      Initializes new instance of Page class.
    • Constructor Detail

      • Page

        public Page(int number,
            boolean visible)

        Initializes new instance of Page class.

        Parameters:
        number - The page number.
        visible - The page visibility indicator.
        Throws:
        IllegalArgumentException - Thrown when number is less or equal to zero.
      • Page

        public Page(int number,
            boolean visible,
            int width,
            int height)

        Initializes new instance of Page class.

        Parameters:
        number - The page number.
        visible - The page visibility indicator.
        width - The width of the page in pixels when viewing as JPG or PNG.
        height - The height of the page in pixels when viewing as JPG or PNG.
        Throws:
        IllegalArgumentException - Thrown when number is less or equal to zero.
        IllegalArgumentException - Thrown when width is less or equal to zero.
        IllegalArgumentException - Thrown when height is less or equal to zero.
      • Page

        public Page(int number,
            boolean visible,
            int width,
            int height,
            List<Line> lines)

        Initializes new instance of Page class.

        Parameters:
        number - The page number.
        visible - The page visibility indicator.
        width - The width of the page in pixels when viewing as JPG or PNG.
        height - The height of the page in pixels when viewing as JPG or PNG.
        lines - The lines contained by the page when viewing as JPG or PNG with enabled Text Extraction.
        Throws:
        IllegalArgumentException - Thrown when number is less or equal to zero.
        IllegalArgumentException - Thrown when width is less or equal to zero.
        IllegalArgumentException - Thrown when height is less or equal to zero.
        IllegalArgumentException - Thrown when lines is null.
    • Method Detail

      • getHeight

        public final int getHeight()
        The height of the page in pixels when viewing as JPG or PNG.
        Returns:
        The height of the page in pixels when viewing as JPG or PNG.
      • getLines

        public final List<Line> getLines()
        The lines contained by the page when viewing as JPG or PNG with enabled Text Extraction.
        Returns:
        The lines contained by the page when viewing as JPG or PNG with enabled Text Extraction.
      • getNumber

        public final int getNumber()
        The page number.
        Returns:
        The page number.
      • getWidth

        public final int getWidth()
        The width of the page in pixels when viewing as JPG or PNG.
        Returns:
        The width of the page in pixels when viewing as JPG or PNG.
      • isVisible

        public final boolean isVisible()
        The page visibility indicator.
        Returns:
        The page visibility indicator.
      • toString

        public String toString()

        Returns a string that represents the current object.

        Overrides:
        toString in class Object
        Returns:
        A string that represents the current object.