PDF Export omits text from the code macro

We use Confluence to provide technical support documentation and the code macro is used on many pages to display code examples.

Just noticed that some of the examples in the exported PDF made no sense at all. On investigation it became clear that when the example included a long line of hyphens (a comment to break up the text in the configuration file), some of the subsequent lines of code were simply omitted from the exported document. No idea why this is happening or how many other topics might be affected but not good behaviour.

The wiki text:

{code}

# JAVA ANALYSIS -------------------------------------------------------------------------------------

projects/JavaApp1/*

projects/JavaApp2/*

projects/NewJavaApp/*

# Maintainability

....

{code}

Appears as expected in the browser but appears in the PDF as:

{code}

# JAVA ANALYSIS

-------------------------------------------------------------------------------------

Maintainability

....

{code}

2 answers

1 accepted

On investigation, this turns out to be a problem only with my customized PDF stylesheet. If I delete my stylesheet and revert to the default Confluence PDF stylesheet then there is no problem (not a long-term option).

The workaround was to make sure that the lines of hyphens were shorter and did not wrap in the export.

Something went wrong with my pdf reader. I wanna convert pdf into text first. Any suggestion will be appreciated. Thanks in advance. How about the abovementioned one?

 

 

----------------------------------------------------------------  

Related: pdf conversion to text

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

993 views 23 13
Join discussion

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