Line height

  • Anders Marchstener


    How do i set line height for text?
    I can see that Font.LineHeight exists, but there is only a getter and no setter, so can't change line height.

    Anders Marchsteiner

  • Stefano Chizzolini


    Thank you for your report: this issue has been solved by PDF Clown Patch .

    See GraphicsSample (included in the distribution) for an example of line spacing setting (BuildTextBlockPage2() method).

    I was aware that BlockFilter  lacked to manage some text parameters such as interline spacing (that's strictly related to line height) - actually, you can read the following comment on its source code head:

      TODO: Manage all the graphics parameters (especially
      those text-related, like horizontal scaling etc.) using ContentScanner -- see PDF:1.6:5.2-3!!!

    Interline spacing can be set either as an absolute user-space-unit value or as a ratio related to the current font line height.
    The value Font.LineHeight you mentioned works at a different level: it's part of the font description, NOT content composition!


  • Stefano Chizzolini

    These patches are incremental ( description states: "PDF Clown Patch to be applied against PDF Clown"): you have to download 0.0.8 (as you did), but also Patch and Patch, then you have to apply each patch sequentially.

    On the next release (0.1.0) I'll publish the SVN repository.

  • Anders Marchstener

    Ahh thanks!

    Sorry for not realizing that by myself.


Log in to post a comment.