Works correctly with the following code:

Document document = new Document(PageSize.A4);
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("c:\\test3.pdf"));
document.open();
PdfContentByte cb = writer.getDirectContent();
ArrayList arr = HTMLWorker.parseToList(new FileReader("c:\\origem.html"), null);

ColumnText ct = new ColumnText(cb);
ct.setSimpleColumn(20,20,PageSize.A4.width()-20, PageSize.A4.height()-20);
for (int k = 0; k < arr.size(); ++k)
   ct.addElement((Element)arr.get(k));
int s = 0;
do {
   ct.setYLine(PageSize.A4.height()-20);
   s = ct.go();
   document.newPage();
} while((s & ColumnText.NO_MORE_COLUMN) != 0);
document.close();

I attach the result.

Paulo
----- Original Message ----- From: <[EMAIL PROTECTED]> To: "Post all your questions about iText here" <[email protected]>
Sent: Tuesday, March 20, 2007 2:01 PM
Subject: Re: [iText-questions] please HTMLWorker


I'm attach the result pdf and the html.

There're  text outside the cell. I'm try to understand the htmlworker
where 'write' the paragrah inside the inccell but i didn't see.

Why my text go out of the context of the table? Any help?

thanks in advance!

Daniela




--------------------------------------------------------------------------------


-------------------------------------------------------------------------
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/

Attachment: test3.pdf
Description: Adobe PDF document

-------------------------------------------------------------------------
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/

Reply via email to