title: MigraDoc: Centering a watermark on both landscape and portrait pages
body: <p>I'm looking to add a watermark on all my pages and center it as well.  This is pretty simple to at least 'eyeball' with just a portrait set of pages, but have both portrait and landscape pages in this document.</p>
  
  <p>My researach indicates that it can be done with these elements:</p>
  
  <pre><code>myImage.RelativeVertical = MigraDoc.DocumentObjectModel.Shapes.RelativeVertical.Line;
  myImage.RelativeHorizontal = MigraDoc.DocumentObjectModel.Shapes.RelativeHorizontal.Margin;
  </code></pre>
  
  <p>But I'm not sure how to leverage them to do what I want.  My current code looks like so (repeated for even pages):</p>
  
  <pre><code>    var myImage = section.Headers.Primary.AddImage("C:\myImage.png");
  
      myImage.Height = "4.5cm";
      myImage.LockAspectRatio = true;
      myImage.Top = "2.0cm";
      myImage.Left = "1.5cm";
  </code></pre>
  
  <p>Which is not a centered picture, of course, but I'm hoping to modify this to do what I want it to do.</p>