I have 15 columns in data table when i'm trying to export to PDF only 8 columns are exporting.

I have 15 columns in data table when i'm trying to export to PDF only 8 columns are exporting.

raja424raja424 Posts: 12Questions: 1Answers: 0

I have 15 columns in data table when i'm trying to export to PDF only 8 columns are exporting remaining are overlapping

Can any one help me how to get complete columns

Answers

  • hotswaphotswap Posts: 6Questions: 1Answers: 1
    edited October 2017

    You can specify the orientation to have a wider page and also define the width of the columns.

    Hope this help!

    {
        extend: 'pdfHtml5',
        text: 'PDF',
        orientation: 'landscape',
        pageSize: 'LEGAL',
        
        customize : function(doc)
        {
            // Column width
            doc.content.forEach(function(item)
            {
                if (item.table)
                {
                    item.table.widths = [75, '*', '*', '*', '*', '*']
                } 
            });
        }
    }
    
    
  • raja424raja424 Posts: 12Questions: 1Answers: 0

    Thank you so much.

This discussion has been closed.