• Hi Lewis

    I was typing up this post but found a workaround mid way through. It’s prety niche so it probably won’t affect anyone. I’ll leave this up just in case. Please feel free to mark as resolved.

    Workaround:

    Settings > Easy Table > Use TH for the first row? (unticked)

    save settings

    Testing out a popular plugin called easy table, which makes tables from comma seperated text within a [table] shortcode (example).

    you can specify the width of columns:

    [table]
    Col 1[attr width="10%"],Col 2[attr width="10%"],Col 3[attr width="25%"],Col 4[attr width="50%"]
    ...
    [/table]

    which outputs in the page html as

    <tr><th width="10%">Col 1</th>
    <th width="10%">Col 2</th>
    <th width="25%">Col 3</th>
    <th width="50%">Col 4</th>
    </tr>

    however the generated pdf doesn’t respect these styles (link)

    On the other hand, the pdf can render the column width correctly if I copy in the table directly as html. In this case I specify the styles as in-line CSS via the text editor.

    https://www.ads-software.com/plugins/wp-post-to-pdf-enhanced/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Lewis Rosenthal

    (@lewisr)

    Hi, Alex…

    (Responding in order.)

    Indeed, columns and snaking text seem to be almost as troublesome for handing to TCPDF as images in the header (a quick web search will confirm the number of questions regarding these three issues).

    I’ll add this to the list, though, and see if we might do a better job of handling the output from that plugin, which after all, should just be HTML. There must be some additional tag(s) which are breaking the raw HTML we feed to TCPDF.

    Thanks for letting me know, and for posting your workaround!

    Cheers

    Lewis

    Plugin Author Lewis Rosenthal

    (@lewisr)

    Instead of marking this as resolved, Alex, I’m going to mark it as “not a support question.” It’s a good how-to, though, and thanks again for sharing it.

    Cheers

    I also did some testing with trying to get some Twitter Bootstrap shortcodes and plugins to work, also with no luck. The ones I tried were: WordPress Twitter Bootstrap CSS, Bootstrap Shortcodes for WordPress, Easy Bootstrap Shortcode and Bootstrap Glyphicons in Visual Editor.

    Oops, I accidently posted the last post in the wrong thread. Going to re-post it in https://www.ads-software.com/support/topic/include-a-print-css-file

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘table CSS formatting from plugin not applied’ is closed to new replies.