Articles in this section
Category / Section

How to avoid extra blank pages in print and print preview?

6 mins read

The paper size that you specify for the report in the WPF Report Viewer will define the pagination for the report while printing and rendering report in the print layout. The extra blank page is created when the Body of your report is too wide for your page. If you want the report to appear on a single page, all the content within the report body must fit on the physical page and the body width should be lesser or equal to the following formula:

Body Width <= Page Width - (Left Margin + Right Margin)

For physical page renderers, the concept of Usable Area should be important to keep in mind. The area of the physical page that remains after the space is allocated for margins, column spacing, and page header and footer is called the usable page area. Margins are applied only when you render the report in the print layout and print reports. The following image indicates the margin and usable page area of a physical page.

Indicates margin and usable page area

The following formula is used to calculate the usable area of the report rendering:

Horizontal usable area:

X = Page.Width - (Left Margin + Right Margin + Column Spacing)

Vertical usable area:

Y = Page.Height - (Top Margin + Bottom Margin + Header Height + Footer Height)

Consider the report width is 21 cm, the left margin of the report is 0.5 cm, and the right margin of the report is 0.5 cm. To avoid an extra printed page in the exported PDF file, the following formula is used:

width of body (20) + left margin (0.5) + right margin (0.5) <= report width (21)

If the width of body is 20 or lesser, it will be rendered without extra pages. When it uses greater than 20, it will add extra pages.
 

Conclusion

I hope you enjoyed learning on how to avoid extra blank pages for print in WPF Report Viewer.

You can refer to our WPF Report Viewer feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. 

For current customers, you can check out our WinForms components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our WinForms Edit control and other WinForms components.

If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied