AddDocumentAttachment
AddDocumentAttachment(string, string)
添加不带注释的文档附件。
public void AddDocumentAttachment(string fileAttachmentPath, string description)
范围 | 类型 | 描述 |
---|---|---|
fileAttachmentPath | String | 将附加文件的路径。 |
description | String | 描述信息。 |
例子
PdfContentEditor editor = new PdfContentEditor();
editor.BindPdf("example.pdf");
editor.AddDocumentAttachment("attachment_file.pdf", "description of attachment_file");
editor.Save("example_out.pdf");
也可以看看
- class PdfContentEditor
- 命名空间 Aspose.Pdf.Facades
- 部件 Aspose.PDF
AddDocumentAttachment(Stream, string, string)
添加不带注释的文档附件。
public void AddDocumentAttachment(Stream fileAttachmentStream, string fileAttachmentName,
string description)
范围 | 类型 | 描述 |
---|---|---|
fileAttachmentStream | Stream | 文件流将被附加。 |
fileAttachmentName | String | 附件名称。 |
description | String | 描述信息。 |
例子
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");
}
也可以看看
- class PdfContentEditor
- 命名空间 Aspose.Pdf.Facades
- 部件 Aspose.PDF