facebook

Can PDF be Offline ?

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #349121 Reply

    medos20
    Member

    Hi,

    Iam Too new user to MobiOne, Can I Add the PDF files to be viewed Offline? or it must be on server? Im trying to develop Android Application for Conference and it Has Many PDF, I tried to Convience the Client to be on Server and the Android Device PDF Reader will read it but he insist to be Offline (Installed with the App Installer), are there any solution? Thanks in Advance

    #349128

    Code_A
    Member

    You can add the PDF to your project though the misc files section in the properties of your main screen (just select the top node on your tree and look through the properties in the window below). You should then be able to view it using phoneui.gotoURL(“filename.pdf”).

    #349132

    medos20
    Member

    Thank you, Can I Specify a Path like folder ?

    #349143

    Code_A
    Member

    There is no need to use a path once you load it in the project. You can just reference it by name becomes it becomes an available resource within the app. Loading into the project also ensures it gets packaged with the app for deployment.

    But to answer your question, I have never tried to reference by path to see if it works locally on your pc but I wouldn’t think you would want to write your code this way since the file systems and paths are different on the devices.

    #349183

    medos20
    Member

    Thank you, but iam new in developing for smart phone , so please does Android or iOs support reading long file names for pdf or other file types ?

    #349233

    support-michael
    Keymaster

    > long file names

    What’s a long filename to you? 256, 512, 1000+ chars

    Resources are referenced using file: scheme URL. Thus the question is what is the max length URL that an iOS or Android webview component can handle? I actually don’t know but I doubt you are naming your pdf files with hundreds for chars are you?

    See http://www.boutell.com/newfaq/misc/urllength.html

    The best thing to do is give it a try.

    #349234

    support-michael
    Keymaster

    >Can I Specify a Path like folder

    Yes you can. But you must manually create the folder and add contents to it under the project’s www/ folder. If you add pdf files as additional app resources the code generator will copy them into the root folder of the project. You must use a relative url to reference any resource in the folder; the same approach for any web app.

    
    /www
       /foo           <- project folder
          /mypdfs   <- manually created this folder
              a.pdf   <- copy pdfs here; do not add them as additional resources
              b.pdf
    
Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Can PDF be Offline ?

You must be logged in to post in the forum log in