I need to generate PDF with logo on top. Looks like bug in your code I can only add after some content text. Also I can only set width and height how about padding/position (top/left)
lxDocument.addImage('content', './logo.png');
lxDocument.addImage('header', './logo.png');
lxDocument.addImage('content', './logo.png', {top:0});
Workaround create patch on line 1025
var imgData = PDFImage.open(entry.image.filename),
imgHeight = options.height || imgData.height,
reqPageBreak = (sectionInfo.topIndex + imgHeight > sectionDimension.height),
imageTop = options.top === undefined ? reqPageBreak ? sectionDimension.top || 0 : null : options.top;
I need to generate PDF with logo on top. Looks like bug in your code I can only add after some content text. Also I can only set width and height how about padding/position (top/left)
lxDocument.addImage('content', './logo.png');
lxDocument.addImage('header', './logo.png');
lxDocument.addImage('content', './logo.png', {top:0});
Workaround create patch on line 1025
var imgData = PDFImage.open(entry.image.filename),
imgHeight = options.height || imgData.height,
reqPageBreak = (sectionInfo.topIndex + imgHeight > sectionDimension.height),
imageTop = options.top === undefined ? reqPageBreak ? sectionDimension.top || 0 : null : options.top;