Exporting to PDF
Thank you for using Syncfusion products.
Our GGC to pdf export supports child exporting. However it has limitation, the child grid width has been limited to parent grid width in the pdf page. Please refer to the attached pdf. By default, the page exports in the landscape only. We have already logged a feature report for this.
Sample:
http://www.syncfusion.com/downloads/support/forum/121015/ze/Sample(4)481698749
Thanks,
AL.Solai.
Thank you for your update.
Please refer the below sample containing parent-child table and code example for reference. Please let us know if you have any concerns.
Code Example :
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.
Please ignore our previous update.
Please refer the below dashboard sample containing parent-child table loaded from Exapand.xml file and code example for reference. Please let us know if you have any concerns.
Code Example :
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.
Thank for your update.
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.
- 8 Replies
- 4 Participants
-
BM Bertuzzi Mario
- Nov 3, 2015 09:56 AM UTC
- Jun 21, 2016 01:36 PM UTC