첨부파일 추가
IronPDF는 PDF 문서에 첨부 파일을 추가하고 제거하는 기능을 지원합니다.
더 자세한 정보를 원하시면 IronPDF 문서를 참조하십시오. 문서에는 상세한 가이드와 자료가 제공됩니다. 또한, Iron Software 웹사이트 에서 더 많은 기능과 성능에 대해 알아보세요.
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
Private renderer = New ChromePdfRenderer()
Private myPdf = renderer.RenderHtmlFileAsPdf("my-content.html")
' Load your own attachment
Private attachment() As Byte = File.ReadAllBytes("path/to/attachment")
' Here we can add an attachment with a name and a byte[]
Private 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")
Install-Package IronPdf
IronPDF는 PDF 문서에 첨부 파일을 추가하고 제거하는 기능을 지원합니다.
더 자세한 정보를 원하시면 IronPDF 문서를 참조하십시오. 문서에는 상세한 가이드와 자료가 제공됩니다. 또한, Iron Software 웹사이트 에서 더 많은 기능과 성능에 대해 알아보세요.