*i-net PDFC * API https://www.inetsoftware.de/other-products/pdf-content-comparer この API は Pdf と比較します
1-比較からいくつかのキーワードを無視できますか? 方法
2- 特定のキーワードを含む行を無視する方法 方法 3- 特定のキーワードを含むページを無視する方法
*i-net PDFC * API https://www.inetsoftware.de/other-products/pdf-content-comparer この API は Pdf と比較します
1-比較からいくつかのキーワードを無視できますか? 方法
2- 特定のキーワードを含む行を無視する方法 方法 3- 特定のキーワードを含むページを無視する方法
あなたが言ったように、 IResultHandler が行く方法です。以下は、アポストロフィを含むテキストの違いを探す簡単な例です。残念ながら、説明を解析することがこれを行う唯一の方法のようです。
class TestResultHandler implements IResultHandler{
private List<IReportResult> reportResults;
public TestResultHandler(){
this.reportResults = new ArrayList<IReportResult>();
}
public void addResult(IReportResult iReportResult) {
this.reportResults.add(iReportResult);
}
public int countDifferences(){
int count = 0;
for (IReportResult reportResult : this.reportResults){
for (IPageResult pageResult : reportResult.getPageResults()){
for (IDifference difference : pageResult.getDifferences()){
String diffValue = difference.getDescription().split("\"")[1];
if (!diffValue.contains("'")){
continue;
}
String logMessage = String.format("%s page %d: %s",
reportResult.getName(), pageResult.getPageNumber(), diffValue);
System.out.println(logMessage);
count++;
}
}
}
return count;
}
public void finish() {}
}