Thank you for your interest in Essential PDF. It is very simple to insert a data table into a pdf document that span for multiple pages using Essential PDF. The ITable interface is needed for importing a table from a database to a PDF document. The method ConfigureTable and Publish method is called for importing and publishing the table into the pdf page. PageBreakBehavior property is used to make table span for multiple columns.
Steps in inserting ADO.Net DataTable:
1) Creating a table
// Creating a table.
ITable table = pdfDoc.CreateTable();
2) Get the Datatable to be inserted from the database
// Getting the table to a dataset.
DataSet dataSet11 = new DataSet();
// Getting Xml file.
dataSet11.ReadXml("customers.xml");
dsNorthWind =dataSet11;
3) Set the PageBreakBehaviour property of the created table to span in multiple pages.
//To make the Table span over multiple pages without getting cut.
table.PageBreakBehavior = AutoBreakBehavior.FullBreak;
4) Assigning dataset to the created table
// Assigning the dataset to the created table.
table.DataMember = dsNorthWind.Tables[0].TableName;
table.DataSource = dsNorthWind;
// Configuring the table.
table.ConfigureTable( dsNorthWind.Tables[0] );
5) Publish table.
// Publish the table.
table.Publish( new PointF( 0, 0 ),pdfDoc.Pages[0]);
Please take a look at the sample and let me know if you need any further assistance.
Thanks, Ajish.Thank you for your interest in Essential PDF. It is very simple to insert a data table into a pdf document that span for multiple pages using Essential PDF. The ITable interface is needed for importing a table from a database to a PDF document. The method ConfigureTable and Publish method is called for importing and publishing the table into the pdf page. PageBreakBehavior property is used to make table span for multiple columns. >
>Steps in inserting ADO.Net DataTable: >
>1) Creating a table
>
>
>// Creating a table.
>ITable table = pdfDoc.CreateTable();
>
>
>2) Get the Datatable to be inserted from the database
>
>
>// Getting the table to a dataset.
>DataSet dataSet11 = new DataSet();
>
>
>// Getting Xml file.
>dataSet11.ReadXml("customers.xml");
>dsNorthWind =dataSet11;
>
>
>3) Set the PageBreakBehaviour property of the created table to span in multiple pages.
>
>
>//To make the Table span over multiple pages without getting cut.
>table.PageBreakBehavior = AutoBreakBehavior.FullBreak;
>
>
>4) Assigning dataset to the created table
>
>
>// Assigning the dataset to the created table.
>table.DataMember = dsNorthWind.Tables[0].TableName;
>table.DataSource = dsNorthWind;
>
>// Configuring the table.
>table.ConfigureTable( dsNorthWind.Tables[0] );
>
>
>5) Publish table.
>
>
>// Publish the table.
>table.Publish( new PointF( 0, 0 ),pdfDoc.Pages[0]);
>
>
Please take a look at the sample and let me know if you need any further assistance.
> > >Thanks, >Ajish. >