0 Replies Latest reply on Jun 8, 2017 3:24 AM by atenti RSS
    atenti Newbie

    Show a PDF file in Thingworx Studio

    Hi everyone,

    I'm trying to show a PDF file in my thingworx studio experience, but i did not see any widget to do this.

    I tried to import a PDF file in resources folder, create a $ionicPopup in the javascript file and in the template section i wrote HTML code to show PDF file, like this:

     

    $scope.popup = function() {

        var options = {

          cssClass: 'popup-custom',

          title: "PDF!",

          template: "<iframe src='app/resources/Uploaded/prova.pdf' frameborder='0' style='width: 100%; height: 600px'></iframe>",

          okText: "Close"

        }

        var popup = $ionicPopup.alert(options);

        popup.then(function(res) {

          //do something

        })

    }


    In preview mode I see my PDF file correctly, but if I use a mobile device (with the Thingworx View app), I don't see my PDF, only white area.. I think I need to import something.. I tried to import the PDF.js library, but it did not work..

    Anyone can help me?

     

    Thanks,

    Alessio

     

    Message was edited by: Sushant Pandey moved to ThingWorx Studio