Announcement

Collapse
No announcement yet.

Print to PDF Tables

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Print to PDF Tables

    Hi

    Whenever I generate a pdf with a table, it is missing the borders. I have attached some images as an example.
    The table-custom class just makes the table borders black.

    Is there any way of showing the table without using inline styling?


    Click image for larger version

Name:	wysiwg.jpg
Views:	697
Size:	62.7 KB
ID:	46163Click image for larger version

Name:	wysiwgcode.jpg
Views:	605
Size:	76.0 KB
ID:	46164Click image for larger version

Name:	wysiwgpdf.jpg
Views:	612
Size:	21.8 KB
ID:	46165

  • #2
    Originally posted by VinhPN View Post
    Hi

    Whenever I generate a pdf with a table, it is missing the borders. I have attached some images as an example.
    The table-custom class just makes the table borders black.

    Is there any way of showing the table without using inline styling?


    Click image for larger version  Name:	wysiwg.jpg Views:	1 Size:	62.7 KB ID:	46163Click image for larger version  Name:	wysiwgcode.jpg Views:	1 Size:	76.0 KB ID:	46164Click image for larger version  Name:	wysiwgpdf.jpg Views:	1 Size:	21.8 KB ID:	46165
    Hi VinhPN,

    My personal experience with editing templates is that you can not deal with general css <style> blocks. I don't know why they're thrown away... I did not dig this problem and I'd like to know how to solve. Anyhow if you to revert to style inline single html blocks it's fine. In my personal experience this is the fastest way to make it work and get what you need out of tcpdf. See an example here:

    HTML Code:
    <table cellpadding="2">
        <tbody><tr>
          <th width="35%" align="left" style="font-size: 10px; border-bottom:1pt dotted #ddd"><span style="font-style: italic">Heading text</span></th>
    Hope this helps,
    Michele

    Comment

    Working...
    X