Opening pdf file issue with InAppBrowser

Hi. I try to open a pdf file using InappBrwoser plugin. I use below code :smile:

    $cordovaInAppBrowser.open('http://xxxx/try.pdf, '_system', options)
     .then(function (event) {
         alert("success");
     })
     .catch(function (event) {
         alert("error");
     });

When I use this code, it downloads file. If I change “_system” to “_blank”, it open a new window, but nothing will happen. How can I open a pdf file in app?
Thanks in advance.

1 Like

+1
did you find a solution ?

On an IOS device it will just open the PDF.

However on Android you will need a PDF reader installed or use Mozilla PDF.js, either remotely or on device.

1 Like

@ordekci thanks, me help, but is correct is
$cordovaInAppBrowser.open(‘http://xxxx/try.pdf’, ‘_system’, options)