Maybe I'm missing something but I can't print a legal size document with legal paper. It always prints on letter size page. Here is the code I'm using:
Dim ctl As Spire.PdfViewer.Forms.PdfDocumentViewer = TryCast(uxViewerPageView.SelectedPage.Controls(0), Spire.PdfViewer.Forms.PdfDocumentViewer)
Dim prtSettings As New PrinterSettings
prtSettings.Copies = 1
prtSettings.DefaultPageSettings.PaperSize = ctl.PrintSettings.PaperSize
prtSettings.FromPage = 1
prtSettings.MaximumPage = ctl.PageCount
prtSettings.MinimumPage = 1
prtSettings.ToPage = ctl.PageCount
Dim pSettings As PrinterSettings = HelperFunctions.ShowPrinterDialog(Me, prtSettings, False)
If pSettings IsNot Nothing Then
ctl.PrintSettings.PrinterName = pSettings.PrinterName
ctl.PrintSettings.DocumentName = uxViewerPageView.SelectedPage.Text
ctl.PrintSettings.Collate = pSettings.Collate
ctl.PrintSettings.Copies = pSettings.Copies
ctl.PrintSettings.Duplex = pSettings.Duplex
ctl.PrintSettings.PaperSize = pSettings.DefaultPageSettings.PaperSize
'ctl.PrintSettings.PrintController = New Printing.StandardPrintController 'This will hide printing dialog
Select Case pSettings.PrintRange
Case PrintRange.AllPages
ctl.PrintDoc()
Case PrintRange.CurrentPage
ctl.PrintSettings.SelectPageRange(ctl.CurrentPageNumber, ctl.CurrentPageNumber)
ctl.PrintDoc()
Case PrintRange.SomePages
ctl.PrintSettings.SelectPageRange(pSettings.FromPage, pSettings.ToPage)
ctl.PrintDoc()
End Select
End If