I'm using fop libraries v1.1 to produce a pdf, and I noted that fop by default collapse white-spaces inside strings. For example a block like:
<fo:block>
Sample Text
</fo:block>
Render as
Sample text
eliminating whitespaces. I would like to keep strings inner whitespaces in the generated pdf, so I tried to use the white-space="pre"
attribute inside the block tag, but it preserves only white-spaces outside the string.
Then I tried to use the white-space-treatment="preserve"
attribute inside the block tag, but the rendered page had collapsed white-spaces.
Finally I tried to use the white-space-collapse="false"
attribute inside the block, and also in this case the rendered page had collapsed white-spaces.
Why fop is collapsing by default white-spaces inside strings? Is there a way to change the fop behaviour in order to preserve white-spaces inside strings?