title: Mix landscape and portrait printing in wpf / c#
body: <p>In a WPF / C# app, I'm printing some pages by using DocumentPaginator.
  However, I want to mix in 1 printjob pages in Landscape and Portrait mode:
  e.g., Page 1 in Portrait, Page 2 in Landscape and Page 3 in Portrait.</p>
  
  <p>However, if I change the PageSize (override from DocumentPaginator) to reflect the landscape, the Page remains in portrait mode.</p>
  
  <p>In other words in</p>
  
  <pre><code>public class PrintPaginator : DocumentPaginator
      {
          public override Size PageSize { get; set; }
          public override DocumentPage GetPage(int pageNumber)
          {
              // size values
              Size theSizeOfThePage;
              // make size orientation correct
              if (pageNumber == 2)
              {
                  // landscape: width is larger then height
                  theSizeOfThePage = new Size(Math.Max(PageSize.Width, PageSize.Height), Math.Min(PageSize.Width, PageSize.Height));
              }
              else
              {
                  // portrait: height is larger then width
                  theSizeOfThePage = new Size(Math.Min(PageSize.Width, PageSize.Height), Math.Max(PageSize.Width, PageSize.Height));
              }
              PageSize = theSizeOfThePage;
  
              // set the grid as the page to print
              thePage = new Grid();
              thePage.Width = PageSize.Width;
              thePage.Height = PageSize.Height;
  
              [...]
  
              // return a documentpage wrapping the grid
              return new DocumentPage(thePage);
          }
  </code></pre>
  
  <p>I belief I can't set the Orientation or PageSize to Landscape earlier as this depends of the pagenumber that is being printed...</p>
  
  <p>Any ideas, suggestions, workarrounds to mix portrait and landscape in 1 printjob?</p>
  
  <p>Thanks!
  R.</p>