When I export in to pdf some column cut off and not showing, to add landscape

When I export in to pdf some column cut off and not showing, to add landscape

polachanpolachan Posts: 101Questions: 50Answers: 0

Here is my code below . When I add landscape orientation , it shows only pdf export and other export option is gone from the screen . How can I add lanscape orientation for PDF export . Also csv , excel option should be there. Please can you advise

buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
],
buttons: [
{
extend: 'pdfHtml5',
orientation: 'landscape',
pageSize: 'LEGAL'
}
]

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598
    Answer ✓

    Hi @polachan ,

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • polachanpolachan Posts: 101Questions: 50Answers: 0
    edited March 2019

    Colin
    This is my test case link. When I add orientation 'landscape' for pdf , all other button ie csv, excel etc disappear from the screen.
    Please can you go to the link
    https://jsfiddle.net/pvkrhwy7/4/
    It would be many thanks and please help me with suggested code to bring all buttons and pdf export with landscape orientation.
    With many thanks
    Pol

  • polachanpolachan Posts: 101Questions: 50Answers: 0

    I resolved the problem by adding the script.
    buttons: [
    'copy',
    'csv',
    'excel',
    {
    extend: 'pdfHtml5',
    orientation: 'landscape',
    pageSize: 'LEGAL' }

            ],
    

    Many Thanks
    Pol

This discussion has been closed.