Articles in this section

How to draw a PdfLightTable within a fixed boundary?

You can draw the PdfLightTable within a fixed boundary by using the Draw(PdfPage, RectangleF) method. The following code example and sample demonstrate the same.

C#

            // Creating an instance for the PDF document.
            PdfDocument document = new PdfDocument();
            // Adding a new page.
            PdfPage page = document.Pages.Add();
            // Initializing PdfLightTable.
            PdfLightTable pdfLightTable = new PdfLightTable();
            // Loading the data source into PdfLightTable.
            pdfLightTable.DataSource = GetProductsDataSet();
            // Drawing the PdfLightTable within a fixed boundary.
            pdfLightTable.Draw(page, new RectangleF(100, 100, 300, 400));
            // Save and close the document.
            document.Save("Sample.pdf");
            document.Close(true);

Sample link:

http://www.syncfusion.com/downloads/support/directtrac/general/PdfLightTable1293312947.zip

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied