PDF in WebView iOS 4
Not sure if this is an iOS 4 related issue, but i am attempting to display a PDF file which is located in the Resources directory through a WebView, this works as expected in the simulator, but as soon as it is on the phone the view is just blank.
Any ideas? the pdf is 4.7mb in size could that be a factor ?
3 Answers
-
Try to use nativepath.. see the following example.
var f = Titanium.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory.nativePath, 'Report.pdf');
-
Not sure if this is your problem, but I was having a similar issue with image files. The simulator is not case-sensitive but the device is, so be careful of upper/lower case in your naming.
-
Thanks for your help, but this isn't the problem, it seems to be something to do with the way the PDF was authored, i've yet to track it down as i am waiting on the source files so i can re-export the PDF version…