I am using the following custom method in my code to draw a line at any
position I want.
private void drawLine(float x,float y,float length,PdfContentByte cb){
cb.setLineWidth(1);
cb.moveTo(x,y);
cb.lineTo(length,y);
cb.stroke();
}
Since I see you are using a PdfPTable you can use its writeSelectedRows to
get the current Y and pass it to the above method, along with the x
position, the length of the line and the PdfContentByte of your document.
2007/2/22, Bruno Lowagie (iText) <[EMAIL PROTECTED]>:
dev wrote:
> Hi!
>
> I would like to insert a horizontal line between elements. Like this:
>
> aDocument.add(aPdfPTable);
> // add horizontal line here
> aDocument.add(anotherPdfPTable);
>
> How do I do this? Any help appreciated, thanks!
There are too many answers to this question.
You could use table events to draw a line under the table.
You could get the Y position from PdfWriter and draw
the line to the direct content.
...
br,
Bruno
-------------------------------------------------------------------------
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/
-------------------------------------------------------------------------
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/