You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
When I compare two pdf file using the PDFUtil, I encountered the following exception:
java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
at sun.awt.image.IntegerInterleavedRaster.getDataElements(IntegerInterleavedRaster.java:219)
at java.awt.image.BufferedImage.getRGB(BufferedImage.java:986)
at com.testautomationguru.utility.ImageUtil.compareAndHighlight(ImageUtil.java:20)
at com.testautomationguru.utility.PDFUtil.convertToImageAndCompare(PDFUtil.java:479)
at com.testautomationguru.utility.PDFUtil.comparePdfByImage(PDFUtil.java:450)
at com.testautomationguru.utility.PDFUtil.comparePdfFiles(PDFUtil.java:311)
at com.testautomationguru.utility.PDFUtil.compare(PDFUtil.java:271)
at com.sls.awb.PdfDiff2.main(PdfDiff2.java:28)
Would you please help to see what the problem is?Thank you
My Java Code:
package com.sls.awb;
import java.io.IOException;
import com.testautomationguru.utility.CompareMode;
import com.testautomationguru.utility.PDFUtil;
public class PdfDiff2 {
public static void main(String[] args) throws IOException {
PDFUtil pdfUtil = new PDFUtil();
pdfUtil.setCompareMode(CompareMode.VISUAL_MODE);
boolean same = pdfUtil.compare(args[0], args[1]);
if (same) {
System.out.println("same");
} else {
System.out.println("diff");
}
}
}
The two PDFS used for comparison can be viewed in the attachment test-v1.pdf test-v2.pdf
The text was updated successfully, but these errors were encountered:
Hi,
When I compare two pdf file using the PDFUtil, I encountered the following exception:
java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
at sun.awt.image.IntegerInterleavedRaster.getDataElements(IntegerInterleavedRaster.java:219)
at java.awt.image.BufferedImage.getRGB(BufferedImage.java:986)
at com.testautomationguru.utility.ImageUtil.compareAndHighlight(ImageUtil.java:20)
at com.testautomationguru.utility.PDFUtil.convertToImageAndCompare(PDFUtil.java:479)
at com.testautomationguru.utility.PDFUtil.comparePdfByImage(PDFUtil.java:450)
at com.testautomationguru.utility.PDFUtil.comparePdfFiles(PDFUtil.java:311)
at com.testautomationguru.utility.PDFUtil.compare(PDFUtil.java:271)
at com.sls.awb.PdfDiff2.main(PdfDiff2.java:28)
Would you please help to see what the problem is?Thank you
My Java Code:
The two PDFS used for comparison can be viewed in the attachment
test-v1.pdf
test-v2.pdf
The text was updated successfully, but these errors were encountered: