how can I use columnText to append text a document.. I get the following
exception.
com.lowagie.text.DocumentException: Irregular columns are not supported in
composite mode.
at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)
at com.lowagie.text.pdf.ColumnText.go(Unknown Source)
at com.lowagie.text.pdf.ColumnText.go(Unknown Source)
for the code below. I created a document before this adn added lot of
content using PdfPTable.
StyleSheet style = new StyleSheet();
style.loadTagStyle("ul", "face", "Times");
style.loadTagStyle("ul", "size", "25px");
style.loadTagStyle("ul", "leading", "15f");
style.loadTagStyle("li", "face", "Times");
style.loadTagStyle("li", "size", "25px");
style.loadTagStyle("li", "leading", "15f");
style.loadTagStyle("p", "face", "Times");
style.loadTagStyle("p", "size", "11px");
style.loadTagStyle("p", "leading", "12f");
style.loadTagStyle("p", "spacingAfter", "6x");
/*
HTMLWorker worker = new HTMLWorker(letterDocument);
worker.setStyleSheet(style);
worker.parse(new StringReader(readyJob.getContent()));
*/
PdfContentByte cb = letterWriter.getDirectContent();
ArrayList arr = HTMLWorker.parseToList(new
StringReader(readyJob.getContent())
,style);
ColumnText ct = new ColumnText(cb);
for (int k = 0; k < arr.size(); ++k){
Element element = (Element)arr.get(k);
if(element instanceof Paragraph){
Paragraph p = (Paragraph)element;
p.setSpacingAfter(6f);
}
ct.addElement(element);
}
ct.go();
Paulo Soares wrote:
>
> ColumnText is the way to go for precise formating. It doesn't matter if
> it's
> only one column.
>
> Paulo
> ----- Original Message -----
> From: "Nussbaum-Jones, Nina" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Tuesday, September 05, 2006 12:48 PM
> Subject: [iText-questions] Column text capabilities
>
>
>>I noticed a lot more references to using column text for document
>> structure. There seems to be a great deal more flexibility with it,
>> including the ability to do hanging indents. Is this the way to go for
>> more complicated formatting? I don't need multiple columns on a page,
>> but I need to generate a very specific document to match a pre-existing
>> word document template.
>>
>>
>>
>> Thanks!!
>>
>> -Nina-
>>
>>
>>
>>
>
>
> --------------------------------------------------------------------------------
>
>
>> -------------------------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
>
> --------------------------------------------------------------------------------
>
>
>> _______________________________________________
>> iText-questions mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
>
--
View this message in context:
http://www.nabble.com/Column-text-capabilities-tf2220363.html#a9521542
Sent from the iText - General mailing list archive at Nabble.com.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/