PdfContentEditor.AddDocumentAttachment

AddDocumentAttachment(string, string)

添加没有注释的文档附件。

public void AddDocumentAttachment(string fileAttachmentPath, string description)
参数类型描述
fileAttachmentPath字符串将要附加的文件路径。
description字符串描述信息。

示例

PdfContentEditor editor = new PdfContentEditor();
editor.BindPdf("example.pdf");
editor.AddDocumentAttachment("attachment_file.pdf", "description of attachment_file");
editor.Save("example_out.pdf");

另请参阅


AddDocumentAttachment(Stream, string, string)

添加没有注释的文档附件。

public void AddDocumentAttachment(Stream fileAttachmentStream, string fileAttachmentName, 
    string description)
参数类型描述
fileAttachmentStream将要附加的文件流。
fileAttachmentName字符串附件名称。
description字符串描述信息。

示例

PdfContentEditor editor = new PdfContentEditor();
editor.BindPdf("example.pdf");
using(System.IO.FileStream attStream = System.IO.File.OpenRead("attachment_file.pdf"))
{
    editor.AddDocumentAttachment(attStream, "attachment_file.pdf", "description of attachment_file");
    editor.Save("example_out.pdf");
}    

另请参阅