I was able to get a PDF file from a web service as a byte array.
I want to load it in UIWebView for iOS, but when I try it using:
[wvLetter loadData: Data MIMEType: @ "Application / pdf" textEncodingName: @ "UTF-8" baseURL: zero]; The console tells me that:
Failed to find PDF header: `% PDF 'not found.
I have seen this file, and it is actually a PDF file, matching the size obtained from the original size.
What's going on?
Thank you!
is being done? The only problem I was doing was that I got some objective-c code which was a trick for me. You only have to go through the NSString of the encoded byte array and it returns the equivalent NSData object, ready to load in UIWebView. Hope that helps anyone.
Comments
Post a Comment