3

I am creating a pdf report file using a xsl. On the header I need a header image and the report title. I was able to make it. Now the problem is that rest of the report is overriding the image. I tried adding some blank row but its not working for me.

In xsl Header has a table in first row I am adding the Report Name and second row I am adding the image.

amod
  • 4,190
  • 10
  • 49
  • 75

1 Answers1

11

With Apache FOP, in order to output a space like   in HTML you would have to insert  .

So if you want to insert a blank line, you just have to write a fo:block whose contents is   like this

<fo:block>&#160;</fo:block>

Edit

&#160; always worked for me, but you can also try with &#x00A0; to see if it works.

Otherwise you can use fo:leader to output a blank line, like this

<fo:block>
    <fo:leader />
</fo:block>

<fo:leader> without any attributes will generate an empty line that will fit the whole page width, generating an empty line.

There is also an other way which involves specifying the amount of space needed before your block of text with the space-before attribute, like this

<fo:block>
    <!-- your header -->
</fo:block>
<fo:block space-before="1pt">
    blah blah
</fo:block>
Alex
  • 25,147
  • 6
  • 59
  • 55
  • I used it but it didn't worked in my case. i found it here http://stackoverflow.com/questions/1461649/how-to-insert-nbsp-in-xslt – amod Sep 10 '12 at 16:57
  • is also not working. It is in header does it give problem? – amod Sep 10 '12 at 17:12
  • Can you update your question with more detail about your xsl/xslfo file? – Alex Sep 10 '12 at 19:18
  • I am off from work right now... will definetly do it in the morning (Indian Time)... thnx a lot... :) – amod Sep 10 '12 at 19:50