• Resolved lehostudios

    (@lehostudios)


    Hello Tobias,
    I have installed the print button and that works great. However, there are a few things that I want to tweak.
    1. When printed, my table puts the website and page name at the top of the page. How do I get rid of that and replace it with a custom title. (I don’t want to use the table name or description since it is a filtered table).
    2. Can I control the size of the title?
    3. When printed, the table is centered, but if I send it to pdf it is not. How do I center the pdf.
    Thanks

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Unfortunately, customizing the Print and PDF views is rather difficult, first of all for technical reasons, but also because this is handled by an external JavaScript library. However, I’m not the developer of that library, but only embedded it into the Extension, which is why I don’t know all internals about it. For that, you’d have to check out its documentation at https://datatables.net/extensions/buttons/ You’d then find certain options for different things that we could add to a “Custom Command” to apply them.

    Now, for your questions:
    1. From what I know, DataTables uses the title of the page i.e. what is between the HTML <title> tags) for this. There could however be an option to change this.
    2. Probably with a similar option as well, but to be honest, I’m not sure.
    3. This could depend on the table content size, but again, it could be possible with an option.

    Having said all that, I can only suggest that you try finding relevant options in the DataTables documentation (see the link above). I’ll then gladly assist in applying them to your table.

    Another option could of course be to create a PDF of your table offline, e.g. in Excel, and then offer that for download. But of course that would not update automatically whenever you make changes to your table in TablePress.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘Print Formating’ is closed to new replies.