Esempio n. 1
0
        private void DisplayNotes(string title, int nrows, float width, float x, float y)
        {
            var t = new PdfPTable(1);

            t.TotalWidth  = width * cm2pts;
            t.LockedWidth = true;
            t.DefaultCell.MinimumHeight     = 1f * cm2pts;
            t.DefaultCell.VerticalAlignment = PdfPCell.ALIGN_MIDDLE;

            t.AddPlainRow(title, bfont);
            for (int r = 0; r < nrows; r++)
            {
                t.AddCell("");
            }
            t.WriteSelectedRows(0, -1, x * cm2pts, y * cm2pts, dc);
        }
Esempio n. 2
0
        private void DisplayTable(string title, float width, float x, float y, List <string> reasons)
        {
            var t = new PdfPTable(new float[] { 1.3f, width - 1.3f });

            t.TotalWidth = width * cm2pts;
            t.SetNoBorder();
            t.LockedWidth = true;
            t.DefaultCell.MinimumHeight     = 1f * cm2pts;
            t.DefaultCell.VerticalAlignment = PdfPCell.ALIGN_MIDDLE;

            t.AddPlainRow(title, bfont);
            foreach (var r in reasons)
            {
                t.AddRight("_____", font);
                t.Add(r, font);
            }
            t.WriteSelectedRows(0, -1, x * cm2pts, y * cm2pts, dc);
        }