title: Write text on existing table/Image using itextsharp
body: <p><img src="https://i.stack.imgur.com/ANVEe.png" alt="This is my pdf screenshot"></p>
  
  <p>There is an existing table/image. When I write text using pdfcontentbyte, it is written behind this table/image.</p>
  
  <p>I also want to write the text from the right side of this table/column.</p>
  
  <p>The code I'm currently using to produce the image above:</p>
  
  <pre><code> // open the reader
   PdfReader reader = new PdfReader(oldFile);
   iTextSharp.text.Rectangle size = reader.GetPageSizeWithRotation(1);
   Document document = new Document(size);
   // open the writer
   FileStream fs = new FileStream(newFile, FileMode.Create, FileAccess.Write);
   PdfWriter writer = PdfWriter.GetInstance(document, fs);
   document.Open();
   PdfContentByte cb = writer.DirectContent;
   BaseFont bf = BaseFont.CreateFont(BaseFont.COURIER_BOLD,BaseFont.CP1252, BaseFont.EMBEDDED);
   string text = "WV0501";
   cb.BeginText();
   // put the alignment and coordinates here
   cb.ShowTextAligned(2, text, 155, 655, 0);
   cb.EndText();
   // create the new page and add it to the pdf 
    PdfImportedPage page = writer.GetImportedPage(reader, 1);
    cb.AddTemplate(page, 0, 0);
  
   document.Close();
   fs.Close();
   writer.Close();
  </code></pre>