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

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?

4 answers

1 accepted

This widget could not be displayed.

The line break code that was being used </br> was being recognized as HTML code, but the scroll tool did not accept it. Switching the line break to <br/>, which I believe is the more correct tag, fixed the issue and the scroll wiki tool now keeps the formatting. Simple solution.

Thanks for the input!

This widget could not be displayed.

Hi Matt

I suggest you to check if there's any PDF stylesheet set that can be overriden your HTML code to cause this.

To do that, check this on Confluence Admin > PDF stylesheet.

If that's not the case, check out your Confluence logs for any warning or errors regarding the scroll wiki tool.

Cheers!

This widget could not be displayed.

Hi Matt,

You may need to create a CSS for the pdf and include formatting elements in it.

I suggest to use classes and ids for them.

I hope this helps.

Cheers,

Selcuk

This widget could not be displayed.

Thanks for the input! It appears that the issue was the HTML line break code that was being used </br> worked with the HTML, but the scroll didn't recognize that code. Changing the tag to <br/> (which I believe is the correct HTML line break tag) fixed the issue.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted an hour ago in Featured Groups

Hi! I'm Cameron Deatsch, Head of Server at Atlassian and I'm hosting an AMA next week.

Hey team! I'm Cameron Deatsch, Head of Server at Atlassian. I'll be hosting an AMA over in our Questions section of the Community next Monday, so shoot me your questions, upvote others' question...

17 views 0 2
View post

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