

- #Add confidential watermark to pdf how to#
- #Add confidential watermark to pdf pdf#
- #Add confidential watermark to pdf pro#
- #Add confidential watermark to pdf download#
Acrobat, Acrobat DC, Acrobat Pro DC, Adobe Acrobat, Confidential, PDFs, Rubber Stamps, Stamps, Watermarks.
#Add confidential watermark to pdf pdf#
Close ( true ) //Defining the content type for PDF file string contentType = "application/pdf" //Define the file name string fileName = "Watermark.Mark It Confidential: Add a Watermark to Your PDF

Position = 0 //Close the document loadedDocument. ClientSize ) //Save the document into stream MemoryStream stream = new MemoryStream () loadedDocument.

DrawImage ( image, new PointF ( 0, 0 ), loadedPage. SetTransparency ( 0.25f ) //Draw the image graphics. Read ) PdfImage image = new PdfBitmap ( imageStream ) PdfGraphicsState state = graphics. Graphics //Load the image file as stream FileStream imageStream = new FileStream ( "Image.jpeg", FileMode. Pages //Create PDF graphics for the page PdfGraphics graphics = loadedPage. Read ) PdfLoadedDocument loadedDocument = new PdfLoadedDocument ( docStream ) //Get first page from document PdfPageBase loadedPage = loadedDocument. Load the PDF document FileStream docStream = new FileStream ( "Input.pdf", FileMode. return File ( stream, contentType, fileName ) string fileName = "Watermark.pdf" //Creates a FileContentResult object by using the file contents, content type, and file name. string contentType = "application/pdf" //Define the file name. Close ( true ) //Defining the content type for PDF file. MemoryStream stream = new MemoryStream () pdfDocument. ClientSize ) //Save the document into stream. DrawImage ( image, new PointF ( 0, 0 ), pdfPage. SetTransparency ( 0.25f ) //Draw the image. PdfImage image = new PdfBitmap ( imageStream ) PdfGraphicsState state = graphics. FileStream imageStream = new FileStream ( "Image.jpeg", FileMode. Add () //Create PDF graphics for the page. PdfDocument pdfDocument = new PdfDocument () //Add a page to the PDF document. The transparency can be applied to the text or images using SetTransparency method and rotation can be applied using RotateTransform method.
#Add confidential watermark to pdf how to#
The below code sample illustrates how to add image watermark in PDF document, using DrawImage method of PdfGraphics class. The following screenshot shows the output of adding text watermark to an existing PDF document.
#Add confidential watermark to pdf download#
You can download a complete working sample from GitHub. Red, New PointF ( - 150, 450 )) 'Save and close the document. DrawString ( "Imported using Essential PDF", font, PdfPens.

Dim state As PdfGraphicsState = graphics. Dim font As PdfFont = New PdfStandardFont ( PdfFontFamily. Dim graphics As PdfGraphics = loadedPage. Pages ( 0 ) 'Create PDF graphics for the page. Dim loadedPage As PdfPageBase = loadedDocument. Dim loadedDocument As New PdfLoadedDocument ( fileName ) 'Get first page from document. MemoryStream stream = new MemoryStream () loadedDocument. Red, new PointF (- 150, //Save the document into stream. PdfFont font = new PdfStandardFont ( PdfFontFamily. Pages //Create PDF graphics for the page. Read ) PdfLoadedDocument loadedDocument = new PdfLoadedDocument ( docStream ) //Get first page from document. FileStream docStream = new FileStream ( "Input.pdf", FileMode. Red, new PointF (- 150, 450 )) //Save the document into stream.
