IRONSOFTWAREHOME
Efektywne dodawanie treści HTML
using IronPdf;
using IronPdf.Editing;
using System;

// Use HtmlStamper to stamp Html onto pdf
HtmlStamper htmlStamper = new HtmlStamper("<h1>Html stamp</h1>")
{
    VerticalOffset = new Length(-200, MeasurementUnit.Pixel),
    HorizontalOffset = new Length(-200, MeasurementUnit.Pixel),
};

// Use TextStamper to stamp text with custom font onto pdf
TextStamper textStamper = new TextStamper("Hello World! Stamp One Here!")
{
    FontFamily = "Bungee Spice",
    UseGoogleFont = true,
    FontSize = 30,
};

// Use ImageStamper to stamp images onto pdf
Uri filepath = new Uri(@"C:\assets\logo.png"); // absolute path or URL
ImageStamper imageStamper = new ImageStamper(filepath)
{
    VerticalAlignment = VerticalAlignment.Top,
    MinWidth = new Length(20),
    MinHeight = new Length(20),
};

// Use BarcodeStamper to stamp QR code/Barcode onto pdf
BarcodeStamper barcodeStamper = new BarcodeStamper("IronPDF", BarcodeEncoding.Code128)
{
    Height=75,
    VerticalAlignment = VerticalAlignment.Bottom,
    HorizontalAlignment = HorizontalAlignment.Left,
};

Stamper[] stamps = { htmlStamper, textStamper, imageStamper, barcodeStamper };

var pdf = PdfDocument.FromFile("Unstamped.pdf");
pdf.ApplyMultipleStamps(stamps);
pdf.SaveAs("Stamped.pdf");
Imports IronPdf
Imports IronPdf.Editing
Imports System

' Use HtmlStamper to stamp Html onto pdf
Dim htmlStamper As New HtmlStamper("<h1>Html stamp</h1>") With {
    .VerticalOffset = New Length(-200, MeasurementUnit.Pixel),
    .HorizontalOffset = New Length(-200, MeasurementUnit.Pixel)
}

' Use TextStamper to stamp text with custom font onto pdf
Dim textStamper As New TextStamper("Hello World! Stamp One Here!") With {
    .FontFamily = "Bungee Spice",
    .UseGoogleFont = True,
    .FontSize = 30
}

' Use ImageStamper to stamp images onto pdf
Dim filepath As New Uri("C:\assets\logo.png") ' absolute path or URL
Dim imageStamper As New ImageStamper(filepath) With {
    .VerticalAlignment = VerticalAlignment.Top,
    .MinWidth = New Length(20),
    .MinHeight = New Length(20)
}

' Use BarcodeStamper to stamp QR code/Barcode onto pdf
Dim barcodeStamper As New BarcodeStamper("IronPDF", BarcodeEncoding.Code128) With {
    .Height = 75,
    .VerticalAlignment = VerticalAlignment.Bottom,
    .HorizontalAlignment = HorizontalAlignment.Left
}

Dim stamps As Stamper() = {htmlStamper, textStamper, imageStamper, barcodeStamper}

Dim pdf = PdfDocument.FromFile("Unstamped.pdf")
pdf.ApplyMultipleStamps(stamps)
pdf.SaveAs("Stamped.pdf")
NuGet Download
Install-Package IronPdf
Efektywne dodawanie treści HTML

Efektywne dodawanie treści HTML

Zobacz na GitHubie

Gotowy, aby rozpocząć?

Nuget Downloads 20,667,543Wersja:2026.7właśnie wydany

Key in blue circle

Uzyskaj natychmiast swój darmowy 30-dniowy Klucz Testowy.

Brak ograniczeń. 100% dostępności. Bez karty kredytowej.

bullet_checkedNie wymaga karty kredytowej ani tworzenia kontaBrak ograniczeń. 100% dostępności. Bez karty kredytowej.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Zarezerwuj swoje darmowe Demo na żywo
Booking Badge

Zaufane przez miliony inżynierów na całym świecie

Logotypy klientów Iron Software
Otrzymaj swoje Konsultacja Bez Zobowiązań
Wypełnij poniższy formularz lub wyślij e-mail na sales@ironsoftware.com
Twoje dane zawsze będą utrzymywane w tajemnicy.
Zaufane przez miliony inżynierów na całym świecie
Logotypy klientów Iron Software
Otrzymaj swój darmowy Klucz Próbny na 30 dni natychmiast.
Nie wymaga karty kredytowej ani tworzenia konta