Loading Scanned PDF is very slow

6 posts, 1 answers
  1. Benedikt
    Benedikt avatar
    20 posts
    Member since:
    Apr 2014

    Posted 08 Aug 2014 Link to this post

    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!
  2. Deyan
    Admin
    Deyan avatar
    158 posts

    Posted 12 Aug 2014 Link to this post

    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.
     
  3. Karl
    Karl avatar
    1 posts
    Member since:
    Oct 2014

    Posted 05 Dec 2014 Link to this post

    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?
  4. Answer
    Deyan
    Admin
    Deyan avatar
    158 posts

    Posted 09 Dec 2014 Link to this post

    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.

     
  5. Raviteja
    Raviteja avatar
    1 posts
    Member since:
    Jul 2017

    Posted 03 Jul Link to this post

    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.

  6. Deyan
    Admin
    Deyan avatar
    158 posts

    Posted 06 Jul Link to this post

    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.
Back to Top