When I include an XML code block to a wiki page and export that to PDF, the xml tags don't get nicely highlighted in blue. It looks like a normal block of letters.
How can I fix this issue please?
We hit this problem too. One of my team had a look at the code being generated on the way to the PDF export and he thinks that Confluence strips out the code highlighting intentionally. It's really frustrating because we want to export code with syntax highlighting as well.
Currently we're using a rather weird workaround which involves having two copies of every code example: one to print and one to display in the browser. The printable version is generated outside Confluence with the syntax highlighting explicitly coded into the HTML styling. We added extra styles to our CSS to work with this. Unfortunately, this uses an existing utility of ours and so I cannot tell you what steps you'd need to use to implement something similar. There are quite a few syntax highlighters out there and so you could probably create a similar workaround if this is a real problem for you.
I thought that I'd voted on an issue in Jira for this but cannot find one. The closest information that I can find is here -- which explains why they dropped export of highlighted code in 2010 but not why they haven't done anything since.
I've just raised it as a support issue. I imagine that if more people ask for this then they're more likely to do something about it.
As a Belgian, beer-lover and home brewer, beer is one of my great passions. I love the fact that with just a few ingredients (usually just water, hop and malt) you can create so many different tastes...
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!
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
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot