yeah i think i'll go the variable route ultimately...
# advancedpdf
a
yeah i think i'll go the variable route ultimately - gotta make sure i can detect the number of line breaks in it first
e
This is proving to be more difficult than I thought. Are you able to count the line breaks of a field>?
a
i was - it's a textarea field i believe, so split on "<br />" and then used ?size to get the number, basically for each line in that field i am adding 1% point to the header height
not perfect but it solves the immediate problem
Copy code
<#assign num_note_lines = record.custbody_inv_comments?split("<br />") />
<#assign num_breaks = num_note_lines?size />
<#assign header_height = 50 + (num_breaks * 1) />
<body header="nlheader" header-height="${header_height}%" footer="nlfooter" footer-height="20pt" padding="0.5in 0.5in 0.5in 0.5in" size="Letter">
it did take me some trial and error to learn that it was
<br />
, not
<br>
,
/r
or
/n
that worked here
e
This was* my exact struggle. I gave up after trying;
<br>
,
<br/>
,
/r
,
/n
, and
/r/n
I feel like that will help me greatly in the future
a
haha - go figure, glad i got lucky on my 4th try then