Code breaks across multiple pages in PDF output

Joe Wojak February 20, 2014

Hi,

I'm using the code macro. When I create a PDF with the default Confluence settings, near the end of the code block the code breaks across 2 extra pages.

The odd thing is the page break starts more than halfway up the page. The empty space contains more than enough room for my remaining code, its just 3 lines.

What causes these excessively large page breaks and is there a fix for it?

6 answers

1 accepted

1 vote
Answer accepted
Joe Wojak March 7, 2014

I found out this is a known bug in our version. The systems team has an upgrade scheduled.

Erik Söderström April 27, 2014

Do you have a link you can share to the information about this known bug?

1 vote
Darren Tonnessen December 18, 2014

Was there a bug # that we could track from?

1 vote
Aleksandr Beslik October 5, 2014

Hello

Tell me please if the issue is fixed?
I'm using version 5.4.3, and the error is present and prevents me to live ...

0 votes
Jakob Skwarski September 10, 2020

This is still an issue.  

0 votes
Steve Meiers June 16, 2017

June 2017 and we're now running v6.1 and this is STILL an issue. My workaround is to manually break the code into page size blocks and tag the start with "cont." on the first line of each page that follows. Cludgy, but what else can we do, It makes is a mess to do HTML and PDF. I wish this bug would get resolved. Some of our long code blocks run fine and paginate beautifully, over three pages. Most not. DOH! A three year bug! HELP! 

0 votes
Davin Studer
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.
February 20, 2014

What version of Confluence are you using? I use the code macro and don't see that when I export to PDF. Have a look at your page source. Is there anything there that could be doing it? You'll need this plugin to see the source easily.

https://marketplace.atlassian.com/plugins/com.atlassian.confluence.plugins.editor.confluence-source-editor

Joe Wojak February 20, 2014

Hi Davin,

Thanks for the advice.

Regarding Confluence, we're using version 5.1-OD-6. This would indicate we have an "on-demand" version, but we migrated off that to hosted. This is kind of an odd set up. However, I'm not sure this is the problem. Other blocks of code in the code macro don't behave this way. Perhaps it's the length. The original code block is 77 lines long. I'll try with different code.

I did download the source plugin (great recommendation), however there's nothing unusual in the code that would inidcate "insert a weird page break here."

//more code above
"user": {
        "id": "xxxx",
        "buyeruid": "xxxxx",
        "data": [{
            "id": "ABC",
            "name": "XXXXX",
            "segment": [{
                "id": "ABC-123"
            }]
        }],
        "at": 2,
        "tmax": 30,
        "wseat": ["1", "2"],
		"cur": ["USD"], //breaks to new page here
        "bcat": ["IAB1", "IAB1-2"],
		"badv": ["advertiser.com"]
     }
}]]></ac:plain-text-body>
</ac:macro>

What's weird here is the macro appears to be inserting the double ]] brackets before the closing angle > on the next to last line.

Davin Studer
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.
February 20, 2014

The brackets are fine. That is part of the CDATA block ... it's and XML thing.

<ac:macro ac:name="code">
<ac:parameter ac:name="linenumbers">true</ac:parameter>
<ac:parameter ac:name="language">js</ac:parameter>
<ac:plain-text-body><![CDATA[]]></ac:plain-text-body>
</ac:macro>

Not sure what to tell you if you don't see anything in the source that could be causing it. Maybe try rebuilding the page. Cut and past the content in notepad to strip and formatting and then rebuild it from scratch and see if it goes better.

Erik Söderström April 27, 2014

We are experiencing the same issue here with code blocks spanning several pages ending with empty pages and the last two lines of code being put on the last page. We're currently running Confluence 5.4. Does anyone know if there is an ETA on the fix from the "systems team" Joe mentioned above? And is that the Atlassian systems team by the way?

Joe Wojak April 27, 2014

I opened a ticket with Atlassian support. They indicated this problem is a confirmed bug and could be fixed by upgrading to the latest version. We haven't had a chance to perform the upgrade yet to verify.

Erik Söderström April 28, 2014

Thanks for the speedy reply Joe.

We have had this bug since 3.1.1 and it is still present in 5.4 which we are running now. The latest version that I know of is 5.4.4, so if they fixed it between 5.4 and 5.4.4 that would be incredible.

I just read through all release notes from 5.4.1 to 5.4.4 and there is no mention of this bug being fixed unfortunately. I suppose we will update to 5.4.4 and test it, in case it was fixed and just not added to the release notes.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events