How can I change page type to A4 programmatically before printing?
1 Answer, 1 is accepted
0
Hristo
Telerik team
answered on 09 Jun 2016, 02:40 PM
Hello Love,
Thank you for writing.
You can create a RadPrintDocument object and set its PaperSize property. Please check my code snippet below:
private void PrintGrid()
{
RadPrintDocument doc = new RadPrintDocument();
doc.PaperSize = new System.Drawing.Printing.PaperSize("A4", 210, 297);
doc.AssociatedObject = this.radGridView1;
doc.Print();
}
Additional information is available here: TPF | Printing.
I hope this helps. Should you have further questions please do not hesitate to write back.
Regards,
Hristo Merdjanov
Telerik
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms. For more information check out this blog post and share your thoughts.