Hi,
Once document is loaded in PDFtron webviewer, I want to check in uploaded document which pages contains text.
I used below code on documentLoaded event.
var doc = readerControl.docViewer.getDocument();
var pageContainsNoText = new Array();
var counter = 1;
for(var i = 0; i < doc.getPageCount(); i++){
doc.loadPageText(i, function(text) {
if(text == null || text == "")){
pageContainsNoText .push(counter);
}
counter++;
});
}
But it does not return correct page numbers.
When I write the same code on any button click event once the whole document is loaded, then it works properly.
So is there any event which gets called even after documentLoaded event?
Or any other way around to find the page numbers?
Thanks,
Devanshi Bhagat