Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PdfPCell cell1 = null;
- cell1 = new PdfPCell(new Phrase(string.Format("{0}", c1), fn));
- cell1.Border = Rectangle.RIGHT_BORDER | Rectangle.LEFT_BORDER;
- PdfPTable ItemTable = new PdfPTable(7);
- ItemTable.TableEvent = new LineaBottom();
- public class LineaBottom : IPdfPTableEvent
- {
- #region IPdfPTableEvent Members
- void IPdfPTableEvent.TableLayout(PdfPTable table, float[][] widths, float[] heights, int headerRows, int rowStart, PdfContentByte[] canvases)
- {
- int columns;
- Rectangle rect;
- int footer = widths.Length - table.FooterRows;
- int header = table.HeaderRows - table.FooterRows + 1;
- int ultima = footer - 1;
- if (ultima != -1)
- {
- columns = widths[ultima].Length - 1;
- rect = new Rectangle(widths[ultima][0], heights[ultima], widths[footer - 1][columns], heights[ultima + 1]);
- rect.BorderColor = BaseColor.BLACK;
- rect.BorderWidth = 1;
- rect.Border = Rectangle.TOP_BORDER;
- canvases[PdfPTable.BASECANVAS].Rectangle(rect);
- }
- }
- #endregion
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement