AddDocumentAttachment

AddDocumentAttachment(string, string)

添加不带注释的文档附件。

public void AddDocumentAttachment(string fileAttachmentPath, string description)
范围类型描述
fileAttachmentPathString将附加文件的路径。
descriptionString描述信息。

例子

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)
范围类型描述
fileAttachmentStreamStream文件流将被附加。
fileAttachmentNameString附件名称。
descriptionString描述信息。

例子

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");
}    

也可以看看