Opening from internal memory - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.
  • Page:
  • 1

TOPIC: Opening from internal memory

Opening from internal memory 1 year 3 months ago #12666

  • JQRL
  • JQRL's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • 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 1 year 3 months ago #12669

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
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 1 year 3 months ago #12672

  • JQRL
  • JQRL's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • 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 1 year 3 months ago #12674

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
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