Hi, Is there a way to make the header height dynam...
# advancedpdf
m
Hi, Is there a way to make the header height dynamic? I have a table at the start of the body and if the header happens to take up an extra row for some documents (say a customer has a very long name), I want the table in the body section to be pushed down by the corresponding amount
s
You could try something like this:
header-height="${(record.entity.name?length > 80)?string('10%', '13%')}"
record.entity.name is just a guess at the field name, obviously use whatever field you need to check the length for
m
Sorry, I was on vacation and didn’t see this until now. Unfortunately there are many different fields that could cause the header height to vary, so what I’m looking for is to sort of make it take up whatever space it needs to take up for each specific document and then have the body section start
But thank you for your suggestion. If you have any other ideas I’d love to hear them 🙂
s
I don't think there is a truly dynamic option to make the header the exact right size. I could be wrong, but nothing in the BFO documentation points to that kind of behavior. I think the more consistent option is to make the header large enough for most situations. That could lead to wasted space in some cases, though
m
You are probably right, I’ll talk to the customer and see what they think. Thank you! 🙂