Changing iText list bullet to a black spot

I want to create an unordered list using iText. However, I don't want the default bullet to be dash, but a black spot (look to the spot right to your reputation marking your medals - something like that, but black). I don't know if iText has this already implemented (I couldn't find it), or do I have to do it manually.

The problem is, if I have to do it manually, since there are no black spots on a keyboard, I'd have to insert an image as the ListSymbol, but the setListSymbol method only accepts Chunk or String as an argument...

What do I do?

Answers


The answer is in your own question. You can use a Chunk as list symbol. If you want to use a custom image (e.g. one that visualizes a black spot), you can wrap such an image inside a Chunk. If you don't want to draw such an image yourself, you could look for a font that has one (Webdings? Wingdings?) and use a Chunk with a character from that font.


This is an example, this char is the bullet of unorder list in HTML.

 List list = new List(List.UNORDERED);
            list.setListSymbol("•");
            list.add(new ListItem("list 1");
            list.add(new ListItem("list 2"));
            list.add(new ListItem("list 3"));

Need Your Help

Forwarding requests UDPSocket

ruby network-programming dns udp eventmachine

I have a basic ruby program, that listens on a port (53), receives the data and then sends to another location (Google DNS server - 8.8.8.8). The responses are not going back to their original

Can't install PHP Package on CentOS

php linux centos yum

I am having trouble re-installing PHP via yum on my server hosted by digital ocean.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.