Hi,

I have a simple XSL report with header, body and footer which renders to a
PDF.  My Java application passes variables to the XSL to set body-margin,
header/footer-extent and font sizes.

I set the header size (in point not mm) to be slightly larger than the font
size for text to appear in the header.  This works fine - gives enough space
for the header to hold all the text.  

However, if the text in the header (which is set by a user back in the
application) is "longer" than the width of the header, that text will carry
over to a next line...and so bleed into the body.

I've seen this post from a while back  
http://www.nabble.com/Auto-size-header-to-fit-with-content---td4765740.html#a4765740

...but it doesn't really help.  Hardcoding for line height, text height,
etc, etc is too dangerous.

I've scoured the FOP Javadoc and cannot seem to figure out if it's possible
to access the rendered PDF (as some sort of tree or data object) and work
out if the header text has wrapped.  Is it possible to determine this and so
fix it?  

Or is it possible to access the PDF itself and determine if wrapping has
occurred in the header?

If I can detect the header has wrapped text (or footer for that matter), I
can just increase the header by the original amount and re-render to PDF.


Thanks in advance,

Bernmeister.
-- 
View this message in context: 
http://www.nabble.com/Change-the-header-footer-size-in-a-PDF-tp23209748p23209748.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to