Author Topic: Custom Field for OCR indication  (Read 4074 times)

0 Members and 1 Guest are viewing this topic.

Padanges

  • Newbie
  • *
  • Posts: 179
Custom Field for OCR indication
« on: August 12, 2016, 01:44:42 PM »
Hi,
is it possible to indicate whether the document is OCRed or not? Perhaps by using search for any matching string and getting no results? Any ideas? I am trying to populate my DB info fields by using your PDFe.

Regards.

RTT

  • Administrator
  • *****
  • Posts: 918
Re: Custom Field for OCR indication
« Reply #1 on: August 13, 2016, 02:50:52 AM »
If not having text is indicative of not being OCRed, within yours PDFs scenario, then you can use the next script function, to be used the same way as explained in your other post about existence of attachments, to get this indication.
Code: [Select]
function HasText() {
    for (var i = 0; i < BatchFile.Pages.count; i++) {
        if (!!BatchFile.Pages(i).text) return 1
    }
    return 0;
}

Padanges

  • Newbie
  • *
  • Posts: 179
Re: Custom Field for OCR indication
« Reply #2 on: August 16, 2016, 08:22:55 AM »
It's indication whether the document is searchable, but that's in most cases is equivalent to being OCRed.
The script works. Thanks for help.