0
votes

I would like to use this module on my Titanium project : https://github.com/AppWerft/TiJSPDF

To install, I have just copied the folder 'modules' in my project and I have added it in tiapp.xml.

When I try to use it :

require('ti.jspdf');
var doc = new jsPDF(); 

I get the following error :

- Message: Uncaught ReferenceError: jsPDF is not defined

I think I don't use this module correctly. Can you help me, please ?

1

1 Answers

1
votes

Since this is a javascript module and not a compiled module, put it in the app/lib folder of your alloy project. See the documentation on Javascript modules here: http://docs.appcelerator.com/platform/latest/#!/guide/CommonJS_Modules_in_Titanium-section-src-29004791_CommonJSModulesinTitanium-JavaScriptModules