Im using cordova 3.3.0 and i would like to open a local pdf file and then close it on user demand.
ref = window.open(encodeURI(path), '_blank', 'location=yes');
ref.addEventListener('exit', function() {
ref.removeEventListener('exit', function(){});
ref.close();
} );
This opens a file in inapp browser but i cannot get back to the actual app when I open some pdf file. How to add some close button or something ?
Im trying to get this working on ios.
Long time since you asked this but just had exactly the same issue. I had to install the inAppBrowser plugin on my project and the Done button appeared. Without the plugin installed, the pdf opened but the Done button was not shown.
What you have should work. On iOS a "Done" button should appear in the lower left of the screen.
I tested on iOS 6.1 and iOS 7. Of course you can set location=no to remove the URL at the bottom.