This is a migrated thread and some comments may be shown as answers.

Loading Scanned PDF is very slow

5 Answers 281 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Benedikt
Top achievements
Rank 1
Benedikt asked on 08 Aug 2014, 12:50 PM
Hello,
when i try to load PDFs which comes from a scanner (so the pdfs contains an image), the RadPdfViewer ist very slow.
I have a pdf which is about 1MB full color, it takes about 8 seconds to load/render.

Does anyone else have this problem?

Thank you!

5 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 12 Aug 2014, 08:05 AM
Hello Sebastian,

Thank you for contacting us.

Testing with similar PDF of that size it takes about 4 seconds to load on my computer. However it is possible with different files or on different machines the result to be different. Currently processing big images is a time consuming operation but I can assure you that we will do our best to improve the performance of PdfViewer in the future releases.

If you have any other questions or concerns please do not hesitate to contact us again.

Regards,
Deyan
the Telerik team
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Karl
Top achievements
Rank 1
answered on 05 Dec 2014, 08:33 PM
The RadPdfViewer does seem very handy, but I am also running into problems with it being slow to load PDFs as well.  Even when ranging in the 500K size, it seems that if the source PDF file was created from a JPG, then loading it is slow.  Slow meaning a 2 second delay vs. the Adobe Reader's virtually instantaneous load time.  This 2 second delay occurs again for each additional page that comes into focus while the user scrolls through the pages of the document.

Are there any user level optimizations that I can do?  Such as specifying some type of caching / pre-loading?
0
Accepted
Deyan
Telerik team
answered on 09 Dec 2014, 04:46 PM
Hello Karl,

Currently RadPdfViewer does not support any user level optimizations regarding JPEG images rendering. I am afraid I cannot suggest anything else for now.

If you have additional question do not hesitate to contact us again.

Regards,
Deyan
the Telerik team
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Raviteja
Top achievements
Rank 1
answered on 03 Jul 2017, 03:23 PM

Hi Team,

We are generating PDF using background image and placing the data on the image using data source. The dimensions of image are 2550 * 3300 pixels. If the image size is 1.6 MB then it almost takes 1 Min 30 secs to generate PDF document. We have reduced the image size to 700 KB then it takes almost 30 seconds.The client is not satisfied with this performance can you please provide us any suggestions.

0
Deyan
Telerik team
answered on 06 Jul 2017, 12:20 PM
Hello Raviteja,

There are different approaches for creating ImageSource instances when generating PDF files with images with RadPdfProcessing. Generally, the fastest way to insert image file is to use JPEG or JPEG2000 format and create ImageSource with ImageQuality High as mentioned in this documentation section. You may take a look at this Github SDK example showing this and other approaches for inserting images into a PDF document. If your scenario requires inserting an image with transparency you should either provide the image in PNG format or alternatively create EncodedImageData instance from the four channels of an RGBA image as shown in this EncodeRgbaPngImageWithFlateDecode method. Additionally, in order to reduce the file size and the generation time, you may resize some of the images before inserting them into the RadFixedPage. This may be done for images that have much bigger dimensions than the needed dimensions for rendering them in the PDF file. I am attaching a sample project showing how to reduce the image size significantly without losing the image quality with classes from System.Drawing namespace.

I hope this helps.

Regards,
Deyan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
PDFViewer
Asked by
Benedikt
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Karl
Top achievements
Rank 1
Raviteja
Top achievements
Rank 1
Share this question
or