CreateFileAttachment
内容
[
隐藏
]CreateFileAttachment(Rectangle, string, string, int, string)
创建文件附件注释。
public void CreateFileAttachment(Rectangle rect, string contents, string filePath, int page,
string name)
范围 | 类型 | 描述 |
---|---|---|
rect | Rectangle | 定义页面上注释位置的注释矩形。 |
contents | String | 注释的内容。 |
filePath | String | 将附加文件的路径。 |
page | Int32 | 将在其中创建注释的原始页数。 |
name | String | 显示注释时将使用图标的名称。 此值可以是:“Graph”、“PushPin”、“Paperclip”、“Tag”。 |
例子
PdfContentEditor editor = new PdfContentEditor();
editor.BindPdf("example.pdf");
editor.CreateFileAttachment(new System.Drawing.Rectangle(0, 0, 100, 100),
"Welcome to Aspose", "attachment_file.pdf", 1, "Graph");
editor.Save("example_out.pdf");
也可以看看
- class PdfContentEditor
- 命名空间 Aspose.Pdf.Facades
- 部件 Aspose.PDF
CreateFileAttachment(Rectangle, string, string, int, string, double)
创建文件附件注释。
public void CreateFileAttachment(Rectangle rect, string contents, string filePath, int page,
string name, double opacity)
范围 | 类型 | 描述 |
---|---|---|
rect | Rectangle | 定义页面上注释位置的注释矩形。 |
contents | String | 注释的内容。 |
filePath | String | 将附加文件的路径。 |
page | Int32 | 将在其中创建注释的原始页数。 |
name | String | 显示注释时将使用图标的名称。 此值可以是:“Graph”、“PushPin”、“Paperclip”、“Tag”。 |
opacity | Double | 图标的不透明度从 0 到 1:0 - 完全透明,1 - 完全不透明。 |
例子
PdfContentEditor editor = new PdfContentEditor();
editor.BindPdf("example.pdf");
editor.CreateFileAttachment(new System.Drawing.Rectangle(0, 0, 100, 100),
"Welcome to Aspose", "attachment_file.pdf", 1, "Graph", 0.5);
editor.Save("example_out.pdf");
也可以看看
- class PdfContentEditor
- 命名空间 Aspose.Pdf.Facades
- 部件 Aspose.PDF
CreateFileAttachment(Rectangle, string, Stream, string, int, string)
创建文件附件注释。
public void CreateFileAttachment(Rectangle rect, string contents, Stream attachmentStream,
string attachmentName, int page, string name)
范围 | 类型 | 描述 |
---|---|---|
rect | Rectangle | 定义页面上注释位置的注释矩形。 |
contents | String | 注释的内容。 |
attachmentStream | Stream | 附件文件流。 |
attachmentName | String | 附件名称。 |
page | Int32 | 将在其中创建注释的原始页数。 |
name | String | 显示注释时将使用图标的名称。 此值可以是:“Graph”、“PushPin”、“Paperclip”、“Tag”。 |
例子
PdfContentEditor editor = new PdfContentEditor();
editor.BindPdf("example.pdf");
using(System.IO.FileStream attStream = System.IO.File.OpenRead("attachment_file.pdf"))
{
editor.CreateFileAttachment(new System.Drawing.Rectangle(0, 0, 100, 100),
"Welcome to Aspose", attStream, "attachment_file.pdf", 1, "Graph");
editor.Save("example_out.pdf");
}
也可以看看
- class PdfContentEditor
- 命名空间 Aspose.Pdf.Facades
- 部件 Aspose.PDF
CreateFileAttachment(Rectangle, string, Stream, string, int, string, double)
创建文件附件注释。
public void CreateFileAttachment(Rectangle rect, string contents, Stream attachmentStream,
string attachmentName, int page, string name, double opacity)
范围 | 类型 | 描述 |
---|---|---|
rect | Rectangle | 定义页面上注释位置的注释矩形。 |
contents | String | 注释的内容。 |
attachmentStream | Stream | 附件文件流。 |
attachmentName | String | 附件名称。 |
page | Int32 | 将在其中创建注释的原始页数。 |
name | String | 显示注释时将使用图标的名称。 此值可以是:“Graph”、“PushPin”、“Paperclip”、“Tag”。 |
opacity | Double | 图标的不透明度从 0 到 1:0 - 完全透明,1 - 完全不透明。 |
例子
PdfContentEditor editor = new PdfContentEditor();
editor.BindPdf("example.pdf");
using(System.IO.FileStream attStream = System.IO.File.OpenRead("attachment_file.pdf"))
{
editor.CreateFileAttachment(new System.Drawing.Rectangle(0, 0, 100, 100),
"Welcome to Aspose", attStream, "attachment_file.pdf", 1, "Graph", 0.5);
editor.Save("example_out.pdf");
}
也可以看看
- class PdfContentEditor
- 命名空间 Aspose.Pdf.Facades
- 部件 Aspose.PDF