Posted 1 May 2018, 7:14 am EST
Hi
How can I save a c1Report into a PDF file by code (c#).
best regards
Peter
Forums Home / ComponentOne / WinForms Edition
Posted by: gessi on 1 May 2018, 7:14 am EST
Posted 1 May 2018, 7:14 am EST
Hi
How can I save a c1Report into a PDF file by code (c#).
best regards
Peter
Posted 2 May 2018, 12:46 am EST
Hello Peter,
You can export a C1Report to PDF using the PdfExporter instance, as follows:
C1.C1Preview.Export.PdfExporter pdfExp = new C1.C1Preview.Export.PdfExporter();
pdfExp.Document = c1r;
pdfExp.ShowOptions = false;
pdfExp.Export(Application.StartupPath+"/newdoc.pdf");
The documentation link for the same is:
http://help.grapecity.com/componentone/NetHelp/c1report/webframe.html#C1.C1Report.4~C1.C1Preview.Export.PdfExporter.html
A sample implementing the same has been attached for your reference.
Best Regards,
Esha