On Demand Confuence - PDF Export - Tables have equal size columns, need text-sized

Ira Chandler September 3, 2013

Apparently, PDF export takes any table and forces the columns to be all the same width. Three columns are forced to 33% each regardless of the text. I would like them to NOT specify the width, and let the columns achieve their natural width based on the content. Cannot find how to do this. Certainly there is a CSS override (already using one to increase the font size) but I am not savvy enough to find it.

Thanks in advance.

3 answers

1 accepted

1 vote
Answer accepted
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 3, 2013

This behaviour is defined by the CSS property "table-layout". It can be "auto" or "fixed". Try "auto" to have the table automatically adjust to the content inside the table cell.

1 vote
Ira Chandler September 4, 2013

I added the code

table 
{
    border-collapse: collapse;
    table-layout:auto;
}

And it works like a CHARM!

Thank you Steffan!!

Jorge Onrubia March 5, 2014

You added that code on the PDF Stylesheet on the Look&Feel section??

Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 5, 2014

@Jorge:

Yes, that is right. You must enter the CSS code at
Browse > Space Admin > Look and Feel > PDF Stylesheet > PDF Export Stylesheet

0 votes
Ira Chandler September 3, 2013

Thanks, Steffan. Will try it shortly!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events