CreateFileAttachment

CreateFileAttachment(Rectangle, string, string, int, string)

创建文件附件注释。

public void CreateFileAttachment(Rectangle rect, string contents, string filePath, int page, 
    string name)
范围类型描述
rectRectangle定义页面上注释位置的注释矩形。
contentsString注释的内容。
filePathString将附加文件的路径。
pageInt32将在其中创建注释的原始页数。
nameString显示注释时将使用图标的名称。 此值可以是:“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");

也可以看看


CreateFileAttachment(Rectangle, string, string, int, string, double)

创建文件附件注释。

public void CreateFileAttachment(Rectangle rect, string contents, string filePath, int page, 
    string name, double opacity)
范围类型描述
rectRectangle定义页面上注释位置的注释矩形。
contentsString注释的内容。
filePathString将附加文件的路径。
pageInt32将在其中创建注释的原始页数。
nameString显示注释时将使用图标的名称。 此值可以是:“Graph”、“PushPin”、“Paperclip”、“Tag”。
opacityDouble图标的不透明度从 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");

也可以看看


CreateFileAttachment(Rectangle, string, Stream, string, int, string)

创建文件附件注释。

public void CreateFileAttachment(Rectangle rect, string contents, Stream attachmentStream, 
    string attachmentName, int page, string name)
范围类型描述
rectRectangle定义页面上注释位置的注释矩形。
contentsString注释的内容。
attachmentStreamStream附件文件流。
attachmentNameString附件名称。
pageInt32将在其中创建注释的原始页数。
nameString显示注释时将使用图标的名称。 此值可以是:“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");
}

也可以看看


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)
范围类型描述
rectRectangle定义页面上注释位置的注释矩形。
contentsString注释的内容。
attachmentStreamStream附件文件流。
attachmentNameString附件名称。
pageInt32将在其中创建注释的原始页数。
nameString显示注释时将使用图标的名称。 此值可以是:“Graph”、“PushPin”、“Paperclip”、“Tag”。
opacityDouble图标的不透明度从 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");
}

也可以看看