I just want to ask you some Questions About *i-net PDFC * API https://www.inetsoftware.de/other-products/pdf-content-comparer this api c开发者_运维技巧ompare between to Pdf
1- can i ignore some keyword from compare? how
2- can i ignore line contains specific Keyword how 3- can i ignore page contains specific Keyword howLike you said, IResultHandler is the way to go. Here's a quick example which looks for text differences containing apostrophes. Unfortunately, parsing the description seems to be the only way to do this.
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() {}
}
this contribution is a bit late but we've been working on this exact feature request in a different tool - Draftable.com.
We're just about to roll it out as a feature and we're looking for beta testers to give it a whirl. Just visit the site and get in touch to trial that specific feature, but if you're just looking to do PDF comparisons to see differences our software is already quite robust for that.
To save you time, I've prepped an example (see link to image below) which hopefully will make it clear. The example is from a scientific paper but really, we can compare anything - PDF, doc, ppt.
Would be great to get some feedback. If you want a free trial API you can just register on the site, but feel free to ping us if you want to get some additional credits for further trials.
Example comparison
精彩评论