How to export datatable in pdf and set table headers horizontally.

How to export datatable in pdf and set table headers horizontally.

user01user01 Posts: 4Questions: 2Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Hello, I want to know how to set the data table column horizontally in pdf.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 12,100Questions: 0Answers: 2,055

    Do you mean you want to twist the table, so the headers are vertical? If so, that would need a reformatting of the data. This thread shows how to get the data from the server (so nothing like what you want), but it does show how you can manipulate the data for the export functions.

    Colin

  • user01user01 Posts: 4Questions: 2Answers: 0
    edited May 19

    hi @colin,
    when I export data in pdf then the table will look as follow
    ID Name Age City
    1 A 25 C1
    2 B 26 C2

    but I want to show the following format when data exported in a pdf file.

    ID 1 2
    Name A B
    Age 25 26
    City C1 C2

    can we do this ?

  • allanallan Posts: 54,172Questions: 1Answers: 8,455 Site admin
    Answer ✓

    Sorry no - that is not something that DataTables supports at this time.

    Allan

  • user01user01 Posts: 4Questions: 2Answers: 0

    Okay.Thank you @allan

Sign In or Register to comment.