| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| public static enum | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final BufferedImage |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static int | calcCombinedIntensity(final int element)
Calculate the combined intensity of a pixel and normalizes it to a value of at most 255. |
| private static int | |
| public static List | Returns: A list ofPdfCompareResult instances describing differences.Whether to return the images in the case they are good (ie. the same). keepSameImages)Compares two PDF documents by rendering each page to an image and comparing pixel by pixel. |
| public static BufferedImage | |
| private static int | |
| private static int | |
| private static int | |
| private static int | |
| private static int | |
| private static boolean | Returns: whether imgExpected is different image compared to imgActualGets the data buffer of each image and compares. |
| private static int | Returns: A value that is at least 50 and at most maxIntensitycolor component to level darkness, final int highest possible intensity cut off maxIntensity)Levels the color intensity to at least 50 and at most maxIntensity. |
| LEFT_MARGIN_PX | back to summary |
|---|---|
| private static final int LEFT_MARGIN_PX | |
| LINE_HEIGHT_PX | back to summary |
|---|---|
| private static final int LINE_HEIGHT_PX | |
| ONE_PX_IMAGE | back to summary |
|---|---|
| private static final BufferedImage ONE_PX_IMAGE | |
| PdfVisualTester | back to summary |
|---|---|
| public PdfVisualTester() | |
| calcCombinedIntensity | back to summary |
|---|---|
| private static int calcCombinedIntensity(final int element) Calculate the combined intensity of a pixel and normalizes it to a value of at most 255. | |
| color | back to summary |
|---|---|
| private static int color(final int r, final int g, final int b) | |
| comparePdfDocuments | back to summary |
|---|---|
| public static List Compares two PDF documents by rendering each page to an image and comparing pixel by pixel.
| |
| createDiffImage | back to summary |
|---|---|
| public static BufferedImage createDiffImage(BufferedImage img1, BufferedImage img2) | |
| fade | back to summary |
|---|---|
| private static int fade(final int i) | |
| fadeElement | back to summary |
|---|---|
| private static int fadeElement(final int i) | |
| getActualPixel | back to summary |
|---|---|
| private static int getActualPixel(BufferedImage img, int x, int y) | |
| getElement | back to summary |
|---|---|
| private static int getElement(final int expectedElement, final int actualElement) | |
| getExpectedPixel | back to summary |
|---|---|
| private static int getExpectedPixel(BufferedImage img, int x, int y) | |
| isImageDifferent | back to summary |
|---|---|
| private static boolean isImageDifferent(BufferedImage imgExpected, BufferedImage imgActual) Gets the data buffer of each image and compares. Note May be an expensive (memory and CPU) operation for large images.
| |
| levelIntensity | back to summary |
|---|---|
| private static int levelIntensity(final int darkness, final int maxIntensity) Levels the color intensity to at least 50 and at most maxIntensity.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| public final String | |
| public final int | |
| public final PdfVisualTester. | |
| public final PdfVisualTester. |
| Access | Constructor and Description |
|---|---|
| private | PdfCompareResult(PdfVisualTester.
|
| INALID_PAGE_NO | back to summary |
|---|---|
| public static final int INALID_PAGE_NO | |
| logMessage | back to summary |
|---|---|
| public final String logMessage | |
| pageNumber | back to summary |
|---|---|
| public final int pageNumber | |
| testImages | back to summary |
|---|---|
| public final PdfVisualTester. | |
| type | back to summary |
|---|---|
| public final PdfVisualTester. | |
| PdfCompareResult | back to summary |
|---|---|
| private PdfCompareResult(PdfVisualTester. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final PdfVisualTester. | |
| public static final PdfVisualTester. | |
| public static final PdfVisualTester. | |
| public static final PdfVisualTester. | |
| public static final PdfVisualTester. | |
| public static final PdfVisualTester. | |
| public static final PdfVisualTester. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static PdfVisualTester. | |
| public static PdfVisualTester. |
| EXTRA_EXPECTED_PAGE | back to summary |
|---|---|
| public static final PdfVisualTester. | |
| NO_ACTUAL_DOCUMENT_PROVIDED | back to summary |
|---|---|
| public static final PdfVisualTester. | |
| NO_EXPECTED_DOCUMENT_PROVIDED | back to summary |
|---|---|
| public static final PdfVisualTester. | |
| PAGE_COUNT_DIFFERENT | back to summary |
|---|---|
| public static final PdfVisualTester. | |
| PAGE_GOOD | back to summary |
|---|---|
| public static final PdfVisualTester. | |
| PAGE_SIZE_DIFFERENT | back to summary |
|---|---|
| public static final PdfVisualTester. | |
| PAGE_VISUALLY_DIFFERENT | back to summary |
|---|---|
| public static final PdfVisualTester. | |
| ProblemType | back to summary |
|---|---|
| private ProblemType() | |
| valueOf | back to summary |
|---|---|
| public static PdfVisualTester. | |
| values | back to summary |
|---|---|
| public static PdfVisualTester. | |
| Modifier and Type | Field and Description |
|---|---|
| private final BufferedImage | |
| private final boolean | |
| private final BufferedImage | |
| private final int | |
| private final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public BufferedImage | Returns: the diff image.Creates a diff image to quickly spot differences between expected and actual. |
| public BufferedImage | Returns: the actual image, may be null if expected has more pages than actualGet the actual rendered image. |
| public BufferedImage | |
| public int | |
| public String | Returns: the test name passed intoPdfVisualTester#comparePdfDocuments(byte[], byte[], String, boolean)
|
| public boolean | Returns: true if the images are different. Precaulculated.Should usually be called before |
| actual | back to summary |
|---|---|
| private final BufferedImage actual | |
| differences | back to summary |
|---|---|
| private final boolean differences | |
| expected | back to summary |
|---|---|
| private final BufferedImage expected | |
| pageNumber | back to summary |
|---|---|
| private final int pageNumber | |
| testName | back to summary |
|---|---|
| private final String testName | |
| TestImage | back to summary |
|---|---|
| private TestImage(String test, int pageNo, BufferedImage exp, BufferedImage act, boolean hasDifferences) | |
| createDiff | back to summary |
|---|---|
| public BufferedImage createDiff() Creates a diff image to quickly spot differences between expected and actual. Note May be expensive for large images.
| |
| getActual | back to summary |
|---|---|
| public BufferedImage getActual() Get the actual rendered image.
| |
| getExpected | back to summary |
|---|---|
| public BufferedImage getExpected() Get the expected rendered image.
| |
| getPageNumber | back to summary |
|---|---|
public int getPageNumber()
| |
| getTestName | back to summary |
|---|---|
public String getTestName()
| |
| hasDifferences | back to summary |
|---|---|
| public boolean hasDifferences() Should usually be called before
| |