PDF export is changing html table column's width

The html tables are exported assigning equal width for each column, even though the original html table's columns have a different width. Is there any work around this? Right now I have to export to a word and a pdf documents and print the pages from each file that look acceptable.

4 answers

This widget could not be displayed.

Hello there, I'm not sure if is it is the same problem, but, we have a Feature Request talking about table column's width in export to pdf. Could you please take a look at the Feature Request?

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

Cheers

Hi Giuliani:

It is related with formatting, but in the features requests that you sent me they are mentioning column borders and header shadows, for my case is the column width. I am attaching an image in case this helps.

Thank you,

Mary

This widget could not be displayed.

Hi Mary,

You can fix this in the PDF stylesheet by adding the following CSS:

table

{

table-layout:auto;

}

Cheers,

Mary-Jane

This widget could not be displayed.

Sounds like you're hitting this bug: https://jira.atlassian.com/browse/CONF-25567

The workaround is to add this CSS code to the custom PDF Stylesheets:

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

Changing the table width appears to affect the note macro in my PDFs. :-(

I've tried using both of the following and niether, either individually or combined, have made any diference. I can't see anything in the user info that helps, and I have tried both to find it and use what's there.

@page
{
/*A4-sized pages in landscape orientation are 297 mm wide by 210 mm long*/
size: 297mm 210mm;
}
@table
{
table-layout:auto !important;
width: auto !important;
}

Does anyone else have any advice on how to get tables to print properly? I'm also using a two column layout added from the Page Layout button, this also doesn't work.

Cheers.

This widget could not be displayed.

Some other layout properties such as margins may cause the tables to come out in portrait on landscape pages (especially when you're switching to landscape for tables). Try experimenting with margins, etc.

You can force column widths by placing discreet characters such as underscores, coloured to match the shading, in the header boxes after the header text.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Tuesday in Confluence

Add-on evaluation with confluence templates

Atlassian market place contains number of Apps/Addons which improves the capability of out of the box Atlassian products. It is good to follow a plugin evaluation process before install add-ons. So t...

137 views 12 6
Read article

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