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

This widget could not be displayed.

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.

This widget could not be displayed.

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.

This widget could not be displayed.

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

This widget could not be displayed.

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 .

This widget could not be displayed.

@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).

This widget could not be displayed.

@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. 

This widget could not be displayed.

@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
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

342 views 2 5
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