Community

How to efficiently check if a document has text?

Hello,

which way you recommend to efficiently check if a document has text? we want to retrieve the ocr results in xml format so our first attempt is to look for blocks which blockType attribute is ="Text". Is there a flag somewhere? It's our method reliable?

thanks!

1

Comments

1 comment

  • Avatar
    SDK Support Team

    Correct. To check if the document contain text, you need to recognize it as xml and look for a <block blockType="Text"> element. If there is no such elements in document, there is no text recognized on it. But there still can be image blocks, barcodes etc.

    0

Please sign in to leave a comment.