title: How to adjust the paper size in vb.net
body: <p>i have the following code to print the page, i want to add custom page size how do i do that?</p>
  
  <pre><code>Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
  
      PrintDialog1.AllowSomePages = True
      PrintDialog1.ShowHelp = True
      PrintDialog1.Document = docToPrint
      Dim result As DialogResult = PrintDialog1.ShowDialog()
      If (result = DialogResult.OK) Then
          docToPrint.Print()
      End If
  
  End Sub
  </code></pre>