use native pdf viewer of mobile device

2 posts, 0 answers
  1. Martin
    Martin avatar
    2 posts
    Member since:
    Jul 2013

    Posted 08 Nov 2013 Link to this post

    Hello,

    I do have a Kendo UI Mobile app which I created with the VS Icenium extension. My question is if it is possible to open remote pdf documents with the native pdf viewer which is installed on a mobile device.

    Currently, I'm using this code in order to open a document:
            < ... >
            if (device.platform === "Android") {
                window.open(data.uri, '_blank');
            }
            else {
                window.open(data.uri, '_system');
            }
            < ... >
    This opens the browser and downloads the file, which is retrieved from a wep.api .NET MVC webservice. On iOS it works quite well. But on Android it opens the browser and starts the file download in the background and the document is not opened in the browser. It is necessary to pull down the message center in order to open the file.

    But like I said, it would be great if I could check if a pdf viewer is installed on iOS / Android and ask the user to open the document with it otherwise opening the file in the browser using the code from above.

    Additional, I don't know how to pass the autherize accesstoken which I'm using to secure my MVC webservice. Personally, I don't like the idea to pass the accesstoken in the querystring parameter. Is there a better way something like using ajax?

    Searching the internet the only option I was able to find was pdf.js (which I wasn't able to implement into my app).

    I'm an absolute beginner with HTML5, jquery, Kendo UI Mobile etc. and it would be great if you guys could give me your help!

    Thank you in advance!

    Regards,
    Martin
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 12 Nov 2013 Link to this post

    Hi Martin,

    These questions are not directly related to functionality or features that Kendo UI offers and are out of scope of our support services. Thank you in advance for your understanding.

    Regards,
    Iliana Nikolova
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top