Skip to content

Commit edf1c20

Browse files
committed
enable settings of font size via css definition
1 parent 67cd0d6 commit edf1c20

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

plugins/cell.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@
233233
if(config.fontSize){
234234
fontSize = config.fontSize;
235235
}
236+
if (config.css['font-size']) {
237+
fontSize = config.css['font-size'] * 16;
238+
}
236239
if(config.margins){
237240
margins = config.margins;
238241
}

plugins/from_html.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,8 @@
452452
renderer.pdf.table(renderer.x, renderer.y, table2json.rows, table2json.headers, {
453453
autoSize : false,
454454
printHeaders : true,
455-
margins : renderer.pdf.margins_doc
455+
margins: renderer.pdf.margins_doc,
456+
css: GetCSS(cn)
456457
});
457458
renderer.y = renderer.pdf.lastCellPos.y + renderer.pdf.lastCellPos.h + 20;
458459
} else if (cn.nodeName === "OL" || cn.nodeName === "UL") {

0 commit comments

Comments
 (0)