The best solution I could find was to use a PdfPTable: (this is C#, but
you can get the idea)
PdfPTable t = new PdfPTable(1);
t.HorizontalAlignment = Element.ALIGN_CENTER;
t.WidthPercentage = 100f; // this would be the 100 from
setHorizontalLine
t.SpacingAfter = 5f;
t.SpacingBefore = 0f;
t.DefaultCell.UseVariableBorders = true;
t.DefaultCell.VerticalAlignment = Element.ALIGN_MIDDLE;
t.DefaultCell.HorizontalAlignment = Element.ALIGN_CENTER;
t.DefaultCell.Border = Image.BOTTOM_BORDER; // This generates the line
t.DefaultCell.BorderWidth = 1f; // this would be the 1 from
setHorizontalLine
t.DefaultCell.Padding = 0;
t.AddCell("");
Hope that helps.
- Mitch
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jason Pettiss
Sent: Tuesday, April 17, 2007 4:24 PM
To: [email protected]
Subject: [iText-questions] Graphic / Horizontal line
Our iText library was just upgraded, out of our control. We used to do
this to get a horizontal rule (quite a lot in fact):
Graphic hr = new Graphic();
hr.setHorizontalLine(1, 100);
document.add(hr);
Now none of our code builds-- what happened to Graphic, and what is the
equivalent replacement code for the above?
Thanks,
--jason
------------------------------------------------------------------------
-
This SF.net email is sponsored by DB2 Express Download DB2 Express C -
the FREE version of DB2 express and take control of your XML. No limits.
Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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/
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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/