Support » Plugin: TablePress » Generate PDF in landscape orientation

  • Resolved andynz

    (@andynz)


    Hi Tobias
    I use the DataTables Buttons extension to print a table or convert to PDF.
    Printing is fine as I can select Portrait or Landscape when I print it.
    However, the PDF is always generated in Portrait (rotating in Adobe simply rotates the entire page and not the text within it).

    Is there a way of specifying that, for a particular table, the generated PDF should be in landscape orientation?

    Regards
    Andy

    https://wordpress.org/plugins/tablepress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Unfortunately, I’m not aware of a totally easy solution to this. You will have to add an extra parameter to the configuration of the PDF button for the DataTables Buttons Extensions. See https://datatables.net/reference/button/pdfHtml5 for the documentation. With the information from that, you’d have to modify the tablepress-datatables-buttons.php file.

    Regards,
    Tobias

    When you that (modify the php) the orientation is landscape for every printed table. Why not an extra option to the shortcode?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the suggestion. Once I find the time to release a new version of the Buttons Extension, I’ll think about making more options available via Shortcode parameters.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Generate PDF in landscape orientation’ is closed to new replies.