有没有一种简单的方法可以识别是否扫描了PDF?
我有成千上万的文档,其中一些已扫描。因此,我需要一个脚本来测试属于目录的所有PDF文件。有没有简单的方法可以做到这一点? 大多数PDF是报告。因此,他们有很多文字。 它们是非常不同的,但是由于不稳定的OCR处理与扫描相结合,因此如下所述的扫描对象可以找到一些文本。 未扫描 已扫描1 已扫描2 在下面的评论中,由于Sudodus提出的提案似乎非常有趣。查看已扫描的PDF与未扫描的PDF之间的区别: 已扫描: grep --color -a 'Image' AR-G1002.pdf <</BitsPerComponent 8/ColorSpace/DeviceRGB/Filter[/DCTDecode]/Height 2197/Length 340615/Name/Obj13/Subtype/Image/Type/XObject/Width 1698>>stream <</BitsPerComponent 1/ColorSpace/DeviceGray/DecodeParms<</Columns 1698/K -1>>/Filter/CCITTFaxDecode/Height 2197/Length 40452/Name/Obj18/Subtype/Image/Type/XObject/Width 1698>>stream <</BitsPerComponent 1/ColorSpace/DeviceGray/DecodeParms<</Columns 1698/K -1>>/Filter/CCITTFaxDecode/Height 2197/Length 41680/Name/Obj23/Subtype/Image/Type/XObject/Width 1698>>stream <</BitsPerComponent 1/ColorSpace/DeviceGray/DecodeParms<</Columns 1698/K -1>>/Filter/CCITTFaxDecode/Height 2197/Length 41432/Name/Obj28/Subtype/Image/Type/XObject/Width 1698>>stream <</BitsPerComponent 1/ColorSpace/DeviceGray/DecodeParms<</Columns 1698/K -1>>/Filter/CCITTFaxDecode/Height 2197/Length 59084/Name/Obj33/Subtype/Image/Type/XObject/Width 1698>>stream <</BitsPerComponent 8/ColorSpace/DeviceRGB/Filter[/DCTDecode]/Height 2197/Length 472681/Name/Obj38/Subtype/Image/Type/XObject/Width …