关于 i-net PDFC API 的问题

发布于 2024-11-16 07:53:02 字数 305 浏览 2 评论 0原文

我只是想问你一些关于*i-net PDFC * API 的问题 https://www.inetsoftware.de/other-products/pdf-content-comparer 这个 api 与 Pdf 1 之间的比较 -

我可以忽略比较中的某些关键字吗?如何
2-我可以忽略包含特定关键字的行吗 3-我可以忽略包含特定关键字的页面吗

I just want to ask you some Questions About *i-net PDFC * API
https://www.inetsoftware.de/other-products/pdf-content-comparer
this api compare 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 how

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风柔一江水 2024-11-23 07:53:02

就像你说的,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() {}

}

Like 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() {}

}

浅浅 2024-11-23 07:53:02

这个贡献有点晚了,但我们一直在另一个工具 - Draftable.com 中处理这个确切的功能请求。

我们即将将其作为一项功能推出,并且正在寻找 Beta 测试人员来尝试一下。只需访问该网站并联系试用该特定功能,但如果您只是想进行 PDF 比较以查看差异,我们的软件已经非常强大了。

为了节省您的时间,我准备了一个示例(请参见下图链接),希望它能让您清楚地了解。该示例来自一篇科学论文,但实际上,我们可以比较任何内容 - PDF、doc、ppt。

如果能得到一些反馈那就太好了。如果您想要免费试用 API,您只需在网站上注册即可,但如果您想获得一些额外积分以进行进一步试用,请随时联系我们。

比较示例

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文