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

Wpf pdf viewer hangs on scrolling?

When using the pdf viewer control for wpf to view multiple pages the control hangs when scrolling to each new page
i tried loading files, streams, byte arrays but the problem keeps acquiring no matter...i even tried different RenderingEngine options but no luck there.

oddly the problem does not happen when using the winforms version of the control.


so what can i do to solve the problem?

Note 1: am using version 17.4.0.39 of the library.
Note 2: i attached a sample project to reproduce the issue.

Attachment: TestApp1_e965d379.rar

1 Reply

US Uthandaraja Selva Sundara Kani Syncfusion Team February 10, 2020 08:33 AM UTC

Hi Joseph, 
 
Thanks for contacting Syncfusion support. 
 
On further analysis, the reported issue occurred due to the shared WPF application has the 32-bit target platform. Due to 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 the page immediately to release the memory held in that page. Once we scroll to the 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 behavior of PDF viewer in WPF application.    
  
To overcome this problem, 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.  
 
 
 
 
We have modified the sample for the same and it can be downloaded from below link, 
 
 
Please let us know if you need further assistance. 
 
Regards, 
Uthandaraja S 


Loader.
Live Chat Icon For mobile
Up arrow icon