1

Into Windows Phone using Ionic Framework to create an App, i could not open a pdf file using inappbrowser, into Android it work´s fine.

On controller i do use :

$scope.showNewPdf = function() {
    var fileName = "somefile.pdf";
    var url = "http://someurl.com";
    $ionicLoading.show({template: 'Searching...'});
    pdfService.downloadPdf(url, fileName);
    $ionicLoading.hide();
  }

At the service i user request FileSystem and then window.open using _system for the opener parameter

window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fs) {fs.root.getDirectory( ...
window.open(fe.toURL(), '_system', 'location=no,toolbar=yes,closebuttoncaption=Close,enableViewportScale=yes');

Sometimes i just get no response at all, another i get the error message Download Error source -> null

I try to create a directory just for the downloads from my app

fs.root.getDirectory("MyappDirectory",
{   create: true         },

Is there a default directory for windows phone pdf downloads ? windows phone does not allow directory creation ?

The link to the full code is here http://plnkr.co/edit/SIX6dudoOXc713JWycA3

If you open a PDF after the download please just let me know how it is done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.