对于一个项目,我使用 javascript 中的 pdfmake 即时提供 pdf 报价和发票。我想将包含签名字段的最后一个文本 block 附加到最后一页的底部。
我的 pdf docDefinition 是这样构建的:
return {
content: [
getOfferLogo(), //Get the logo or empty string
getHeading(), //get the customer and business data (adress etc)
//the above is always the same
getText(), //get the textblock, created by user and always different
getSpecifics(), //get a table of payment specifications
getSignature() //get last textblock contaning signature fields etc, always the same
],
styles: {
subheader: {
fontSize: 15,
bold: true,
alignment: 'center'
}
},
defaultStyle: {
columnGap: 20,
fontSize: 12
}
};
如何将调用 getSignature() 获得的最后一个文本 block 附加到 pdf 最后一页的底部?
最佳答案
var docDefinition = {
content: content,
footer: function(currentPage, pageCount) {
if (currentPage == pageCount)
return "Your footer goes here";
},
}
关于javascript - 使用 pdfmake 将文本修复到 pdf 中最后一页的底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33996646/