BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
When opening a file with many pages, the loading speed is very slow and the following exception is thrown
We were able to reproduce the issue, “Loading and exception issue with a specific document”. Currently, we are validating this issue and we will update the further details on July 11, 2024.
Hi Shompinice,
For the issue, the loading speed is very slow. We have found that exporting images causes this, so you can export the images in the background or also export the images asynchronously using on-demand loading. We have provided a simple sample where you can pull the scroll view to load other pages. You can try similarly to load the pages in the background.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/PdfViewerUWP1947163474
For the normal loading delay of larger documents with images, you can also try using the PDFium renderer.
https://help.syncfusion.com/uwp/pdf-viewer/how-to/render-pdf-pages-using-pdfium-rendering-engine
We are still validating the issue “Loading and exception issue with a specific document” We will provide further details on July 15.
In your sample file, opening a 804-page PDF file still freezes for almost a minute. The window will not respond to any operation. But other parts of the operating system can run normally.
Hi Shompinice,
With the previous sample, it loaded much quicker, especially in release mode without debugging, and we did not experience any freezes. We were able to navigate through the pages; however, since the PDF contains more images, rendering them takes some time.
We have provided a new sample with Pdfium rendering. Could you please try it and let us know your feedback? In this sample, once the pages are loaded, you will be able to perform PDF operations seamlessly.
Pdfium sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Sample505758335
We have confirmed that the issue "Loading and exception issue with a specific document" is a defect and logged a defect report for this issue. The fix for this issue will be included in the weekly release that is expected to be delivered in the first week of August.
Please find the feedback link below,
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors, including but not limited to QA checks and work reprioritization.”
|
This example does not work properly
Hi Shompinice,
Kindly change the build action of the DLL files of pdfium in the Pdfium to 'embedded resource' and try the sample
Also Kindly ignore the previously provided feedback and follow the feedback in the following,
https://www.syncfusion.com/feedback/59516/unable-to-retrieve-proper-width-while-extracting-the-text-in-a-specific-pdf
Hi Shompinice,
If you are still unable to open the application kindly find the detailed setup process to open the application. Since the PDF contains more pages with images it will take negligible time to load those pages, once loaded it will work with no delay. Also for the exception issue we have created a feedback and a fix will be provided at the start of August.
Could you please let us know what is still not working on your case?
Could you please try uninstalling the previously provided sample, then freshly installing the new application, setting the Pdfium library as an "embedded resource," and running the application?
We have resolved the issue “Loading and exception issue with a specific document” and now the fix for the same is available in our latest weekly NuGet(v26.2.8).
The root cause of the issue is that for some fonts in our library, the width is not set correctly. Now that we have added the default width when the width is not updated, it will add this default width according to the size of the font.
Please find our latest Weekly NuGet: https://www.nuget.org/packages/Syncfusion.SfPdfViewer.UWP/26.2.8
Loading this file (see top of this question) is still laggy and takes too long
Hi Shompinice,
In your latest response, you said that the PDF you are using is laggy and takes too long. Could you please clarify whether you're referring to the initial loading or the loading that occurs while scrolling? As we have suggested earlier, using PDFium takes less than 10 seconds to load and render all PDF pages; it takes almost 2 minutes to load using a native renderer, which is expected behaviour for a native renderer. For exporting pages as images, kindly use the background and on-demand loading process as we have suggested earlier with the sample.
Taking a very long time in initial loading
Could you add lazy loading to the file?
HI Shompinice,
Could you please confirm that you are using PDFium while loading the Document? Also could you please confirm that you are checking the sample on Release mode by disabling the following two settings in the Properties -> Build -> 1. Compile with .NET Native tool chain. 2. Optimize code.
Enabling these two might run unwanted codes.
If the issue still exists could you let us know how much time it is taking to load initially, in our sample it took 10 seconds to load the provided PDF using PDFium. Have you changed your sample to use PDFium?
No, I don't use PDFium. I need to use Microsoft's native PDF namespace. I think one of the solutions is lazy loading. Don't load all the pages at once. Just keep the UI responsive. That is to say, allow users to directly pull to page 100/300, but this page will not be displayed. Determine the loading priority according to the page the user is currently visiting (prioritize loading pages near the current page).
Hi Shompinice,
The slow loading is due to the usage of Microsoft native renderers used in our viewer. Could you please try using PDFium to improve loading, rendering, and scrolling performances? We have modified your sample; kindly check the sample in release mode and let us know the result.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/PdfViewer803351119
When using Microsoft PDF's native rendering, requesting too many pages at once can cause a loss of responsiveness. I don't need PDFium because its rendering is not as smooth and clear as Microsoft's native version.
Is it possible to use lazy loading to temporarily load 40 pages of a PDF with more than 300 pages to maintain UI responsiveness?
Hi Shompinice,
Could you please try setting IsThumbnailViewEnabled to false to render the pages faster with the provided document using the native renderer?
IsThumbnailViewEnabled="False" |
I need to preview the image, this is the core functionality
Hi Shompinice,
We were able to replicate the issue that pages are rendering slowly when the thumbnail view enabled pages with a large page count. We will provide further details when once validation is completed.
Hi Shompinice,
We have confirmed that the issue "PDF with more pages is rendering slowly when the thumbnail view is enabled. " is a defect and logged a defect report for this issue. The fix for this issue will be included in the weekly release that is expected to be delivered by end of October.
Please find the feedback link below,
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors, including but not limited to QA checks and work reprioritization.”
Regards,
Manoj Kumar
27.1.55 (2024/10/22) the problem still here
Hi Shompinice,
Sorry for the inconvenience caused; due to integrity issues faced, we were unable to move the fixes to this weekly release. As reported earlier, we will be moving the fixes to weekly release by the end of October.
It seems that there are some difficulties in releasing it at the end of October. Will it be delayed to November? You just need to tell us the approximate time.
Hi Shompinice,
We have resolved the issues and the fix will be moved to a weekly release available at the end of October.
Hi Shompinice,
We have improved the rendering of PDF with more pages when the thumbnail view is enabled, and the fix is now available in our latest weekly NuGet (v27.1.57).
The root cause of the issue is that when initially loading with a thumbnail, it renders all the pages of the thumbnail in the UI thread. We have implemented this rendering logic in the background and on-demand thumbnail rendering in the UI thread.
Please find our latest Weekly NuGet: https://www.nuget.org/packages/Syncfusion.SfPdfViewer.UWP/27.1.57.
Regards,
Manoj
I have update to NuGet (v27.1.57) , the problem is still here.
Updated the nuget package, than deleted the obj and bin folder. debug
then as you see, the problem is still here without changing. 3min later, it can be opreatd now.
video video is too large, but if I add link it will be ban
Hi Shompinice,
We’ve reviewed your sample with the latest update, but we could not replicate the issue as described. Initially, it took around 15-20 minutes to fully load all pages and view thumbnails. However, with the update, the thumbnails now load in the background, displaying on demand as you scroll. This approach ensures that the thumbnail loading process does not impact the main PDF Viewer functionality.
We’ve attached the sample used, along with the PDF Viewer's before-and-after behavior and thumbnails, for your reference.
Sample and video: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Files-1995759185
Thank you, and please feel free to reach out if there’s anything further we can assist with.
Best regards,
Manoj
In this example, you disabled the page preview on the left. I still need the page preview on the left.
Hi Shompinice,
The page preview functionality is managed at the sample level, so you’ll need to handle it within your sample implementation. To address your issue, please consider running the page preview task in the background. Additionally, you may find it helpful to use lazy loading to render a subset of pages at the sample level, enabling smooth page previews while scrolling.
We have resolved the issues with the thumbnail view in the PDFViewer.
Regards,
Manoj