

Redact () // Creating the stream object MemoryStream stream = new MemoryStream () //Save the documents document. AddRedaction ( redaction ) //Redact the contents from the PDF document document. DrawImage ( image, new RectangleF ( 0, 0, 182, 157 )) // Add a redaction object into the redaction collection of loaded page page. Pages as PdfLoadedPage //Create a PDF redaction for the page PdfRedaction redaction = new PdfRedaction ( new RectangleF ( 63, 57, 182, 157 )) //Draw the image on the redacted bounds PdfImage image = new PdfBitmap ( "Image.png" ) redaction. Read ) PdfLoadedDocument document = new PdfLoadedDocument ( docStream ) //Get the first page from the document PdfLoadedPage page = document. Load the existing PDF document FileStream docStream = new FileStream (, FileMode. Close ( true ) //Defining the ContentType for pdf file string contentType = "application/pdf" //Define the file name string fileName = "output.pdf" //Creates a FileContentResult object by using the file contents, content type, and file name return File ( stream, contentType, fileName ) Save ( stream ) //close the documents document.

Red, new PointF ( 5, 5 )) // Add a redaction object into the redaction collection of loaded page page. DrawString ( "Redacted", font, PdfBrushes. Courier, 10 ) //Draw text on the redacted area redaction. Black ) //Font for the overlay text PdfStandardFont font = new PdfStandardFont ( PdfFontFamily. Pages as PdfLoadedPage // Create a redaction object PdfRedaction redaction = new PdfRedaction ( new RectangleF ( 343, 167, 100, 25 ), Color.


Pages as PdfLoadedPage // Create a redaction object PdfRedaction redaction = new PdfRedaction ( new RectangleF ( 343, 147, 60, 17 )) // Add a redaction object into the redaction collection of loaded page page.
