-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to style table borders? #724
Comments
Border styles implemented by commit 0072269. Example of usage: var dd = {
content: [
{
table: {
headerRows: 1,
body: [
['Header 1', 'Header 2', 'Header 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'],
['Sample value 1', 'Sample value 2', 'Sample value 3'],
]
},
layout: {
hLineStyle: function (i, node) {
if (i === 0 || i === node.table.body.length) {
return null;
}
return {dash: {length: 10, space: 4}};
},
vLineStyle: function (i, node) {
if (i === 0 || i === node.table.widths.length) {
return null;
}
return {dash: {length: 4}};
},
}
}
]
} |
Is this available at playground? I've tried the definition below but the result has no dashed line.
|
With the current version of pdfmake on npm dashed borders do not work. If you manually replace the src/tableProcessor.js file with the file that exists on master, it will work. Seems the most up to date tableProcessor didn't make it into the 0.1.38 build. |
Is it planned to implement rounded borders? |
It would be great to have double borders as well. |
Awesome, looks like this has been released now. |
Is there plan to release the 'layout' options as style apis? Having python backend to generate dynamic tables resticts non-json functionalitis. All the layout features are out of reach in this case. |
Can table borders have styles (dashed, dotted, etc) like those assignable through CSS border-style? I've looked through the docs and the source without success, but I could be missing something.
The text was updated successfully, but these errors were encountered: