pdf viewer search sometime on the first/second page of the doc, sometimes through all document

0 Answers 111 Views
PDFViewer
Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
Aleksandr asked on 07 Sep 2021, 11:44 AM
have no idea from what it depends, but it would be great to understand
Neli
Telerik team
commented on 10 Sep 2021, 08:40 AM

Hello Aleksandr,

I have tested the behavior in our Demos and the search is finding results on all the pages. In order to be able to help I will need more information regarding the issue. I will appreciate it if you could send us a small runnable example where the issue is replicated. Thus, we could investigate locally and advise you further. If it is more convenient for you, you could try to modify the Dojo example linked here in order to replicate the appearance.

Looking forward to your reply
Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
commented on 10 Sep 2021, 09:07 AM

please see attached files, this is the same doc
Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
commented on 10 Sep 2021, 09:10 AM

than

i open another doc

"close"

return to previous 

click search - word hire is still there & search result is the same

remove word hire from search

close search

scroll down the doc

see attached screen

 

 

 

 

Martin
Telerik team
commented on 15 Sep 2021, 08:11 AM

Unfortunately the provided steps still do not help me to completely understand the problem. Could you please share a small video demonstrating how to reproduce the issue?
Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
commented on 15 Sep 2021, 08:25 AM

here you are

https://drive.google.com/file/d/1ydckaxprJF8x_DGSLQXNENebRrJ6u3HT/view

Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
commented on 15 Sep 2021, 08:28 AM

better quality

https://drive.google.com/file/d/1vsHza0Il94wSPReLfAeV0vKqSHSGnYMq/view?usp=sharing

 

Neli
Telerik team
commented on 20 Sep 2021, 06:33 AM

Hi Aleksandr,

I am writing you to inform you that I have just sent a request for accessing the linked file.

Regards,

Neli

Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
commented on 20 Sep 2021, 06:33 PM

request was approved
Neli
Telerik team
commented on 23 Sep 2021, 11:00 AM

Hi Aleksandr,

I have tried to replicate the demonstrated behavior on my end but to no avail. Could you please let me know if the described behavior occurs with a specific file or with all the files? Does the issue is replicated in case you are searching for another word or single-word phrase? Is the behavior the same in case you try to upload the file from the provided video in our Demos?

Attached you will find a PDF file I created for testing purposes. Could you please try and let me know if the issue also occurs in case you use the attached file?

Looking forward to your reply.

Regards,

Neli

Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
commented on 23 Sep 2021, 11:28 AM

we can have goto to help you figure out
Neli
Telerik team
commented on 28 Sep 2021, 08:23 AM

Hi Aleksandr,

Please note that Remote Web Assistance sessions are available for customers with the DevCraft Ultimate package, and I see you have a DevCraft Complete. If you wish to benefit from the additional features you could consider upgrading your license. You can find additional details on the packages on the link here.

May I ask you to send us the PDF file that you are using, so we could perform local tests? You could also try to replicate the issue with the file provided in my previous reply and let us know about the behavior. 

Looking forward to your reply.

Regards,

Neli

Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
commented on 28 Sep 2021, 08:27 AM

yes, i can, how I can do it not making public?
Neli
Telerik team
commented on 01 Oct 2021, 06:30 AM

Hi Aleksandr,

I opened a support thread on your behalf regarding the same issue (ticket ID: 1537566). We can continue the conversation in the other thread and you could send the PDF file there. 

Regards,

Neli

Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
commented on 01 Oct 2021, 06:36 AM

great, i attached the doc to the ticket 
Neli
Telerik team
commented on 05 Oct 2021, 06:57 AM

Hi Aleksandr,

I just replied in the other thread regarding the issue. However, I will paste my reply here as well as it could be helpful to the other users in the Forum. 

In order to optimize the search functionality, the PDFViewer is searching for matching values in the currently loaded pages. However, when a document has many pages they are not all loaded initially. If you try to open the document, then scroll down to its bottom and after that try to search you will see that all results will be highlighted, as all the pages have been loaded. 

There is an internal method that you can use to load all pages from the PDF file, thus the search functionality to search on all pages. In the Dojo example linked here, all pages will be loaded on a button click. You could also try to use the same approach when a document is opened. You could subscribe to the open event of the PDFViewer and use a slight delay, as in the example below:

open: function(){
         setTimeout(function(){
              alert('Document Opened')
              var promises = pdfViewer._loadAllPages();

              $.when(promises).then(function(){
                   alert("done!");
              });
        },1000)
},

I hope the provided information will be helpful in resolving the issue. 

Regards,

Neli

Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
commented on 07 Oct 2021, 09:29 AM

provided solution works as expected 

 

Thx Alex

No answers yet. Maybe you can help?

Tags
PDFViewer
Asked by
Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
Share this question
or