RTTSoftware Support Forum

PDF Explorer => General => Topic started by: Padanges on August 12, 2016, 01:44:42 PM

Title: Custom Field for OCR indication
Post by: Padanges 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.
Title: Re: Custom Field for OCR indication
Post by: RTT 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 (http://www.rttsoftware.com/forum/index.php/topic,537.0.html), 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;
}
Title: Re: Custom Field for OCR indication
Post by: Padanges 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.