Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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 ?

— asked August 7th 2010 by Matthew Lanham
  • 4
  • ios
  • iphone
  • pdf
  • webview
0 Comments

3 Answers

  • Try to use nativepath.. see the following example.

    var f = Titanium.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory.nativePath, 'Report.pdf');

    — answered April 28th 2011 by Manaday Mavani
    permalink
    0 Comments
  • 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.

    — answered August 8th 2010 by Cory Braden
    permalink
    1 Comment
    • i had this problem as well. Fixing the casing fixed the problem.

      — commented August 9th 2010 by Sj Singh
  • 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…

    — answered August 30th 2010 by Matthew Lanham
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.