public class CompareTool extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
CompareTool.CompareResult |
Constructor and Description |
---|
CompareTool() |
Modifier and Type | Method and Description |
---|---|
String |
compare(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix) |
String |
compare(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix, Map<Integer,List<Rectangle>> ignoredAreas) |
boolean |
compareArrays(PdfArray outArray, PdfArray cmpArray) |
boolean |
compareBooleans(PdfBoolean outBoolean, PdfBoolean cmpBoolean) |
protected String |
compareByContent(String outPath, String differenceImagePrefix, Map<Integer,List<Rectangle>> ignoredAreas) |
String |
compareByContent(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix) |
String |
compareByContent(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix, Map<Integer,List<Rectangle>> ignoredAreas) |
boolean |
compareContentStreamsByParsing(PdfObject outObj, PdfObject cmpObj) |
boolean |
compareContentStreamsByParsing(PdfObject outObj, PdfObject cmpObj, PdfDictionary outResources, PdfDictionary cmpResources) |
boolean |
compareDictionaries(PdfDictionary outDict, PdfDictionary cmpDict) |
String |
compareDocumentInfo(String outPdf, String cmpPdf) |
String |
compareLinks(String outPdf, String cmpPdf) |
boolean |
compareLiterals(PdfLiteral outLiteral, PdfLiteral cmpLiteral) |
boolean |
compareNames(PdfName outName, PdfName cmpName) |
boolean |
compareNumbers(PdfNumber outNumber, PdfNumber cmpNumber) |
boolean |
compareStreams(PRStream outStream, PRStream cmpStream) |
boolean |
compareStrings(PdfString outString, PdfString cmpString) |
String |
compareTagStructures(String outPdf, String cmpPdf) |
boolean |
compareXmls(byte[] xml1, byte[] xml2) |
boolean |
compareXmls(String xml1, String xml2) |
String |
compareXmp(byte[] xmp1, byte[] xmp2) |
String |
compareXmp(byte[] xmp1, byte[] xmp2, boolean ignoreDateAndProducerProperties) |
String |
compareXmp(String outPdf, String cmpPdf) |
String |
compareXmp(String outPdf, String cmpPdf, boolean ignoreDateAndProducerProperties) |
String |
getXmlReportName() |
CompareTool |
setCompareByContentErrorsLimit(int compareByContentMaxErrorCount)
Sets the maximum errors count which will be returned as the result of the comparison.
|
CompareTool |
setFloatAbsoluteError(float error)
Sets the absolute error parameter which will be used in floating point numbers comparison.
|
CompareTool |
setFloatRelativeError(float error)
Sets the relative error parameter which will be used in floating point numbers comparison.
|
void |
setGenerateCompareByContentXmlReport(boolean generateCompareByContentXmlReport) |
void |
setXmlReportName(String xmlReportName) |
public String compare(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix, Map<Integer,List<Rectangle>> ignoredAreas) throws IOException, InterruptedException, DocumentException
public String compare(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix) throws IOException, InterruptedException, DocumentException
public CompareTool setCompareByContentErrorsLimit(int compareByContentMaxErrorCount)
compareByContentMaxErrorCount
- the errors count.
public void setGenerateCompareByContentXmlReport(boolean generateCompareByContentXmlReport)
public CompareTool setFloatAbsoluteError(float error)
error
- the epsilon new value.
public CompareTool setFloatRelativeError(float error)
error
- the epsilon new value.
public String getXmlReportName()
public void setXmlReportName(String xmlReportName)
protected String compareByContent(String outPath, String differenceImagePrefix, Map<Integer,List<Rectangle>> ignoredAreas) throws DocumentException, InterruptedException, IOException
public String compareByContent(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix, Map<Integer,List<Rectangle>> ignoredAreas) throws DocumentException, InterruptedException, IOException
public String compareByContent(String outPdf, String cmpPdf, String outPath, String differenceImagePrefix) throws DocumentException, InterruptedException, IOException
public boolean compareDictionaries(PdfDictionary outDict, PdfDictionary cmpDict) throws IOException
IOException
public boolean compareContentStreamsByParsing(PdfObject outObj, PdfObject cmpObj) throws IOException
IOException
public boolean compareContentStreamsByParsing(PdfObject outObj, PdfObject cmpObj, PdfDictionary outResources, PdfDictionary cmpResources) throws IOException
IOException
public boolean compareStreams(PRStream outStream, PRStream cmpStream) throws IOException
IOException
public boolean compareArrays(PdfArray outArray, PdfArray cmpArray) throws IOException
IOException
public boolean compareLiterals(PdfLiteral outLiteral, PdfLiteral cmpLiteral)
public boolean compareBooleans(PdfBoolean outBoolean, PdfBoolean cmpBoolean)
public String compareXmp(byte[] xmp1, byte[] xmp2)
public String compareXmp(byte[] xmp1, byte[] xmp2, boolean ignoreDateAndProducerProperties)
public String compareXmp(String outPdf, String cmpPdf, boolean ignoreDateAndProducerProperties)
public boolean compareXmls(byte[] xml1, byte[] xml2) throws ParserConfigurationException, SAXException, IOException
public String compareDocumentInfo(String outPdf, String cmpPdf) throws IOException
IOException
public String compareLinks(String outPdf, String cmpPdf) throws IOException
IOException
public String compareTagStructures(String outPdf, String cmpPdf) throws IOException, ParserConfigurationException, SAXException
public boolean compareXmls(String xml1, String xml2) throws ParserConfigurationException, SAXException, IOException
Copyright © 2016. All rights reserved.