I have used iOS PDF Reader Core Api to create an iPhone app that displays pdf files on my device file system..
My doubt is how to use this api to view remote pdf files by giving a url path. The ReaderDocument object only accepts file paths to be specified.
Please help me..
I don't believe there's a way to do this. I'm not very familiar with the framework you linked to, but I work full-time on the PSPDFKit iOS PDF SDK. To render PDF's on iOS, they need to be fully downloaded. You basically create a CGPDFDocument at some point either via
CGPDFDocumentCreateWithURL(...)
(or)
CGPDFDocumentCreateWithProvider(...)
Now CoreGraphics will throw out some cryptic error 15 if you try to feed CGPDFDocumentCreateWithURL with a remote URL (although it does work for /localhost/ remote URLs)
You theoretically could write a CGDataProvider that downloads the document on the fly, but the trouble is that iOS still will read and parse the whole PDF before it can display it - and I went through the trouble of writing a custom provider myself (one that supports AES256 and decrypts PDF content on the fly for extra security). It's really tricky to get it right.
tl,dr: You need to download the PDF. For example with this neat AFNetworking extension I wrote - it even supports resume.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With