Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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);
            }
        }