title: Changing from Portrait to Landscape PrintDocument/PrintPreview
body: <p>I've been reading reams of documentation about PrintPreviewDialog, PrintPreviewControl and PrintDocument. Everything says that I have to put the Portrait/Lanscape bit into the PrintDocument QueryPageSettings Event, then the PrintPreviewDialog will get the settings from the PrintDocument.</p>
  
  <p>I started off with:</p>
  
  <pre><code>    Private Sub PrintDocument1_QueryPageSettings(ByVal sender As Object, ByVal e As System.Drawing.Printing.QueryPageSettingsEventArgs) Handles PrintDocument1.QueryPageSettings
      Select Case mOrientation
          Case ePrinterOrientation.Landscape
              PrintDocument1.DefaultPageSettings.Landscape = True
          Case ePrinterOrientation.Portrait
              PrintDocument1.DefaultPageSettings.Landscape = False
      End Select
  End Sub
  </code></pre>
  
  <p>Here's my current code</p>
  
  <pre><code>   Private Sub PrintDocument1_QueryPageSettings(ByVal sender As Object, ByVal e As System.Drawing.Printing.QueryPageSettingsEventArgs) Handles PrintDocument1.QueryPageSettings
      Select Case mOrientation
          Case ePrinterOrientation.Landscape
              Dim ps As New PaperSize("A4Landscape", 1169, 827)
              ps.PaperName = PaperKind.A4
              PrintDocument1.DefaultPageSettings.PaperSize = ps
              PrintDocument1.DefaultPageSettings.Landscape = True
          Case ePrinterOrientation.Portrait
              Dim ps As New PaperSize("A4Portrait", 827, 1169)
              ps.PaperName = PaperKind.A4
              PrintDocument1.DefaultPageSettings.PaperSize = ps
              PrintDocument1.DefaultPageSettings.Landscape = False
      End Select
  End Sub
  </code></pre>
  
  <p>I also tried putting this code into the PrintDocument1_BeginPrint event, this did change the "Window" of the PrintPreview, but the contents of the PrintDocument still stayed Portrait (the width of the used "view", remain the same).</p>
  
  <p>The Portrait mode spans the 10 columns over 2 pages, the Landscape mode should have all the columns on 1 page, but this is not the case, the "PrintableArea" margins appear to remain exactly the same in reality, even if the numbers change to the correct values if I step through debug.</p>
  
  <p>I'm getting truely p****d off with this, this 3-way dependency, it should be simpler than this.</p>
  
  <p>Edit:</p>
  
  <p>Further to this problem. If I PRINT the document, the orientation is set to Landscape, but the Print Margins (the Document) is still printed (with overflow) as though the margins are Portrait.</p>
  
  <p>I REALLY need to fix this. It is NOT acceptable.</p>