Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

PDF export is changing html table column's width

Mary Ramirez September 3, 2012

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
MS July 21, 2013

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.

0 votes
hsuhailah
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.
September 19, 2012

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;
}
MS September 19, 2012

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

Mick Davidson
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.
July 21, 2013

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.

0 votes
MS September 19, 2012

Hi Mary,

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

table

{

table-layout:auto;

}

Cheers,

Mary-Jane

0 votes
Giuliano C.
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 3, 2012

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

Mary Ramirez September 3, 2012

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events