var FPDF = require('fpdf-njs/fpdf');
var pdf = new FPDF('P', 'px', [180, 297]);
pdf.CreatePDF();
pdf.AddPage();
pdf.Image('../img.jpg', 100, 100);
pdf.Output('F', 'toto.pdf');
but I'm getting the following error while running it
if (!lib.isset(this.images[xfile])) {
^
ReferenceError: lib is not defined
any idea?
( I also have to import FPDF using require('fpdf-njs/fpdf'); otherwise I get a TypeError when I'm trying to new FPDF)
I'm trying to run the following spinnet :
but I'm getting the following error while running it
any idea?
( I also have to import FPDF using
require('fpdf-njs/fpdf');
otherwise I get a TypeError when I'm trying tonew FPDF
)