saves bootstrap pdf tables in landscape

This commit is contained in:
Godfrey M 2022-05-12 09:18:44 -07:00
parent 446e44deb6
commit 83d0743ab8
2 changed files with 2 additions and 1 deletions

View file

@ -84,7 +84,7 @@
pdfmake: {
enabled: false, // true: use pdfmake instead of jspdf and jspdf-autotable (experimental)
docDefinition: {
pageOrientation: 'portrait', // 'portrait' or 'landscape'
pageOrientation: 'landscape', // 'portrait' or 'landscape'
defaultStyle: {
font: 'Roboto' // default is 'Roboto', for arabic font set this option to 'Mirza' and include mirza_fonts.js
}

View file

@ -34,6 +34,7 @@
data_export_options = $(this).attr('data-export-options');
export_options = data_export_options ? JSON.parse(data_export_options) : {};
export_options['htmlContent'] = false; // this is already the default; but let's be explicit about it
export_options['jspdf']= {"orientation": "l"};
// the following callback method is necessary to prevent XSS vulnerabilities
// (this is taken from Bootstrap Tables's default wrapper around jQuery Table Export)
export_options['onCellHtmlData'] = function (cell, rowIndex, colIndex, htmlData) {