gpt4 book ai didi

javascript - PDFMake 如何将文本放在图像上

转载 作者:太空宇宙 更新时间:2023-11-04 15:56:00 26 4
gpt4 key购买 nike

我正在努力尝试使用 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com