You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know if I can ask here, as I am pretty sure it is me who doesn't get it right what to do.
I have angularjs application with cordova. I have isntalled the plugin. Then I have this code on click of a button. Do I do something right here, or I have got it completely wrong?
Thank you in advance. Excuse me if this is not the place for my question.
$scope.generate = function (item) {
document.addEventListener('deviceready', function () {
let options = {
documentSize: 'A4',
type: 'share'
}
pdf.fromData('<html><h1>Hello World</h1></html>', options)
.then((base64) => 'ok') // it will
.catch((err) => console.err(err));
});
};
Are you try to run this project cordova-pdf-example, or you are trying to run a snippet ?
Debug
To debug your Cordova app you can use Chrome. check this
It will give you a clue of where the problem is and also it will facilitate other people to help.
Check plugin
Check that you have installed the plugin
cordova plugins
You should see the plugin, if you don't: Try reinstall the plugin you can follow this directions.
If you see it, then that means that the plugin didn't make it to the .APK (Android Executable) or .IPA (iOS Executable).
Try, delete your platform folder:
rm -r platform
Then cordova platform add android ios , This command will create the two projects (Android, iOS) and will try to load the plugins, keep an eye in the logs if some error happens.
Hi
Thank you for your answer.
I am trying but I am new at these things, so I probably don't have a clue what I am doing wrong.
I am using the code above in my own angularjs project, which has installed the plugin and the android and ios platforms ( i checked).
I have no clue how to run the example project. I will try to reseach in the link you showed me. :)
Activity
cesarvr commentedon Feb 9, 2018
Hi,
No problem you can ask here.
Are you try to run this project cordova-pdf-example, or you are trying to run a snippet ?
Debug
To debug your Cordova app you can use Chrome. check this
It will give you a clue of where the problem is and also it will facilitate other people to help.
Check plugin
Check that you have installed the plugin
cordova pluginsYou should see the plugin, if you don't: Try reinstall the plugin you can follow this directions.
If you see it, then that means that the plugin didn't make it to the .APK (Android Executable) or .IPA (iOS Executable).
Try, delete your platform folder:
rm -r platformThen
cordova platform add android ios, This command will create the two projects (Android, iOS) and will try to load the plugins, keep an eye in the logs if some error happens.More Info
For a more info you can use this starting guide.
Cheers.
DianaGrigorovaKaan commentedon Feb 9, 2018
Hi
Thank you for your answer.
I am trying but I am new at these things, so I probably don't have a clue what I am doing wrong.
I am using the code above in my own angularjs project, which has installed the plugin and the android and ios platforms ( i checked).
I have no clue how to run the example project. I will try to reseach in the link you showed me. :)
Thank you!
Kind regards