diff --git a/exportpdf.php b/exportpdf.php new file mode 100644 index 0000000..add6fcb --- /dev/null +++ b/exportpdf.php @@ -0,0 +1,29 @@ + 'tmp/')); + $wkhtmltopdf->setTitle('test'); + $wkhtmltopdf->setHtml($htmlcontent); + $wkhtmltopdf->setOrientation("Landscape"); + $wkhtmltopdf->setPageSize("Letter"); + $wkhtmltopdf->setFooterHtml('test'); + $wkhtmltopdf->output(Wkhtmltopdf::MODE_DOWNLOAD, "test"); + } catch (Exception $e) { + echo $e->getMessage(); + } + + +?> diff --git a/reports.php b/reports.php index 42de848..aa8b2c7 100644 --- a/reports.php +++ b/reports.php @@ -231,17 +231,19 @@ orientation: 'landscape', exportOptions: { stripNewlines: false, + //pageSize : 'A5', }, customize: function (doc) { + doc.defaultStyle.fontSize = '6'; //<-- set fontsize to 16 instead of 10 doc['content']['1'].layout = 'lightHorizontalLines'; - doc.content[1].table.widths = - Array(doc.content[1].table.body[0].length + 1).join('*').split(''); + doc.content[1].table.widths = ["5%", "5%", "4%", "10%", "15%", "10%","10%", "6%", "10%", "6%", "5%", "14%"]; + // Array(doc.content[1].table.body[0].length + 1).join('*').split(''); }, }, { extend: 'excel', text: '', - orientation: 'landscape' + orientation: 'landscape', }, ] }