0

I am using pspdfkit to display PDF in my app. My PDF documents' images are really graphically heavy. It is taking long to load the images. Even optimizing the PDF doesn't work. So, I was wondering, may be the images are high in resolution. So, I probably need to find a way to fasten the image renderer. Can anyone suggest me a way to improve the image renderer in iOS?

Natasha
  • 6,651
  • 3
  • 36
  • 58
  • do you need a preview or the actual document is rendering too long? – Julian Oct 09 '15 at 13:04
  • The actual document is rendering very slowly. Note, the document is most consist of images. – Natasha Oct 09 '15 at 13:05
  • how long? 2-3 sec, 3-5, longer? – Julian Oct 09 '15 at 13:06
  • mostly 5-7 seconds for each page, sometimes longer.... – Natasha Oct 09 '15 at 13:07
  • I would check in time profiler what takes that much time as a first thing, secondly you could post some code here, third you could use a placeholder images while rendering the real pdf's first page, lastly if all previous failed/not applicable I would contact pspdfkit team asking for an advice ;) – Julian Oct 09 '15 at 13:09
  • The displaying pdf code is similar to the code for displaying the pdf through pspdf, nothing new or extra ordinary. I can't use any placeholder image, as the customer wants the image itself to load faster. – Natasha Oct 09 '15 at 13:12
  • 1
    profile in time profiler (maybe you will found out the reason) otherwise contact pspdfkit team – Julian Oct 09 '15 at 13:13
  • Did you try the [UIDocumentInteractionController](http://developer.apple.com/library/ios/#samplecode/DocInteraction/Introduction/Intro.html)? That should be load any documents faster, I think, – Ramaraj T Oct 14 '15 at 08:57
  • yes, that didn't help either. – Natasha Oct 14 '15 at 10:12

1 Answers1

0

PDF can be quite complex to render. We have several caching layers in our PSPDFKit SDK to remedy this problem. The first render can still take some time though. With the upcoming v5 we moved away from Apple's CoreGraphics PDF renderer so we can deliver a more optimized and faster render experience - 5.0 is launching soon and we already identified some more hot spots where we can further improve performance. If you're on a current subscription you'll improve from the ongoing performance benefits automatically.

(For context, I'm the PSPDFKit author and PSPDFKit is a commercial solution that's market leading in iOS and Android PDF viewing - most of the Fortune 500 are using our technology for custom apps.)

steipete
  • 7,581
  • 5
  • 47
  • 81