Hi everyone, i am trying to add a list on a
rtf, i need that the paragraph added to the ListItem has a leading of
19f, or 1,5 but its imposible... i try to do that in differents way, i
try to add a paragraph to a listItem and then add the listItem to the
List, or directly add text to the listItem and set the leading to the
listItem and finally add the listItem to the List, both methods does
not have effects to the document... i use this code to do that:
private void writeIncisosOn(GbaRtfDocument doc) throws
UnsupportedEncodingException, DocumentException {
List incisos = new List(List.ORDERED, 20);
Iterator<Inciso> it = articulo.getIncisos().iterator();
incisos.setAlignindent(false);
while(it.hasNext()){
Inciso inc = (Inciso) it.next();
System.out.println("Escribiendo Inciso " +
inc.getNumero() + " en
documento");
String str = new
String(inc.getCuerpo().getBytes("ISO-8859-1"));
str = str.replaceAll("\r\n", "\n");
ListItem li = new ListItem();
li.setAlignment(Element.ALIGN_JUSTIFIED_ALL);
li.setFont(new RtfFont("Arial", 11));
li.setLeading(19f);
li.add(str);
incisos.add(li);
if(inc.hasApartados()){
li.add(this.getApartadosListFor(inc));
}
}
doc.add(incisos);
}
I could see in the rtf document open with notepad that the attribute
\sl360\slmulti1 is not present for the listItem, when i open the rtf
generated by iText with MSWord and add leading of 1,5 to the list item
the attribute \sl360\slmulti is added to the the \pard of the
listItem, and then i have leading on the listItem,
Someone can explain if this is a bug of the library or if i am doing
something wrong??
Best Regards,
Juan Manuel Diaz
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php