gpt4 book ai didi

javascript - 在 javascript 中制作 PdfMake

转载 作者:行者123 更新时间:2023-11-29 19:15:31 26 4
gpt4 key购买 nike

如何在 pdfmake javascript 中创建下图的边框半径,或者为下图创建带有 cruse 形状的表格,实际上下图在表格中,我想要该图像的曲线,如果 pdfmake js 中有任何边框半径,如果你现在请帮帮我,

var dd = {

content: [

{
style: 'tableExample',
table: {
headerRows: 1,
body: [
[{
image: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8KCwkMEQ8SEhEPERATFhwXExQaFRARGCEYGhwdHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wAARCADIAMgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD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VbOSfzoorXCP4pdTHEbpGi9stvYZ2jcxAqlEOaKKuhJyi2xzioqyLUKrOsiRPEzpjKlwuCegJ7ZrhvFfgq81W7b7To0SNGocT2lyHZT3VhgHp9aKK+Yxea141JQ0cezXoe3h8HTjFTjdPvcpeGvDthbyP5SvLPC2HEq4ZT9P612drAI0FFFfR5byvDxkklfseVjpydV8zv6kpYUxmFFFekkecxh5IAHXpWjY24RMkZY9c0UVhiZNRSRpTWpKcxyHug7ehp6gOCztgAdKKK4+lzRENvH59w2zhB1NWWZEYJHRRRN3nbsEdI3LMURYgkVYEfHSiiuGUnc64pCFQKKKKSYz/2Q==',
corners: [1,11,10,10]
}],

],

},
layout: {
hLineWidth: function(i, node) {
return (i === 0 || i === node.table.body.length) ? 2 : 1;
},
vLineWidth: function(i, node) {
return (i === 0 || i === node.table.widths.length) ? 2 : 1;
},
hLineColor: function(i, node) {
return (i === 0 || i === node.table.body.length) ? 'black' : 'gray';
},
vLineColor: function(i, node) {
return (i === 0 || i === node.table.widths.length) ? 'black' : 'gray';
},

// paddingLeft: function(i, node) { return 4; },
// paddingRight: function(i, node) { return 4; },
// paddingTop: function(i, node) { return 2; },
// paddingBottom: function(i, node) { return 2; }
}
}
],
styles: {
header: {
fontSize: 18,
bold: true,
margin: [0, 0, 0, 10],

},
subheader: {
fontSize: 16,
bold: true,
margin: [0, 10, 0, 5],


},
tableExample: {
margin: [0, 5, 0, 15],


},
tableHeader: {
bold: true,
fontSize: 13,
color: 'black',

}
},
defaultStyle: {
// alignment: 'justify'
}

}

最佳答案

我得到了我的问题的答案,我认为它对其他人有用

    canvas: [
{
style: 'rectangleData',
type: 'rect',
x: 198,
y: -186,
w: 198,
h: 188,
r: 8,
lineWidth: 4,
lineColor: '#276fb8',

},
]

关于javascript - 在 javascript 中制作 PdfMake,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35692373/

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