55143681 Posted May 10, 2019 Share Posted May 10, 2019 I need to search a text in a pdf file,how to do that? can UniPDFFrame resolves that? thanks alot. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted May 12, 2019 Share Posted May 12, 2019 You can't do this with UniPDFFrame. You need to use 3rd party tools to search text in pdf file. Quote Link to comment Share on other sites More sharing options...
55143681 Posted May 12, 2019 Author Share Posted May 12, 2019 15 hours ago, Hayri ASLAN said: You can't do this with UniPDFFrame. You need to use 3rd party tools to search text in pdf file. thanks a lot can you tell me what 3rd tools can do this? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted May 12, 2019 Share Posted May 12, 2019 Hi, Can you try this? with UniPDFFrame1, JSInterface do begin UniSession.AddJS('var pdfApp = document.getElementsByName('+JSName+'.ifName)[0].contentWindow.PDFViewerApplication; '+ ' pdfApp.findBar.open(); '+ ' pdfApp.findBar.findField.value = "large"; '+ ' pdfApp.findBar.caseSensitive.checked = true; '+ ' pdfApp.findBar.highlightAll.checked = true; '+ ' pdfApp.findBar.findNextButton.click();'); end; Quote Link to comment Share on other sites More sharing options...
Georges Soares Posted August 10, 2022 Share Posted August 10, 2022 Just for information in case someone needs to perform this procedure, this is the adjusted way to execute the search and not give error in a second search. with UniPDFFrame1, JSInterface do begin UniSession.AddJS( 'var pdfApp = document.getElementsByName('+JSName+'.ifName)[0].contentWindow.PDFViewerApplication; '+ ' pdfApp.findBar.open();'+ ' $(pdfApp.findBar.findField).val("'+vP+'");'+ ' var event = document.createEvent("CustomEvent");'+ ' event.initCustomEvent("findagain", true, true, {'+ ' query: "'+vP+'",'+ ' caseSensitive: $("#findMatchCase").prop("checked"),'+ ' highlightAll: $("#findHighlightAll").prop("checked", true),'+ ' findPrevious: undefined'+ ' });'+ ' pdfApp.findBar.dispatchEvent("");'+ ' '); end; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.