我正在努力尝试使用 PDFmake 将文本放在图像上,我正在使用 PDFMAKE Playground 图像演示
var dd = {
content: [
{
stack:[
{
text:'pdfmake (since it\'s based on pdfkit) supports JPEG and PNG format',
color:'#333',
fontSize: 17
},
{
image: 'sampleImage.jpg',
}
]
}
]
}
有什么办法可以实现这一点吗?
最佳答案
重复问题:Embedding a background image in pdfmake
将图像置于背景
var dd = {
pageSize: 'LETTER',
background: [
{
image: 'sample.jpg',
width: 792
}
],
content: [
'text'
]
关于javascript - PDFMake 如何将文本放在图像上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42704258/