Issue Details (XML | Word | Printable)

Key: CONF-10145
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Paul Curren [Atlassian]
Reporter: Tony Cheah Tong Nyee [Atlassian]
Votes: 2
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Confluence

PDF generation does not preserve whitespaces defined in code and noformat macros

Created: 05/Dec/07 05:50 AM   Updated: 06/Feb/08 04:54 PM
Component/s: Macros - Code Macro, Macros - Noformat Macro, PDF Generation
Affects Version/s: 2.6.0, 2.6.1, 2.6.2, 2.7
Fix Version/s: 2.7.2

Time Tracking:
Not Specified

File Attachments: 1. PDF File PDF_260.pdf (14 kB)
2. XML File xhtml2fo.xsl (72 kB)


Participants: David Ruddock, Paul Curren [Atlassian], Pranav Olkar and Tony Cheah Tong Nyee [Atlassian]
Since last comment: 42 weeks, 5 days ago
Internal Complexity: 2
Resolution Date: 23/Jan/08 01:34 AM
Internal Value: 5
Labels:


 Description  « Hide
Having the following wiki markup in a Confluence page:
{code}
public class helloWorld
{
    coding.......
}
{code}

Will render the following:

public class helloWorld
{
    coding.......
}

Generate the current page to PDF format provides the attached result, PDF_260.pdf (generated from a Confluence version 2.6.0 instance).
The full wiki markup from the attached PDF are:

{code}
public class helloWorld
{
   coding.....
}
{code}

\{noformat}
text
    some more text
\{noformat}

some text

   Some text 

This is also reproducible in Confluence version 2.6.1 and 2.6.2. Note that the panel that shipped together with the macros are gone too.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
David Ruddock added a comment - 07/Dec/07 03:46 AM
This is not a minor issue for us.

We have a fairly integrated documentation structure that uses confluence as the source for all our documentation, we then export to PDF and HTML for an secure web site to make available to clients. Over half of our documentation is on APIs: e.g. COM and XML and these make extensive use of the code macro. This export worked fine in v2.2; It is now broken in v2.6 and we need to find a fix before we can export of our API manuals.

Not good!

Note that we had to stick to the code macro and not use the new code macro has issues of it's own:
http://developer.atlassian.com/jira/browse/NCODE-3
http://developer.atlassian.com/jira/browse/NCODE-2


Paul Curren [Atlassian] added a comment - 09/Dec/07 07:08 PM
David, we're going to try and target a fix for this by 2.7.1.

Paul Curren [Atlassian] added a comment - 16/Jan/08 12:37 AM
This fix did not make it into 2.7.1. It will be addressed in a later release.

Paul Curren [Atlassian] added a comment - 23/Jan/08 04:04 PM
Fixed the indentation issue and also restored the panel background and border for code blocks.

Pranav Olkar added a comment - 06/Feb/08 12:18 PM
Can you please provide a 2.6.2 patch for this ? In our organization, code indentation is heavily used by many (there are 2500 wiki users), and after the 2.6.2 upgrade, everybody found that the pdf formatting which used to work in 2.4.3 does not work in 2.6.2.So this was escalated and it was a chaos. It is a matter of concern, and I think you should provide patches for the same.Engineering team,please help.

Paul Curren [Atlassian] added a comment - 06/Feb/08 04:54 PM
The attached xhtml2fo.xsl file fixes the missing code macro border and the indentation issue for Confluence 2.6.2.

To install this file you will need to replace the one within your current confluence-2.6.2.jar - remember to back up your original confluence-2.6.2.jar just in case.

e.g. in Unix speak

  1. stop your server
  2. mkdir temp
  3. cd temp
  4. jar xf <confluence home>/confluence/WEB-INF/lib/confluence-2.6.2.jar
  5. copy <new xhtml2fo.xsl> .
  6. jar cf confluence-2.6.2.jar .
  7. cp confluence-2.6.2.jar <confluence home>/confluence/WEB-INF/lib
  8. restart the server