is there a way to have the header be... "as big as...
# advancedpdf
e
is there a way to have the header be... "as big as it needs to be". We use if statements in the header so sometimes it displays more information than others. So setting one size doesn't work for us. I thought I could set header-height to "auto" but that didn't do it. Any ideas?
Copy code
<body header="nlheader" header-height="200px" footer="nlfooter" footer-height="20pt" padding="0.5in 0.5in 0.5in 0.5in" size="Letter">
k
Isn't the point of BFO that it automatically makes things "as big as they need to be" for you automatically?
Or does it automatically scale font size down? (now that I think about it)
e
Well, it isn't doing it for me lol... When there is a lot of information in the header, the header gets cut off... when there is little information in the header, there's a bunch of blank space. If I remove header-height all together, the header is tiny and everything looks smushed
s
From what I have seen, very little is automatic with BFO in terms of width, size, fonts, etc. I spend 80% of my time in template changes testing various paths of if-else statements and making minor adjustments to the size of things.
However, you can get clever with things like this:
<body header-height="${(testcondition == 1)?string('10%', '13%')}"
basically, the string directive can act like a ternary operator, where the first value is written if the condition is true, otherwise it writes the second value
There is even a
?switch
directive (see the link above) if you want to switch between more than two values, or use non-boolean values
e
thanks scott, I think that should work for what I'm doing