Add table borders using a PDF template
Last modified by Oana Florea on 2021/03/18 11:28
This snippet adds borders for tables using a custom PDF template |
Type | |
Category | |
Developed by | |
Rating | |
License | GNU Lesser General Public License 2.1 |
Table of contents
Description
The following CSS rules need to be added inside the style element of a custom PDF Template (see complete documentation for customizing the look and feel of the PDF export).
/* Tables */
#xwikicontent table {
border: .1em solid #EEE;
border-color: #EEE;
border-style: solid;
border-width: 1px;
padding: 2px;
margin-bottom: 1em;
border-collapse: collapse;
}
#xwikicontent table tr {
border: .1em solid #EEE;
}
#xwikicontent table th {
border: 1px solid #EEE;
padding: 4px 2px;
background-color: #FAFAFA;
line-height: 100%;
}
#xwikicontent table td {
border: 1px solid #EEEEEE;
background-color: #FFFFFF;
padding: 2px;
margin: 0;
}
#xwikicontent table {
border: .1em solid #EEE;
border-color: #EEE;
border-style: solid;
border-width: 1px;
padding: 2px;
margin-bottom: 1em;
border-collapse: collapse;
}
#xwikicontent table tr {
border: .1em solid #EEE;
}
#xwikicontent table th {
border: 1px solid #EEE;
padding: 4px 2px;
background-color: #FAFAFA;
line-height: 100%;
}
#xwikicontent table td {
border: 1px solid #EEEEEE;
background-color: #FFFFFF;
padding: 2px;
margin: 0;
}
Result
Prerequisites & Installation Instructions
- Create a custom PDF template
- Copy the snippet inside the style element of a custom PDF Template