Click here to Skip to main content
12,298,267 members (51,056 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server
how we set paper size in printdocument? I want to print my webpage in small size like (200 X 200).Please Reply
Posted 25-Sep-12 0:08am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

PrintDocument pd = new PrintDocument();
pd.DefaultPageSettings.PaperSize = pd.PrinterSettings.PaperSizes(200,200);

Hope this helps...

Enjoy Coding...
Member 10445097 1-Mar-14 9:17am
i used this line of code its says that "Non-invocable member 'System.Drawing.Printing.PrinterSettings.PaperSizes' cannot be used like a method.
jinesh sam 5-Nov-14 15:46pm
Me to getting the same Error 14 Non-invocable member 'System.Drawing.Printing.PrinterSettings.PaperSizes' cannot be used like a method.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160525.2 | Last Updated 25 Sep 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100