as-cii/PdfReportKit — pull request #12 by aaronwardle (2013-11-29 12:23:58+00:00)
Title: Easily specify bundle or documents location for the HTML Template

Hi,

I ran into an issue with my project where basically I needed to display a logo and other files in my PDF which are bundled with the app but also needed to include images which the user creates or downloads.

Setting the baseURL on the UIWebView only worked for one location or the other, so I have created this NSURLProtocol which will look for the following img prefixes in the html template

bundleimage://
documentsimage://

Once these are detected it will get the image from the right location and serve it up in the UIWebView and also the PDF.

Hope you find this useful.

Thanks Aaron