We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Edit to papersize for print


I would like to choose the paper size when I want to print a word document.

My attempt the field below:

Dim awPrintDoc As New Rendering.AsposeWordsPrintDocument(docWord)
awPrintDoc.DefaultPageSettings.PaperSize = New System.Drawing.Printing.PaperSize(“Custom Paper Size”, 62, 87)
awPrintDoc.DefaultPageSettings.Margins = New System.Drawing.Printing.Margins(3, 3, 3, 3)
awPrintDoc.PrinterSettings.PrinterName = _nom_imprimante
awPrintDoc.PrinterSettings.MinimumPage = 1
awPrintDoc.PrinterSettings.MaximumPage = 1
awPrintDoc.PrinterSettings.FromPage = 1
awPrintDoc.PrinterSettings.ToPage = 1

thank you for your help

Hi Thurial,

Thanks for your inquiry. I think, it would be enough to specify custom paper size in PageSetup of each Section in your document. You can use PageWidth and PageHeight properties to achieve this:

I hope, this helps.

Best regards,