Created attachment 366552 [details] Image showing pdf result Description of problem: Version-Release number of selected component (if applicable): publican 0.44 publican-jboss 0.19 How reproducible: <example> <title>NumberGuess.java</title> <programlisting><![CDATA[ @Name("numberGuess") @Scope(ScopeType.CONVERSATION) public class NumberGuess implements Serializable { private int randomNumber; private Integer currentGuess; private int biggest; private int smallest; private int guessCount; private int maxGuesses; private boolean cheated; @Create public void begin() { randomNumber = new Random().nextInt(100); guessCount = 0; biggest = 100; smallest = 1; } public void setCurrentGuess(Integer guess) { this.currentGuess = guess; } public Integer getCurrentGuess() { return currentGuess; } public void guess() { if (currentGuess>randomNumber) { biggest = currentGuess - 1; } if (currentGuess<randomNumber) { smallest = currentGuess + 1; } guessCount ++; } public boolean isCorrectGuess() { return currentGuess==randomNumber; } public int getBiggest() { return biggest; } public int getSmallest() { return smallest; } public int getGuessCount() { return guessCount; } public boolean isLastGuess() { return guessCount==maxGuesses; } public int getRemainingGuesses() { return maxGuesses-guessCount; } public void setMaxGuesses(int maxGuesses) { this.maxGuesses = maxGuesses; } public int getMaxGuesses() { return maxGuesses; } public int getRandomNumber() { return randomNumber; } public void cheated() { cheated = true; } public boolean isCheat() { return cheated; } public List<Integer> getPossibilities() { List<Integer> result = new ArrayList<Integer>(); for(int i=smallest; i<=biggest; i++) result.add(i); return result; } }]]> </programlisting> </example> Additional info: Note that the example label is rendered over the code listing in the pdf document. See attached image.
A: Please provide a link to the SVN repo, it makes it easier for me to test stuff. B: You are nesting blocks in a way that FOP doesn't handle very well, similar to nested tables and lists of lists, see bforte for a dissertation of this issue :) Having said that if you supply a repo I have access to I'll poke around and see what I can come up with.
Here is the repo: https://svn.jboss.org/repos/jbossas/projects/docs/enterprise/5.0/Seam_Reference_Guide. The relevant chapter is Tutorial.xml. I am in the process of tidying this up (including removing the <example> tags) and haven't committed my changes to the repo. The code example in the bugzilla ticket is an example of the code which produces the problem: <example> <title>NumberGuess.java</title> <programlisting><![CDATA[ ... }]]> </programlisting> </example> Ben
Below is a link to the source (JBoss Community) pdf document: http://docs.jboss.org/seam/2.2.0.GA/reference/en-US/pdf/ Note the correct rendering of the Example label (it doesn't overwrite the code as does our version). Is positioning the "Example" label above the code a JBoss "workaround"? Will it fix our rendering problems? Ben
NB. Go to page 3 for a relevant example relating to the above comment.
Created attachment 366758 [details] image of corrected output attribute-set formal.object.properties hard codes keep-together.within-column to 'always', this constrains an example to a single page, resulting in the mis-formatting of the supplied eaxmple. Modified attribute-set example.properties to set keep-together.within-column to null, which allows the example to break across pages and displays the title correctly.
This fix will ship with Publican 1.0