title: itext7 c# adding image as a header overlaps text
body: <p>I am new to iText7, and using the Java examples, I am able to convert HTML to a pdf, and to add a header and footer. The problem is when I create a header which is an image, the text on the page overlaps it. Can you help me figure out how to get the text on the page to appear <em>under</em> the header? Thank you so much! Here is my ImageHeader class:</p>
  
  <pre><code>class ImageHeader: IEventHandler  {
  
  String imagePath ;//{ get; set; }
  
  public ImageHeader(String imagePath) {
      this.imagePath=imagePath;
  }    
  
  //public void HandleEvent(Event event) {
  public void HandleEvent(Event the_event) {
  
      // Retrieve document and
      PdfDocumentEvent docEvent = (PdfDocumentEvent)the_event;
      PdfDocument pdf = docEvent.GetDocument();
      PdfPage page = docEvent.GetPage();
      Rectangle pageSize = page.GetPageSize();
      PdfCanvas pdfCanvas = new PdfCanvas(page.GetLastContentStream(), page.GetResources(), pdf);   
  
  
      ImageData image=ImageDataFactory.Create(imagePath);
  
      pdfCanvas.AddImage(image,(pageSize.GetWidth() / 2) - (image.GetWidth()/2), (pageSize.GetTop() - 100), true);
  
  
  }
  </code></pre>
  
  <p>}</p>