IRONSOFTWAREHOME
Ajouter des pièces jointes
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
PM > Install-Package IronPdf
Ajouter des pièces jointes

Ajouter des pièces jointes

Voir sur GitHub

Prêt à commencer ?

Nuget Downloads 20,990,528Version :2026.9vient de sortir

Key in blue circle

Obtenez votre clé d'essai de 30 jours instantanément.

Your trial license will be sent to your email address

Aucune restriction. 100 % débloqué. Pas de carte bancaire.

OR
bullet_checkedAucune carte de crédit ou création de compte requiseAucune restriction. 100 % débloqué. Pas de carte bancaire.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Réservez votre Démonstration en direct gratuite
Booking Badge

De confiance par des millions d'ingénieurs dans le monde entier

Logos des clients d'Iron Software
Obtenez Votre Consultation sans Engagement
Remplissez le formulaire ci-dessous ou envoyez un email à sales@ironsoftware.com
Vos informations seront toujours gardées confidentielles.
De confiance par des millions d'ingénieurs dans le monde entier
Logos des clients d'Iron Software
Obtenez votre clé d'essai 30 jours gratuitement.
Aucune carte de crédit ou création de compte requise
Bibliothèque C# NuGet pour PDF
Installer avec NuGet

Version : 2026.9

PM > Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. Dans l'explorateur de solutions, faites un clic droit sur Références, Gestion des packages NuGet
  2. Sélectionnez Parcourir et recherchez « IronPDF »
  3. Sélectionnez le package et installez
C# PDF DLL
Télécharger DLL

Version : 2026.9

ou téléchargez l'installateur Windows ici.

  1. Téléchargez et décompressez IronPDF à un emplacement tel que ~/Libs dans votre répertoire de solution
  2. Dans l'explorateur de solutions Visual Studio, faites un clic droit sur Références. Sélectionnez Parcourir, « IronPDF.dll »

Licences à partir de 749 $