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

0 vote

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

Hi Mary,

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

table

{

table-layout:auto;

}

Cheers,

Mary-Jane

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.

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

271 views 11 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