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 votes

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
Community showcase
Published Oct 09, 2018 in Confluence

Introducing Praecipio Consulting, an Atlassian Solution Partner

Hey there Community!  My name is Vannya Vallejo, the Channel Communication Specialist at Atlassian and I want to help Atlassian users like you learn about our Solution Partners and how they c...

393 views 0 9
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