Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. PdfPCell cell1 = null;
  2. cell1 = new PdfPCell(new Phrase(string.Format("{0}", c1), fn));
  3. cell1.Border = Rectangle.RIGHT_BORDER | Rectangle.LEFT_BORDER;
  4.  
  5. PdfPTable ItemTable = new PdfPTable(7);
  6. ItemTable.TableEvent = new LineaBottom();
  7.  
  8. public class LineaBottom : IPdfPTableEvent
  9. {
  10.  
  11.  
  12. #region IPdfPTableEvent Members
  13.  
  14. void IPdfPTableEvent.TableLayout(PdfPTable table, float[][] widths, float[] heights, int headerRows, int rowStart, PdfContentByte[] canvases)
  15. {
  16. int columns;
  17. Rectangle rect;
  18. int footer = widths.Length - table.FooterRows;
  19. int header = table.HeaderRows - table.FooterRows + 1;
  20. int ultima = footer - 1;
  21. if (ultima != -1)
  22. {
  23. columns = widths[ultima].Length - 1;
  24. rect = new Rectangle(widths[ultima][0], heights[ultima], widths[footer - 1][columns], heights[ultima + 1]);
  25. rect.BorderColor = BaseColor.BLACK;
  26. rect.BorderWidth = 1;
  27. rect.Border = Rectangle.TOP_BORDER;
  28. canvases[PdfPTable.BASECANVAS].Rectangle(rect);
  29. }
  30. }
  31.  
  32. #endregion
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement