Itextsharp 7 - Scaled and Centered Image as watermark
I started using itextsharp 7 a few days ago, i used to work with itextsharp 5 for years . I don't manage to add a scaled image at the center of the page as watermark with itext7. My code with itextsharp 5 : using (PdfStamper pdfStamper = new PdfStamper(pdfReader, memoryStream)) { for (int pageIndex = 1; pageIndex <= pdfReader.NumberOfPages; pageIndex++) { pdfStamper.FormFlattening = false; iTextSharp.text.Rectangle pageRectangle = pdfReader.GetPageSizeWithRotation(pageIndex); PdfContentByte pdfData = pdfStamper.GetOverContent(pageIndex); PdfGState graphicsState = new PdfGState(); graphicsState