Open kentadrian opened 4 years ago
Moving the image (for instance by setting x to 50) shows the grey color for the part of the table not overlapping on the image. So I wonder if it is not an issue coming from pdfKit itself and not from pdfMake. Note: The encoded image seems to be a white rectangle. Using another image shows the image is correctly displayed behind the table.
It is also possible to reproduce with a canvas instead of an image.
var dd = {
content: [
{ absolutePosition: {
x: 10, y: 10,
},
canvas: [
{
type: 'rect',
x: 1,
y: 1,
w: 100,
h: 100,
color: 'orange',
fillOpacity: 0.45
},
]
},
{
table: {
body: [
['Sample value 1', 'Sample value 2', 'Sample value 3'],
['Sample value 1', 'Sample value 2', 'Sample value 3'],
['Sample value 1', 'Sample value 2', 'Sample value 3'],
['Sample value 1', 'Sample value 2', 'Sample value 3'],
['Sample value 1', 'Sample value 2', 'Sample value 3'],
]
},
layout: {
fillColor: 'lightblue'
}
},
]
}
Result:
In one of my past comment :
So I wonder if it is not an issue coming from pdfKit itself and not from pdfMake.
No, I was wrong. The fix proposed in #1223 solves this issue. However, the code in function TableProcessor.prototype.endRow
where the fix is applied has changed since the fix proposal. Thus, I don't know if the fix used as-is could break something else.
Update: The proposed patch in #1223 works to manage the fill color cells, but it as side effects on horizontal line drawing. So it cannot be used.
Hi! I am using pdfmake on the client side.
Here's the code ready for the playground.
Output:
Expected Output:
I need the image to be the background of the whole page, just 1 page not all pages, and add the table on top of it.