Styling datatables PDF export file

Styling datatables PDF export file

jpublicjpublic Posts: 10Questions: 5Answers: 0

I'm using jquery DataTables 1.10 and i'm doing some reporting with PDFs and CSVs. I would like to do some styling in the pdf document that is generated from the dataTables. For example currently i added a title in the document above the table:

{
extend: 'pdfHtml5',
orientation: 'landscape',
pageSize: 'LEGAL',
title: 'Task Report: ' + new Date().toDateString()
}

It currently renders "Task Report Mon Nov 10 2015" 'center'. I'm wondering is it possible for me to align this string 'right' rather than center where it currently is?...thanks in advance.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,075Questions: 1Answers: 10,385 Site admin
    edited November 2015 Answer ✓

    Hi,

    I suspect it is possible but that is something that is outside the scope of DataTables as it relates specifically to the pdfmake library that is used to create the PDF. Have a look through their documentation for details on how to style the PDF.

    Allan

  • jpublicjpublic Posts: 10Questions: 5Answers: 0

    Okay Allan Thanks alot

This discussion has been closed.