How to preserve columns (sections) when exporting to pdf?

MathewI July 31, 2013

I've tried to edit the stylesheet, but CSS simply isn't in my toolbox... How can I make it so that columns are rendered when exporting to PDF?

Here is my existing stylesheet:

@page  
    {  
    margin: .5in;  
    size: 8.5in 11in;  
    }  
    body,p,li,td,table,tr,.bodytext,.stepfield   
    {  
        font-size: 10pt;  
        /*line-height: 1.1;*/  
        color: #000;  
        font-weight: normal;  
    }

Thanks!

5 answers

1 vote
Sean King
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 5, 2013

Instead of using Export to PDF you can use File > Print > Save as PDF. This will convert what you're seeing at that moment to PDF.

1 vote
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.
August 7, 2013

I just found out that I have already been using a workaround myself (my PDF Export Stylesheet is 1.243 lines long so it can happen that I forget and overlook certain things).

This should work:

table.sectionMacro>tbody>tr>td, table.sectionMacroWithBorder>tbody>tr>td {
display: table-cell;
padding: 2px;
border: 1px solid black;
}

The "padding" and "border" is not really needed but helps showing where the columns are. I think I copied that myself but can't remember where.

MathewI August 14, 2013

Hi, Steffen- thanks for taking a crack at this. Unfortunately, the snippet you provided there didn't change anything in my version of Confluence (5.1.4)

Eric Dahl June 17, 2016

Did anyone ever figure this out? Pretty much makes Confluence useless for my needs.

1 vote
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.
August 1, 2013

Do you know the confluencedefaultpdf.css ?

If you scroll down there is a section starting with

/* wraps the section columns underneath each other so they don't run off the page */

What follows is the standard CSS that makes the columns appear underneath each other. I guess you must try to find the CSS that overrides this and turns it all back to normal columns.

I tried a bit but don't fully understand the code and can't provide a more elaborate answer.

0 votes
salvatore December 15, 2015

Hi, Mathew. 

As for me, I have seldom tried to preserve columns (sections) when exporting to pdf. I wonder have you ever worked it out? Do I need another 3rd party manual toolkit? When it comes to PDF converting process, I have another question, I wonder have you ever tried to convert pdf to other image files before? As for myself, I am testing the related PDF to PNG converting, PDF to BMP converting , and PDF to JPG converting programs these days.  Do you have experience about it? Any suggestion will be appreciated. Thanks in advance.                  

 

 

 

Best regards, 

Pan

 

 
0 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.
August 19, 2013

Sorry that it doesn't work.

When I create two {columns} inside one {section} and export to PDF I get a page with the columns underneath each other. When I add the above code and do the same the two columns are side by side.

I am using 4.3.7. When it doesn't work for you it must be because of the different versions or because there is some other difference (e.g. how you create the columns?)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events