Format Tables that are Exported to PDF

Deleted user January 15, 2013

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
Daniel Borcherding
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.
January 15, 2013

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.

Deleted user January 20, 2013

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.

3 votes
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.
February 24, 2013

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.

Madhumathi lees August 12, 2020

What landscape page style are you using may I know? I have been trying to work around my issue - Tables are getting different sizes according to their content size when I try to export it to pdf in landscape mode.

1 vote
GG December 13, 2017

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

0 votes
Karen Ferland June 17, 2019

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.

0 votes
cabakoser May 11, 2017

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

0 votes
Amit Chahar February 6, 2017

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

0 votes
Nicolas Casel
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.
February 6, 2017

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

0 votes
Amit Chahar April 5, 2016

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 .

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events