We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback
Platform : WPF
Category : Printing

How do I print a form?

Unfortunately, there is no easy way to print a form. You may implement this function with the steps given below.

1. Add a print function to your application.

To do this, you should add a PrintDocument component to your application. Please drag a PrintDocument from the toolbox to your form. After that, you should create a PrintDialog and add the code to print the document.

2. Draw the form when printing.

This step is a little complex. You should handle the PrintPage of the printDocument1 and draw the form to the printer device. In the event you may copy the form to an image and then draw it to the printer device.

3. Declare the API function.

Please note the BitBlt function used in Step 2. It is an unmanaged function. You should use "DllImport" attribute to import it to your code. Although, this is the Step 3, you may perform this step anytime.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon