AddAttachment Method

Adds Filename as an attachment to the PDF.

Syntax

public void AddAttachment(string filename);
Public Sub AddAttachment(ByVal Filename As String)

Remarks

The file specified by Filename will be added to the PDF as an attachment.

When this method returns, the file information will be added to the Attachments collection.

After adding an attachment, call the Save method to create a new PDF with the embedded file.

Simple Example:

pdfxml.InputFile = "C:\input.pdf";
pdfxml.Load();
pdfxml.AddAttachment("C:\attachmentfile.txt");
pdfxml.OutputFile = "C:\output.pdf";
pdfxml.Save();

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks EDI 2020 .NET Edition - Version 20.0 [Build 7941]