Are you trying to count paragraphs (the # of parag...
# advancedpdf
s
Are you trying to count paragraphs (the # of paragraphs) or the # of lines within a single paragraph? To count the paragraphs (well, really, you’ll be counting the number of line breaks + 1) you’ll need to split on the line break tag that FreeMarker substitutes for the
\n
, which is either
<br />
or
<br>
(can’t remember which at the moment). It need to make that substitution, since that is how both browsers and BFO recognize a new line. If you want to count the lines within a single paragraph, though, that could be harder as there may not be any true line breaks, the text could be wrapping.
l
Thank you for your time and reply ! I think that it’s all embedded in a single paragraph. Is there a way for me to check that ?
s
Well, if you print the document as HTML, instead of PDF, you’ll be able to view the output, and see if there are any separators or not.
👍 1