Example #1
0
        public static void AddTable2(DataTable dt)
        {
            PdfDocument document = new PdfDocument();

            using (PdfDocumentBuilder builder = new PdfDocumentBuilder(document))
            {
                Table table = CreateSimpleTable(dt);
                table.LayoutType = Editing.Flow.TableLayoutType.FixedWidth;
                builder.InsertTable(table);

                table            = CreateTableFrame();
                table.LayoutType = Editing.Flow.TableLayoutType.FixedWidth;
                builder.InsertTable(table);
            }

            PdfFile pdfFile = new PdfFile();

            File.WriteAllBytes("AddTable2.pdf", pdfFile.Export(document));
        }