Opened 9 years ago

Last modified 5 years ago

#5321 new defect

table column width

Reported by: Lucas Owned by: Álvaro Iradier
Priority: normal Component: TracWikiPrintPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


how can i format my tables with the "table-layout: automatic" format? for example: in a 3-column table, instead to have a fixed 33% width for each column, i want to automatic width associated on the content cell. If I have in the first column the code number (# 1, 2, 3, ...), in the second a name, and in the 3th the description (long), my printed table becomes ugly and big. I already tried to use the css formating, without success... thanks

Attachments (0)

Change History (3)

comment:1 Changed 9 years ago by Lucas

anybody knows how to truncate the column width based on its own content?

comment:2 Changed 9 years ago by Álvaro Iradier

I think the xhtml2pdf library doesn't support that. Take a look at the manual:


There's something about cell widths in page 18:

Tables are supported but may behave a little different to the way you might expect them to do. These restriction are due to the underlying table mechanism of ReportLab.


The table renderer is not able to adjust the width of the table automatically. herefore you should explicitly set the width of the table and to the table rows or cells.

Last edited 5 years ago by Ryan J Ollos (previous) (diff)

comment:3 Changed 9 years ago by Álvaro Iradier

Summary: table column widhttable column width

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Álvaro Iradier.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.