Print as A4

2 posts, 0 answers
  1. Love
    Love avatar
    2 posts
    Member since:
    Jun 2016

    Posted 07 Jun 2016 Link to this post

    How can I change page type to A4 programmatically before printing?
  2. Hristo
    Admin
    Hristo avatar
    837 posts

    Posted 09 Jun 2016 Link to this post

    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.
Back to Top