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.