It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

8 answers

1 accepted

1 vote
Answer 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.

My company recently upgraded to Confluence 6.15.3 and I had to change my setting from "auto" to "fixed" to get my tables to look somewhat okay. Wondering if anyone else on this thread has upgraded and experienced a similar issue when exporting tables.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Confluence Server & Data Center 7.0 is here!

Hello Community 👋🏼 I’m Makisa, a product manager on Confluence Server and Data Center. Confluence Server & Data Center 7.0, our latest platform release, is now available and we wanted to shar...

260 views 1 12
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you