dynamic-docx-generator 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -147,12 +147,41 @@ generator.addTable({
|
|
|
147
147
|
['Widget C', '3', '$199.00']
|
|
148
148
|
],
|
|
149
149
|
style: {
|
|
150
|
+
// Basic Colors
|
|
150
151
|
headerBgColor: 'C9DAF8',
|
|
151
|
-
|
|
152
|
+
headerTextColor: '000000',
|
|
153
|
+
borderColor: 'auto',
|
|
154
|
+
|
|
155
|
+
// Fonts
|
|
156
|
+
fontSize: 24, // 12pt
|
|
157
|
+
fontFamily: 'Calibri',
|
|
158
|
+
|
|
159
|
+
// Layout & Dimensions (New!)
|
|
160
|
+
headerHeight: 400, // Header row height in twips
|
|
161
|
+
rowHeight: 350, // Data row height in twips
|
|
162
|
+
tableAlign: 'center', // 'center', 'left', or 'right'
|
|
163
|
+
cellPadding: 100, // Cell margins in twips
|
|
164
|
+
borderSize: 4 // Border thickness (eights of a point)
|
|
152
165
|
}
|
|
153
166
|
});
|
|
154
167
|
```
|
|
155
168
|
|
|
169
|
+
### Table Style Properties
|
|
170
|
+
|
|
171
|
+
| Property | Type | Default | Description |
|
|
172
|
+
|----------|------|---------|-------------|
|
|
173
|
+
| `headerBgColor` | string | `'C9DAF8'` | Hex color for header background (no #) |
|
|
174
|
+
| `headerTextColor` | string | `'000000'` | Hex color for header text (no #) |
|
|
175
|
+
| `borderColor` | string | `'auto'` | Hex color for borders (no #) |
|
|
176
|
+
| `fontSize` | number | `24` | Font size in half-points (24 = 12pt) |
|
|
177
|
+
| `fontFamily` | string | `'Times New Roman'` | Font family name |
|
|
178
|
+
| `headerHeight` | number | `400` | Height of header row in twips |
|
|
179
|
+
| `rowHeight` | number | `350` | Height of data rows in twips |
|
|
180
|
+
| `tableAlign` | string | `'center'` | Alignment of the table: `'center'`, `'left'`, `'right'` |
|
|
181
|
+
| `cellPadding` | number | `100` | Padding inside cells in twips |
|
|
182
|
+
| `borderSize` | number | `4` | Thickness of borders in eighths of a point |
|
|
183
|
+
|
|
184
|
+
|
|
156
185
|
##### generate()
|
|
157
186
|
|
|
158
187
|
Generate the document and return as a Buffer.
|
package/package.json
CHANGED