public static void AddTableNoSplit(Document document, ICustomPageEvent pgEvent, PdfPTable table) { int goStatus = 0; float pos = 0; ColumnText ct = pgEvent.GetColumnObject(); pos = ct.YLine; ct.AddElement(table); goStatus = ct.Go(true); if (ColumnText.HasMoreText(goStatus)) { document.NewPage(); ct = pgEvent.GetColumnObject(); ct.AddElement(table); ct.Go(false); } else { ct.AddElement(table); ct.YLine = pos; ct.Go(false); } }
public static void AddTableNoSplit(Document document, ICustomPageEvent pgEvent, PdfPTable table) { int goStatus = 0; float pos = 0; ColumnText ct = pgEvent.GetColumnObject(); pos = ct.YLine; ct.AddElement(table); goStatus = ct.Go(true); if (ColumnText.HasMoreText(goStatus)) { document.NewPage(); ct = pgEvent.GetColumnObject(); ct.AddElement(table); ct.Go(false); } else { ct.AddElement(table); ct.YLine = pos; ct.Go(false); } }