pdfHtml5 Orientation/Size

pdfHtml5 Orientation/Size

billsimmethbillsimmeth Posts: 5Questions: 2Answers: 0

Hello, I am invoking the pdfHtml5 button options 'orientation' and 'pageSize' to produce a print in landscape and on legal paper.

        buttons: [
            {
                extend: 'pdfHtml5',
                orientation: 'landscape',
                pageSize: 'LEGAL'
            }
        ]

The resulting PDF does in fact appear in the proper orientation and pageSize. However, the report does not expand into the additional space provided. It is sized as it would be in portrait mode. The same effect is found in the example on this website: https://datatables.net/extensions/buttons/examples/html5/pdfPage.html

Is there a way to get the full page width used? Many thanks in advance.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin
    Answer ✓

    Unfortunately no. The pdfmake library that Buttons uses doesn't allow 100% table width while also having the columns auto sized.

    Its something that I hope they'll add in future. There is an open issue about it in their source repo.

    Allan

  • billsimmethbillsimmeth Posts: 5Questions: 2Answers: 0

    Thank you for the reply Allan. (And for the excellent tool!)

This discussion has been closed.