IRONSOFTWAREHOME
Dodaj załączniki
using IronPdf;
using System.IO;

// Instantiate the Renderer and create PdfDocument from HTML
var renderer = new ChromePdfRenderer();
var myPdf = renderer.RenderHtmlFileAsPdf("my-content.html");

// Load your own attachment
byte[] attachment = File.ReadAllBytes("path/to/attachment");

// Here we can add an attachment with a name and a byte[]
PdfAttachment exampleAttachment = myPdf.Attachments.AddAttachment("exampleAttachment", attachment);

// And here is an example of removing an attachment
myPdf.Attachments.RemoveAttachment(exampleAttachment);

myPdf.SaveAs("my-content.pdf");
Imports IronPdf
Imports System.IO

' Instantiate the Renderer and create PdfDocument from HTML
Dim renderer As New ChromePdfRenderer()
Dim myPdf = renderer.RenderHtmlFileAsPdf("my-content.html")

' Load your own attachment
Dim attachment As Byte() = File.ReadAllBytes("path/to/attachment")

' Here we can add an attachment with a name and a byte()
Dim exampleAttachment As PdfAttachment = myPdf.Attachments.AddAttachment("exampleAttachment", attachment)

' And here is an example of removing an attachment
myPdf.Attachments.RemoveAttachment(exampleAttachment)

myPdf.SaveAs("my-content.pdf")
NuGet Download
Install-Package IronPdf
Dodaj załączniki

Dodaj załączniki

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