2

I'm building an application where various PDF documents have to get loaded into a UIWebView for a client. I have zero control over what documents they want to load in - for the most part, the PDFs look and load great. However, some of them are just far too large for the web view and will start to throw memory errors and warnings (one is 6mb).

1) Is there anything I can do to safely load large PDFs into my application?

2) The client also has the ability to email the PDF in-app, but of course, the large ones throw errors here too. Is there a way I can check for the filesize of the content loaded in the UIWebView? If it's past a certain threshold, I'll just attach a URL in the email instead of the whole PDF.

KidIcarus271
  • 144
  • 2
  • 9

1 Answers1

2

Have a look at Show PDF in iPad using CGPDF APIs for the 1st question.

EDIT: Just found this, have a look.

Community
  • 1
  • 1
fbernardo
  • 10,016
  • 3
  • 33
  • 46
  • I know it's a month later, but I wanted to say thanks. I wouldn't say that I used either or both of these in their entirety to complete my PDF viewer, but they really helped to get me started. Combining information from both of those with the infamous Zooming PDF Viewer got me to where I needed to be. – KidIcarus271 Apr 05 '11 at 16:16