Java itext line feed size

How does one set the line feed size with itext? I mean if you want to have a small font, and then set appropriate size of the line feed. (For a PDF).

Thanks in advance.

Answer

You want to set the “leading”

Paragraph p = new Paragraph(); // or Phrase
p.setLeading( 12f ); // in points

The usual leading is 1.5 times the font size, and that’s what you’ll get if you don’t set it directly.

“Leading” (pronounced like the element, lead) is an old printing term describing how much extra lead was to be added between lines of type.

Leave a Reply

Your email address will not be published. Required fields are marked *