Format Tables that are Exported to PDF

When exporting to PDF in confluence we find that the tables are screwed up, its like the width is set to 100% and each column gets 50 so columns with large text entrys become very difficult for the user to read.

We have tried to play around with the CSS of the pdf export by inserting the following

table  
{  
   table-layout:auto !important;  
   width: auto !important;

}

But this has very little effect, is there anyway we can control if the columns has content it extends to the end of this content?

Thanks for your help in advanced

7 answers

1 accepted

Hello Brian,

What version of Confluence are you using? I tested this against Confluence 4.3.3 just now and saw the behavior you mentioned.

I added the above CSS to my Confluence Admin > PDF stylesheet and it corrected this issue. Where did you add that css?

Digging a bit deeper I found the following open issue

https://jira.atlassian.com/browse/CONF-25233

It looks like the issue is currently being worked on. Please visit that page and vote on the issue to further increase it's visibility. I will add this post to the issue as well to let our developers know that our community wants this fixed.

This is confluence version 4.3.2, i added the above code to the pdf export stylesheet configuration.

This seemed to have an effect, the first time i added it i missed a } so thats why is didnt work, i was thinking for ages why this didnt work and decided to recheck and once i added the end brace the table was a little more readable.

The problem is if you have several columns eveything can become very unreadable.

The table-layout property can have either "auto" or "fixed" as value. When you have a lot of columns "auto" is probably better because it it less space consuming. But it is still difficult to find a setting that works for all tables.

I ended up using "auto", plus making the font size in tables smaller, plus adding some manual word breaks in table cells, plus defining a special landscape page style for large tables.

You can try Content Exporter for Confluence. It provides a more flexible and easy-to-use way to export content to PDF:

https://marketplace.atlassian.com/plugins/com.metainf.confluence.plugin.pagetreeexporter.pagetree-word-exporter-plugin/cloud/overview

Thanks for the style smile, it works perfectly with Confluence 6.0. Now the column width is not getting divided equally, instead is fixed smile .

@Amit Chahar ,

Did you write these rules:

table 
   table-layout:auto !important; 
   width: auto !important;
}

In the 'pdf stylesheet ' tab?

Because it does not work on my side (but I am on Confluence 5.10.8).

@Nicolas Casel, Yes, I added the rules exactly as you have mentioned above in the "PDF Stylesheet" tab. It is working fine. May be you need to update the Confluence version. 

@Nicolas Casel, Yes, I added the rules exactly as you have mentioned above in the "PDF Stylesheet" tab. It is working fine. May be you need to update the Confluence version.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

370 views 20 10
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