BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
private void button1_Click(object sender, EventArgs e)
{
GridPDFConverter pdfConvertor = new GridPDFConverter();
pdfConvertor.ShowHeader = true;
pdfConvertor.Margins.All = 25;
pdfConvertor.ExportToPdf("Sample.pdf", this.groupingGrid1.TableControl);
//Launching the PDF file using the default Application.[Acrobat Reader]
System.Diagnostics.Process.Start("Sample.pdf");
}
Sample :
http://www.syncfusion.com/downloads/support/forum/121015/ze/CS-875020642
Thanks,
AL.Solai.
private void button1_Click(object sender, EventArgs e)
{
GridPDFConverter pdfConvertor = new GridPDFConverter();
pdfConvertor.ShowHeader = true;
pdfConvertor.Margins.All = 25;
pdfConvertor.ExportToPdf("Sample.pdf", this.groupingGrid1.TableControl);
//Launching the PDF file using the default Application.[Acrobat Reader]
System.Diagnostics.Process.Start("Sample.pdf");
}
Sample:
http://www.syncfusion.com/downloads/support/forum/121015/ze/CS-1748253704
Thanks,
AL.Solai.
Please find the attachment, the landscape is getting applied properly to the document. Since, the size of grid is more that the bounds of the file, it gets paginated(i.e., the extra part moves to the next page). If you check using a small grid, you can check the orientation clearly. Anyways, if you want to change the orientation, please use the below code.
Code Example :
Method1:
GridPDFConverter pdfConvertor = new GridPDFConverter();
PdfDocument pdfdoc = new PdfDocument();
PdfLayoutFormat format = new PdfLayoutFormat();
format.Layout = PdfLayoutType.OnePage;
pdfdoc.PageSettings.Orientation = PdfPageOrientation.Landscape;
pdfConvertor.ExportToPdf(pdfdoc, this.groupingGrid1.TableControl);
Method2 :
pdfConvertor.Exporting += new GridPDFConverter.PDFExportingEventHandler(pdfConvertor_Exporting);
void pdfConvertor_Exporting(object sender, PDFExportingEventArgs e)
{
e.PdfDocument.PageSettings.Orientation = PdfPageOrientation.Landscape;
}
Exported file :
http://www.syncfusion.com/downloads/support/forum/121015/ze/Sample1-1904972378
Thanks,
AL.Solai.