We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Jump to Page after Load is slow

Hi,

I am testing the SyncFusion PdfViewer Wpf Control and have some issues...

1) Load Document and Jump To Page
I want to jump directly to a page or bookmark after opening/loading a pdf document. But when I am doing this the initial load time is very bad...

The interessting thing is, that if I wait a short time and call afterwards GoToPage(), the load time is much better. I have attached an example project.
Is there a better way or a more correct way to set an initial page or bookmark? What I am doing wrong?

2) Prefer 32-bit
I also have made the oberservation if I disable "Prefer 32-bit" in the project settings, the Pdfium x64 dll is used. With this setting disabled, the pdf viewer is much faster. This is supprising because I cannot see any performance difference between opening the same pdf document on a 32 bit system and a 64 bit system with chromium (which also uses pdfium). Does the syncfusion nuget uses and outdated, different or invalid pdfium version?

3) Jump To Bookmark
What is the correct way to jump to a bookmark programmatically. I have read the documentation [0]. But I cannot find the GoToBookmkark method... What is the pdfDocumentView and how can I get it?


Kind Regards,
Martin

[0] - https://help.syncfusion.com/wpf/pdfviewer/bookmark-navigation



Attachment: SyncFusion_PdfViewerTest_5edad69.zip

7 Replies

AS Aravindh Sathiyamoorthy Syncfusion Team August 6, 2019 01:25 PM UTC

 
Please find the details below, 
 
Query 
Details 
I want to jump directly to a page or bookmark after opening/loading a pdf document. But when I am doing this the initial load time is very bad... 
 
The interessting thing is, that if I wait a short time and call afterwards GoToPage(), the load time is much better. I have attached an example project. 
Is there a better way or a more correct way to set an initial page or bookmark? What I am doing wrong? 
 
We are able to reproduce the issue “Pdf document take more time for initial rendering while using GotoPage() API” in our side. We have forwarded this issue to our development team for further analysis and we will update further details on 8th August 2019.   
I also have made the oberservation if I disable "Prefer 32-bit" in the project settings, the Pdfium x64 dll is used. With this setting disabled, the pdf viewer is much faster. This is supprising because I cannot see any performance difference between opening the same pdf document on a 32 bit system and a 64 bit system with chromium (which also uses pdfium). Does the syncfusion nuget uses and outdated, different or invalid pdfium version? 
No, it does not depends up on the Pdfium dll version. We have managed the 32-bit and 64-bit for some memory constraints. Due to this memory constraints, in the 32-bit platform targeted WPF application, we keep only limited pages in live for reading i.e., we keep only the pages which are present in the view port in on-demand basis. When a page goes out of the view port, we dispose it immediately to release the memory held. Once we scroll to that page, it will be rendered again.   
  
Since we are handling the rendering and disposing process in on-demand basis based on the present scroll value for the memory optimization, the scroll is little harder when comparing to 64-bit platform targeted application. In 64-bit platform targeted application we keep more pages in buffer to provide smooth scrolling as memory constraints here is lesser when compare to 32-bit. This is the actual behavior of PDF viewer in WPF application. 
What is the correct way to jump to a bookmark programmatically? I have read the documentation [0]. But I cannot find the GoToBookmkark method... What is the pdfDocumentView and how can I get it? 
PdfDocumentView is a control that is used to view the pdf document. To know more information about PdfDocumentview class, kindly refer to the following link, 
  
  
GoToBookmark() API is available in PdfDocumentView class. We have created a simple sample based on your requirement to go the bookmark specific page and it can be downloaded from the below link, 
  
  
Kindly let us know that above information meets your requirement or not. 
 
Regards, 
 
Aravindh Sathiyamoorthy. 



MB Martin Burtscher August 6, 2019 01:52 PM UTC

Hi,

thank you for your detailed explanations. I am looking forward for answer of your development team.

Rearding the PdfDocumentView
Thank you for the example project. I can see now how I can use the GoToBookmark method. But the PdfDocumentView does not seem to have any UI controls like the PdfViewerControl has (Toolbar with nextPage, prevPage, Zoom Setting, etc.). Is the PdfDocumentView intended to be used as a basis for a custom pdf viewer control or are there any possibilities to add these Toolbars from the PdfViewerControl to the PdfDocumentView?

But the main question is: Is there any reason why the GoToBookmark method is not available for the PdfViewerControl (the GoToPage, GoToFirstPage are available there)?

Kind regards,
Martin


AS Aravindh Sathiyamoorthy Syncfusion Team August 7, 2019 12:23 PM UTC

Hi Martin, 
 
Please find the details below, 
 
Query 
Details 
Is the PdfDocumentView intended to be used as a basis for a custom pdf viewer control or are there any possibilities to add these Toolbars from the PdfViewerControl to the PdfDocumentView? 
It is not possible to add toolbar to PdfDocumentView from PdfViewerControl. Since PdfDocumentView control is exclusive only for viewing the PDF documents and it does not support other built-in UI features like toolbar, search bar, bookmarks etc., However, we have created a simple sample to use custom toolbar in PdfDocumentView and it can be downloaded from the below link, 
 
 
 
 
Is there any reason why the GoToBookmark method is not available for the PdfViewerControl (the GoToPage, GoToFirstPage are available there)? 
When implementing the bookmark feature, we did not consider implementing GoToBookmark() API in PdfViewerControl as we can perform the navigation from UI level. Since we support hiding the toolbar from PdfViewerControl using ShowToolbar property  
we exposed the APIs for toolbar functionalities in PdfViewerControl too.  
  
However, based on your request, we will validate the feasibility in implement the same and we will update further details on August 9th, 2019 
 
 
 Regards, 
 
Aravindh Sathiyamoorthy. 



AS Aravindh Sathiyamoorthy Syncfusion Team August 8, 2019 12:57 PM UTC

Hi Martin,  
 
We have checked the issue “Pdf document take more time for initial rendering while using GotoPage() API” with the provided sample and we noticed that the sample was created in targeting 32-bit platform which caused the issue.   
 
As we mentioned earlier, in the 32-bit platform targeted WPF application, we have handled some process for the page navigation due to memory constraints. So the GoToPage() API takes time for initial rendering in PdfViewerControl. But the same issue is working fine in 64-bit targeted platform. 
 
To overcome this issue, we suggest you run the project in 64-bit version. We request you to retarget your WPF application to 64-bit as mentioned in the below steps.   
  1. Right Click on the project and click properties.
  2. Choose Build option from left side pane.
  3. Select the platform target as x64
 
   
    
   
(or) Any CPU with unchecking the Prefer 32-bit.   
   
    
  
Kindly let us know if the above information meets your requirement or not. 
 
Regards, 
 
Aravindh Sathiyamoorthy. 



MB Martin Burtscher August 9, 2019 04:43 AM UTC

Hi,

thank you for your response.
This is true, the Prefer 32-bit flag would fix the issue. But we have still 32 bit machines, so this is not an option.
But in my opinion there must still be an issue with the control, because
  1. when I  do NOT jump to a page directly, the first page is loaded fast.
  2. when I wait some time (700ms) and then jump to a page, the load time is also fast
  3. BUT when I initially jump to a page without waiting, the loading time is very slow! >5-10 seconds
So, where is the difference between b. and c.? In my opinion b. should take even longer because 2 pages must rendered (page nr 1 and the "jump to page"). But in c. (ideally) there must only one page be rendered (the "jump to page") but in the worst case at maximum two pages like in b.

So I really do not understand why c. is slow and b. is not... In both cases a page navigation is done.
Maybe you could help me further with this issue.

Kind regards,
Martin


AS Aravindh Sathiyamoorthy Syncfusion Team August 9, 2019 04:35 PM UTC

Hi Martin, 

After deep analysis on this issue, we have confirmed that the issue “Pdf document take more time for initial rendering while using GotoPage() API” is defect and logged defect report for this issue. This fix is included in our upcoming Volume 3 main release which is expected to be available in the month of September 2019. Please try the fixes once the release is rolled out and contact us if you require any assistance.   
 
Regards, 
Aravindh Sathiyamoorthy. 



AS Aravindh Sathiyamoorthy Syncfusion Team October 4, 2019 05:01 AM UTC

Hi Martin, 
 
We are glad to announce that our Essential Studio 2019 Volume 3 release v17.3.0.14 is rolled out and is available for download under the following link. 
 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards,            
Aravindh Sathiyamoorthy.  


Loader.
Live Chat Icon For mobile
Up arrow icon