title: how to add the current page number and total number of pages in Itextsharp
body: <p>how  the current page number  and the total number of pages in the pdf file as 
  Page : 3/10 </p>
  
  <p>My code is as follows</p>
  
  <pre><code>        //PdfPTable saleTable = SaleTable();
          FileStream fileStream = new FileStream(Customer + "Invoice.pdf",
          FileMode.Create,
                                                 FileAccess.Write,
                                                 FileShare.None);
          Document doc = new Document(PageSize.A4);
  
          PdfWriter writer = PdfWriter.GetInstance(doc, fileStream);
          doc.Open();
  
          glue = new Chunk(new VerticalPositionMark());
          _phrase1.Add(new Chunk(glue));
          _phrase1.Add(new Chunk("Page Number: "));
  
          _para.Add(_phrase1);
           doc.Add(_para);
  </code></pre>