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, andOpacity. - ApplyStamp Method:
PdfDocument.ApplyStamp(stamper)applies the configured stamper to the loaded PDF and returns the modified document, which can then be saved withSaveAs. - 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.

