com.pdfunit.validators

## Class RenderedPageValidator

- java.lang.Object
- - com.pdfunit.validators.AbstractValidator
  - - com.pdfunit.validators.AbstractPageValidator
    - - com.pdfunit.validators.RenderedPageValidator

-     @DoNotObfuscate
      public final class RenderedPageValidator
      extends com.pdfunit.validators.AbstractPageValidator

  This validator contains methods to compare a rendered page of PDF document with a given image.
  Since:
    2016.05
  Author:
    Carsten Siedentop, February 2016

- - ### Field Summary

    - ### Fields inherited from class com.pdfunit.validators.AbstractPageValidator

      `effectedPageNumbers, pageScanFlag, pagesToUse, region`

    - ### Fields inherited from class com.pdfunit.validators.AbstractValidator

      `testDocument`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `RenderedPageValidator(DocumentValidator documentValidator)`
    `protected` | `RenderedPageValidator(PageValidator pageValidator)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `RenderedPageValidator` | `isEqualToImage(java.awt.image.BufferedImage renderedImage)` This method compares an image of a page with a defined page of the current PDF.
    `RenderedPageValidator` | `isEqualToImage(java.io.File imageFile)` This method compares an image of a page with a defined page of the current PDF.
    `RenderedPageValidator` | `isEqualToImage(int leftX, int upperY, FormatUnit unit, java.awt.image.BufferedImage expectedImage)` This method compares a rectangle of a page of the current PDF document to the given image.
    `RenderedPageValidator` | `isEqualToImage(int leftX, int upperY, FormatUnit unit, java.io.File imageFile)` This method compares a rectangle of a page of the current PDF document to the image, created from the file parameter.
    `RenderedPageValidator` | `isEqualToImage(int leftX, int upperY, FormatUnit unit, java.lang.String imageName)` This method compares a rectangle of a page of the current PDF document to the image, created from the filename parameter.
    `RenderedPageValidator` | `isEqualToImage(java.lang.String imageName)` This method compares an image of a page with a defined page of the current PDF.
    `RenderedPageValidator` | `isEqualToImages(java.awt.image.BufferedImage... renderedImages)` This method compares images of a one or more pages with defined pages of the current PDF.
    `RenderedPageValidator` | `isEqualToImages(java.io.File... referencedImageFiles)` This method compares images of a one or more pages with defined pages of the current PDF.
    `RenderedPageValidator` | `isEqualToImages(int leftX, int upperY, FormatUnit unit, java.awt.image.BufferedImage... renderedImages)` This method compares a rectangle of a page of the current PDF document to the image that was passed with the second parameter.
    `RenderedPageValidator` | `isEqualToImages(int leftX, int upperY, FormatUnit unit, java.io.File... referencedImageFiles)`
    `RenderedPageValidator` | `isEqualToImages(int leftX, int upperY, FormatUnit unit, java.lang.String... renderedImageFilenames)`
    `RenderedPageValidator` | `isEqualToImages(java.lang.String... renderedImageFilenames)` This method compares images of a one or more pages with defined pages of the current PDF.

    - ### Methods inherited from class com.pdfunit.validators.AbstractPageValidator

      `createFullSizeRegionFromDocument, getEffectedPages, getPageScanFlag, setPagesToUse, setRegion`

    - ### Methods inherited from class com.pdfunit.validators.AbstractValidator

      `closeDocument, equals, getDocument, hashCode`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RenderedPageValidator

          protected RenderedPageValidator(DocumentValidator documentValidator)

    - #### RenderedPageValidator

          protected RenderedPageValidator(PageValidator pageValidator)

  - ### Method Detail

    - #### isEqualToImage

          @Guarded
          public RenderedPageValidator isEqualToImage(java.awt.image.BufferedImage renderedImage)

      This method compares an image of a page with a defined page of the current PDF.
      See Also:
        `isEqualToImages(BufferedImage...)`

    - #### isEqualToImages

          @Guarded
          public RenderedPageValidator isEqualToImages(java.awt.image.BufferedImage... renderedImages)

      This method compares images of a one or more pages with defined pages of the current PDF.

      This method is functional the same as the method with the same name in singular, but it can compare multiple images to multiple pages.

      See Also:
        `isEqualToImage(BufferedImage)`

    - #### isEqualToImage

          @Guarded
          public RenderedPageValidator isEqualToImage(int leftX,
                                                     int upperY,
                                                     FormatUnit unit,
                                                     java.awt.image.BufferedImage expectedImage)

      This method compares a rectangle of a page of the current PDF document to the given image.

      The rectangle is given by the first and second parameter of this methods defining the upper left corner. Width and height are detected from the given image.

    - #### isEqualToImages

          @Guarded
          public RenderedPageValidator isEqualToImages(int leftX,
                                                      int upperY,
                                                      FormatUnit unit,
                                                      java.awt.image.BufferedImage... renderedImages)

      This method compares a rectangle of a page of the current PDF document to the image that was passed with the second parameter.

      The upper left point of the rectangle on the PDF page is defined by the first two parameters. Width and height are detected from the given image.

    - #### isEqualToImage

          @Guarded
          public RenderedPageValidator isEqualToImage(java.io.File imageFile)

      This method compares an image of a page with a defined page of the current PDF.
      See Also:
        `isEqualToImages(File...)`

    - #### isEqualToImages

          @Guarded
          public RenderedPageValidator isEqualToImages(java.io.File... referencedImageFiles)

      This method compares images of a one or more pages with defined pages of the current PDF.

      This method is functional the same as the method with the same name in singular, but it can compare multiple images to multiple pages.

      See Also:
        `isEqualToImage(File)`

    - #### isEqualToImage

          @Guarded
          public RenderedPageValidator isEqualToImage(int leftX,
                                                     int upperY,
                                                     FormatUnit unit,
                                                     java.io.File imageFile)

      This method compares a rectangle of a page of the current PDF document to the image, created from the file parameter.

      The rectangle is given by the first and second parameter of this methods defining the upper left corner. Width and height are detected from the given image.

    - #### isEqualToImages

          @Guarded
          public RenderedPageValidator isEqualToImages(int leftX,
                                                      int upperY,
                                                      FormatUnit unit,
                                                      java.io.File... referencedImageFiles)

    - #### isEqualToImage

          @Guarded
          public RenderedPageValidator isEqualToImage(java.lang.String imageName)

      This method compares an image of a page with a defined page of the current PDF.
      See Also:
        `isEqualToImages(String...)`

    - #### isEqualToImages

          @Guarded
          public RenderedPageValidator isEqualToImages(java.lang.String... renderedImageFilenames)

      This method compares images of a one or more pages with defined pages of the current PDF.

      This method is functional the same as the method with the same name in singular, but it can compare multiple images to multiple pages.

      See Also:
        `isEqualToImage(String)`

    - #### isEqualToImage

          @Guarded
          public RenderedPageValidator isEqualToImage(int leftX,
                                                     int upperY,
                                                     FormatUnit unit,
                                                     java.lang.String imageName)

      This method compares a rectangle of a page of the current PDF document to the image, created from the filename parameter.

      The rectangle is given by the first and second parameter of this methods defining the upper left corner. Width and height are detected from the given image.

    - #### isEqualToImages

          @Guarded
          public RenderedPageValidator isEqualToImages(int leftX,
                                                      int upperY,
                                                      FormatUnit unit,
                                                      java.lang.String... renderedImageFilenames)

Copyright (C) PDFUnit.com. See here for license.