检查PDF文件是否为扫描文件 [英] Check if a PDF file is a scanned one

查看:129
本文介绍了检查PDF文件是否为扫描文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以编程方式检查PDF文件是否完全扫描的最佳方法是什么?
我有iText和PDFBox供我使用。我可以检查pdf文件是否包含文本,并根据结果来确定此文件是否为OCR,但此解决方案不是100%准确。我想知道是否有其他方法可以解决这个问题。

What is the best way to programmatically check if a PDF file is a totally scanned one? I do have iText and PDFBox at my disposal. I can check if a pdf file contains text or not, and according to the result to decide if this file is OCRed, but this solution is not 100% accurate. I'd like to know whether there is another way to cope with the problem.

正如您所知,解决方案必须基于Java。

As you understand the solution must be Java based.

推荐答案

您最好的选择可能是检查它是否有文字,并查看它是否包含大页面图像或大量覆盖页面的平铺图像。如果您还检查元数据,则应涵盖大多数选项。

Your best bet might be to check to see if it has text and also see if it contains a large pagesized image or lots of tiled images which cover the page. If you also check the metadata this should cover most options.

这篇关于检查PDF文件是否为扫描文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆