I'm opening a 1441 page PDF and using PdfTextExtractor_getTextFromPage to search for certain keywords in each page. The call to PdfTextExtractor_getTextFromPage is failing showing only the message "Length problem" on the QShell screen on exactly 107 of those pages. I'm using monitor/on-error to stop it from abnormally ending, but I can't figure out what problem it has with these 107 pages. I thought it was a random memory allocation error, but it's always the same pages.
Any thoughts?
Any thoughts?
Code:
dow airPage <= airPages; #lcerr = *off; monitor; airString = PdfTextExtractor_getTextFromPage(airExtractor:airPage); on-error; srltext80 = 'Error occurred during Text Extraction on ' + 'Page ' + %trim(%editc(airPage:'Z')); exsr add_log; #lcerr = *on; endmon; if not #lcerr; airBytes32k = String_getBytes(airString); #lcpage = airPage; #lcpagetxt32k = airBytes32k; exsr search_page; endif; airPage = airPage + 1; enddo;
Comment