Stamping New Content
using IronPdf;
using IronPdf.Editing;

var stamper =
    new HtmlStamper("<img src='https://ironpdf.com/img/products/ironpdf-logo-text-dotnet.svg'/>")
    {
        HorizontalAlignment = HorizontalAlignment.Center,
        VerticalAlignment = VerticalAlignment.Bottom,
        IsStampBehindContent = false,
        Opacity = 30
    };

var pdf = PdfDocument.FromFile("Sample.pdf");

pdf.ApplyStamp(stamper).SaveAs("stamped_image.pdf");
NuGet Download
PM > Install-Package IronPdf
Stamping New Content

Stamping New Content

Developers may edit any PDF document by adding new content to a page using the HtmlStamper class together with the ApplyStamp method for PDF management.

Below is an example of how you can use the HtmlStamper class with IronPDF in C#:

Key Points:

  • HtmlStamper Class: Defines the HTML content to stamp along with positioning options such as HorizontalAlignment, VerticalAlignment, IsStampBehindContent, and Opacity.
  • ApplyStamp Method: PdfDocument.ApplyStamp(stamper) applies the configured stamper to the loaded PDF and returns the modified document, which can then be saved with SaveAs.
  • Functionality: The example loads an existing PDF with PdfDocument.FromFile, stamps the specified HTML content (here, an image) onto the page, and saves the result to a new PDF file.
Learn to Stamp Text & Images on PDFs with IronPDF
View on GitHub

Ready to Get Started?

Nuget Downloads 21,874,586Version:2026.10just released