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

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
Accepted answer

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.

I added the code

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

And it works like a CHARM!

Thank you Steffan!!

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

@Jorge:

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

Thanks, Steffan. Will try it shortly!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,526 views 25 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you