title: using iTextSharp.ShowTextAligned() to add watermark
body: <p>We want to add a water mark with user email &amp; name on top of our pdf before we send it. I've written code that does that and it is working great. I want to check if this is the best way of doing this. We want the water mark to be split into two lines at the top of the pdf.</p>
  
  <p>, I used "ShowTextAligned()" twice with different "y" coordinates to achieve that.</p>
  
  <pre><code>    private MemoryStream StampPdf(string pdfPath, string name, string email)
      {
          var memoryStream = new MemoryStream();
          var reader = new PdfReader(pdfPath);
          var pageCount = reader.NumberOfPages;
          var stamper = new PdfStamper(reader, memoryStream);
  
          var textAngle = 0;
          var fontSize = 14;
          var font = BaseFont.CreateFont(BaseFont.TIMES_ROMAN, BaseFont.WINANSI, BaseFont.EMBEDDED);
  
          var watermarkLine1 = "Personal use only for " + name;
          var watermarkLine2 = "at " + email;
  
  
          using (stamper)
          {
              for (var i = 1; i &lt;= pageCount; i++)
              {
                  var mediaBox = reader.GetPageSize(i);
                  var overContent = stamper.GetOverContent(i);
                  overContent.BeginText();
                  overContent.SetColorFill(BaseColor.RED);
                  overContent.SetFontAndSize(font, fontSize);
                  overContent.ShowTextAligned(PdfContentByte.ALIGN_LEFT, watermarkLine1, 10, mediaBox.Top - 20, textAngle);
                  overContent.ShowTextAligned(PdfContentByte.ALIGN_LEFT, watermarkLine2, 10, mediaBox.Top - 40, textAngle);
                  overContent.EndText();
              }
          }
          reader.Close();
          stamper.Close();
          return memoryStream;
      }
  </code></pre>
  
  <p>I want to confirm two things:</p>
  
  <ol>
  <li><p>"Is it possible to use ShowTextAligned() to wrap text that reaches the end of the line?"</p></li>
  <li><p>"Does ShowTextAligned() honor carriage return/newline?"</p></li>
  </ol>
  
  <p>Thanks,</p>
  
  <p>-Samah</p>