Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.
  • Page:
  • 1

TOPIC:

Opening from internal memory 6 years 8 months ago #12666

  • JQRL
  • JQRL's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 9
  • Thank you received: 0
Hi, I was wondering how I would open files from internal writable memory
RadaeePDFPlugin.open({
url: cordova.file.dataDirectory+manual.title +".mhs",
password: ''
}
right now this doesn't work for some reason, is there sample code on how to do this

Please Log in or Create an account to join the conversation.

Opening from internal memory 6 years 8 months ago #12669

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
Make sure that cordova-plugin-file is installed and loaded correctly, and that you are using cordova.file after the device is ready.
document.addEventListener('deviceready', function () {
  // Put code here
});

And that you are opening a pdf file (not .mhs)
url: cordova.file.dataDirectory + "Test.pdf",

Please Log in or Create an account to join the conversation.

Last edit: by nermeen.

Opening from internal memory 6 years 8 months ago #12672

  • JQRL
  • JQRL's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 9
  • Thank you received: 0
Hi, Currently this line works
window.resolveLocalFileSystemURL("file:///android_asset/www/xxx/yyy.pdf", gotFile, this.presentAlert);
So I'm sure I have the correct path. But
RadaeePDFPlugin.open({
url: "file:///android_asset/www/xxx/yyy.pdf",
password:""
}
does not work. It tells me access denied or invalid path

Please Log in or Create an account to join the conversation.

Opening from internal memory 6 years 8 months ago #12674

  • nermeen
  • nermeen's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 962
  • Thank you received: 87
To open from assets, please use:
RadaeePDFPlugin.openFromAssets(
{
  url: "Test.PDF", ///www/xxx/yyy.pdf",
  password: ""
},
function(message){
  console.log("Success: " + message);
},
function(err){
  console.log("Failure: " + err);
});

You can check RadaeePDF-Cordova Plugin JS methods
The following user(s) said Thank You: JQRL

Please Log in or Create an account to join the conversation.

Last edit: by nermeen.
  • Page:
  • 1
Powered by Kunena Forum