Adding HTML Content Efficiently

IronPDF.PdfDocument.ApplyMultipleStamps allows for developers to rapidly stamp multiple types of stamps onto one or more pages of a PDF. To learn more about this feature and other capabilities of IronPDF, visit the IronPDF Product Page for detailed information.

// Import IronPDF library
using IronPdf;

class PDFStampingExample
{
    static void Main(string[] args)
    {
        // Load an existing PDF document
        var pdf = PdfDocument.FromFile("example.pdf");

        // Define the stamp settings
        var watermarkText = "Confidential";

        // Create a TextStamp object with desired text and settings
        var textStamp = new TextStamp(watermarkText)
        {
            // Set the font size for the stamp text
            FontSize = 20,

            // Set the color for the stamp text
            Color = System.Drawing.Color.Red,

            // You can set additional properties such as position, opacity, rotation, etc.
            // Further customize the stamp based on requirements
        };

        // Apply the stamp to every page in the document
        pdf.ApplyStamp(textStamp, PdfDocument.StampPosition.Center);

        // Save the stamped PDF to a new file
        pdf.SaveAs("stamped_example.pdf");

        Console.WriteLine("Stamp applied successfully!");
    }
}
// Import IronPDF library
using IronPdf;

class PDFStampingExample
{
    static void Main(string[] args)
    {
        // Load an existing PDF document
        var pdf = PdfDocument.FromFile("example.pdf");

        // Define the stamp settings
        var watermarkText = "Confidential";

        // Create a TextStamp object with desired text and settings
        var textStamp = new TextStamp(watermarkText)
        {
            // Set the font size for the stamp text
            FontSize = 20,

            // Set the color for the stamp text
            Color = System.Drawing.Color.Red,

            // You can set additional properties such as position, opacity, rotation, etc.
            // Further customize the stamp based on requirements
        };

        // Apply the stamp to every page in the document
        pdf.ApplyStamp(textStamp, PdfDocument.StampPosition.Center);

        // Save the stamped PDF to a new file
        pdf.SaveAs("stamped_example.pdf");

        Console.WriteLine("Stamp applied successfully!");
    }
}
' Import IronPDF library
Imports IronPdf

Friend Class PDFStampingExample
	Shared Sub Main(ByVal args() As String)
		' Load an existing PDF document
		Dim pdf = PdfDocument.FromFile("example.pdf")

		' Define the stamp settings
		Dim watermarkText = "Confidential"

		' Create a TextStamp object with desired text and settings
		Dim textStamp As New TextStamp(watermarkText) With {
			.FontSize = 20,
			.Color = System.Drawing.Color.Red
		}

		' Apply the stamp to every page in the document
		pdf.ApplyStamp(textStamp, PdfDocument.StampPosition.Center)

		' Save the stamped PDF to a new file
		pdf.SaveAs("stamped_example.pdf")

		Console.WriteLine("Stamp applied successfully!")
	End Sub
End Class
$vbLabelText   $csharpLabel