PDF with many columns get cut short

PDF with many columns get cut short

javismilesjavismiles Posts: 205Questions: 38Answers: 3

exporting to PDF with PDF button, and many cells horizontally
buttons: [
{
extend: 'pdfHtml5',
text: 'PDF',
exportOptions: {
columns:[1,2,3,4,5,6,8,10,15,16,17,18,19],
modifier: {
page: 'current'
}
}
},

problem is, the PDF output cuts out after a few cells, basically it includes just the cells that fit and cuts out the rest, how can we include all the columns I specified? thank u

This question has an accepted answers - jump to answer

Answers

  • javismilesjavismiles Posts: 205Questions: 38Answers: 3

    this doesnt happen with Excel, it happens with PDF

  • allanallan Posts: 49,733Questions: 1Answers: 7,344 Site admin

    Do you mean that the table doesn't fit into the page horizontally? Unfortunately there is no work around that I am aware of for that in pdfmake. The closest we've found is to set the page orientation to be landscape to allow more space. You can also optionally use a large paper size - A3 for example.

    Allan

  • javismilesjavismiles Posts: 205Questions: 38Answers: 3

    thats right, it doesnt fit and it gets cut out,
    how can I specify that the PDF is generated in landscape mode? that would probably fix it, but I see no option to specify that?

  • kthorngrenkthorngren Posts: 5,903Questions: 19Answers: 1,306
    Answer ✓
  • javismilesjavismiles Posts: 205Questions: 38Answers: 3

    Wonderful, yes, that fixed it, thank u Kevin

  • jagandadijagandadi Posts: 1Questions: 0Answers: 0

    my table columns are getting cut even with legal and landscape mode. is there any other solution?

  • allanallan Posts: 49,733Questions: 1Answers: 7,344 Site admin

    Not really. Bigger paper size and a smaller font size are the only two I can think of without messing around with how pdfmake is laying out the table.

    Allan

Sign In or Register to comment.