Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I lose HTML macro formatting when exporting to PDF?

Matt Treder
December 5, 2012

Within a Confluence page, we have sections coded in HTML using the {html} macro. However, when we use the Scroll Wiki tool to export the pages to PDF, most of the html formatting is gone. Bolded text remains as such, but all the line breaks and spaces are not recognized, and that's the same for lists that contain sublists - everything looks to just run together.

Any idea why the scroll pdf tool is only recognizing some of the HTML in the macro but not all of it? Is there any simple fix to remedy this problem?

2 answers

1 accepted

3 votes
Answer accepted
Milo Test
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 Champions.
June 15, 2016

You can do it with the Div macro:

Put the Page Tree macro in the body and add 

margin-left: auto; margin-right: auto; width: 18em

to the Styles field. You can play with the nem amount to control line wrap.

Melanie Albrecht
Contributor
June 15, 2016

Thanks Milo

Unfortunately the Confluence administrator won't let us use the HTML macro, which I think would let me use the Div macro.

Milo Test
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 Champions.
June 15, 2016

The Div macro is its own thing, is pre-installed and turned on by default in both Cloud and Server, and has nothing to do with the HTML macro.

Steven F Behnke
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 Champions.
June 15, 2016

It is not pre-installed in server actually. It's part of Adaptavist Content Formatting Macro's I believe. 

That happens to be currently pre-installed in Cloud however.

Melanie Albrecht
Contributor
June 15, 2016

Thanks Steven - that must be why I don't see it.

In addition, I wonder if it actually would work, given what you said about the Pagetree macro including a block element.

Milo Test
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 Champions.
June 16, 2016

I stand corrected (the Content Formatting Macros are just so useful). Regardless, I actually tried it before I posted the answer to make sure it worked:

image2016-6-16 9:6:46.png

Steven F Behnke
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 Champions.
June 16, 2016

Sweet! Yeah, that must override the nature of the block div by forcing margins and width.

Melanie, the content formatting macros are Free/Paid. The Div/Style macros are included under the FREE macros. Just a thought! 

Kelley Cooper
Contributor
August 22, 2016

Thanks, Milo!  This worked great for me on the server 5.8 version...and I used it with the pagetreesearch macro.

0 votes
Steven F Behnke
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 Champions.
June 14, 2016

The plugin is wrapped in a DIV which is a block element. It occupies the entire space given to it and thus cannot just be "justified."

I don't really see an easy way to change that behavior.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events