This sample demonstrates the export of content from griddataboundgrid to a PDF file.It also illustrates support for headers and footers.
Below is an image of a pdf export.
Pdf Export
Features
This implementation allows multiple options to have modifications on a PDF file according to its features such as adding headers and footers for all the pages.
Interactive Features
PDF libraries are used to support the conversion of grid content to a PDF page.
Dependent assemblies are Syncfusion.Pdf.Base and Syncfusion.GridHelperClasses.Windows.
GridPDFConverter converter = new GridPDFConverter(true,true);
converter.ExportToPdf("Sample.pdf", gridDataBoundGrid1);
//Header Event to create an header that will displays on each page
converter.DrawPDFFooter += new GridPDFConverter.DrawPDFHeaderFooterEventHandler(converter_DrawPDFFooter);
//Footer Event to create an footer that will displays on each page
converter.DrawPDFHeader += new GridPDFConverter.DrawPDFHeaderFooterEventHandler(converter_DrawPDFHeader);
Below is a sample image of the exported file.
Pdf Export