I'm printing a document thru the printdocument. But the problem is that after the page is printed paper goes up to the default page height ie; 11 inches.
I've done the following coding. still the problem persists. Can u suggest me a way out.
Dim pkCustomSize1 AsNew System.Drawing.Printing.PaperSize("Custom Paper Size", 800, 600)
'paper size required is 8 inches width & 6 inches height
PrintDocument1.PrinterSettings.DefaultPageSettings.PaperSize = pkCustomSize1
Welcome to MSDN forums!
Here are two suggestions for you to try:
1. Firstly open Control Panel -> "Printer and Fax", manually add a custom paper type: "Custom Paper Size" with 8in * 6 in
Then code sample:
|ForEach psize As PaperSize In PrintDocument1.PrinterSettings.PaperSizes |
|Ifpsize.PaperName="Custom Paper Size"Then|
2. There is one extender print control named FormPrintHelperComponent for you to set page size, paper margin and paper orientation, which makes printing a form quick, easy, and flexible.
Check this document for detail: http://www.codeproject.com/KB/printing/MCLFormPrintControl.aspx