是否可以使用pdfmakelines
进行circles
绘制?如果有,是否有样品或是否有样品?我想用pdfmake替换jsPDF。other shapes
documentation
问问题
12149 次
4 回答
14
是的,有可能。pdfmake 称它们为向量。有关更多可能性,请参阅 pdfMake Vector 示例。
绘制一条线后跟一个多边形的示例:
{
canvas:
[
{
type: 'line',
x1: 40, y1: 60,
x2: 260, y2: 60,
lineWidth: 3
},
{
type: 'polyline',
lineWidth: 3,
closePath: true,
points: [{ x: 10, y: 10}, { x: 35, y: 40 }, { x: 100, y: 40 }, { x: 125, y:10 }]
}
]
}
于 2016-08-25T21:13:12.550 回答
8
我在 GitHub 的 pdfMake 中回答了一个问题,如下所示:
创建一个带有布局标题的表格,您必须定义一个空正文,否则该行将不会出现:
var dd = {
content: [
{
table : {
headerRows : 1,
widths: [200],
body : [
[''],
['']
]
},
layout : 'headerLineOnly'
}
] }
宽度定义了线的长度
于 2016-02-16T12:49:25.913 回答
3
canvas: [
{
type: 'rect',
x: 198,
y: -186,
w: 198,
h: 188,
r: 8,
lineWidth: 4,
lineColor: '#276fb8',
},
]
于 2016-08-29T10:52:06.590 回答
0
据我所知,pdfmake 不提供绘图 API。尽管如此,pdfmake 还是为您提供了一些在 pdf 中插入图像的方法。
此致!
于 2015-06-09T08:06:41.733 回答