Aligning bullets in JasperReports
Asked Answered
K

1

1

The following post answers that bullets can have a hanging indent / be aligned by adding left-padding.

Jasper Report HTML bullet hanging indent

However, when I tried to do that, the whole line would move and so the bullets would no longer be padded

So the text:

- TEXT TEXT TEXT
TEXT TEXT TEXT

would become:

    - TEXT TEXT TEXT
    TEXT TEXT TEXT

when what I want is:

- TEXT TEXT TEXT
  TEXT TEXT TEXT

How can I line up the second line of the bullets. Is there a hanging indent/first line indent that accepts negative numbers, or any other method that I could do this?

Kohima answered 29/4, 2013 at 14:43 Comment(0)
K
0

After playing around a bit I found that what I could do was add padding to the whole paragraph and make the first line a negative indent.

I am using an api called dynamic reports so the way I did it was

TextColumnBuilder<String> itemBulletsCol = col.column(
    "", COLUMN_NAME_BULLET_LIST, type.stringType()
).setStyle(....
        .setFirstLineIndent(-10)
        .setPadding(10)
);
Kohima answered 10/5, 2013 at 15:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.