PdfContentEditor.CreateFileAttachment
Contents
[
Hide
]CreateFileAttachment(Rectangle, string, string, int, string)
Creates file attachment annotation.
public void CreateFileAttachment(Rectangle rect, string contents, string filePath, int page,
string name)
Parameter | Type | Description |
---|---|---|
rect | Rectangle | The annotation rectangle defining the location of the annotation on the page. |
contents | String | The contents of the annotation. |
filePath | String | The path of the file will be attached. |
page | Int32 | The number of original page where the annotation will be created. |
name | String | The name of an icon will be used in displaying the annotation. This value can be: “Graph”, “PushPin”, “Paperclip”, “Tag”. |
Examples
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");
See Also
- class PdfContentEditor
- namespace Aspose.Pdf.Facades
- assembly Aspose.PDF
CreateFileAttachment(Rectangle, string, string, int, string, double)
Creates file attachment annotation.
public void CreateFileAttachment(Rectangle rect, string contents, string filePath, int page,
string name, double opacity)
Parameter | Type | Description |
---|---|---|
rect | Rectangle | The annotation rectangle defining the location of the annotation on the page. |
contents | String | The contents of the annotation. |
filePath | String | The path of the file will be attached. |
page | Int32 | The number of original page where the annotation will be created. |
name | String | The name of an icon will be used in displaying the annotation. This value can be: “Graph”, “PushPin”, “Paperclip”, “Tag”. |
opacity | Double | Icon’s opacity from 0 to 1: 0 - completely transparant, 1 - completely opaque. |
Examples
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");
See Also
- class PdfContentEditor
- namespace Aspose.Pdf.Facades
- assembly Aspose.PDF
CreateFileAttachment(Rectangle, string, Stream, string, int, string)
Creates file attachment annotation.
public void CreateFileAttachment(Rectangle rect, string contents, Stream attachmentStream,
string attachmentName, int page, string name)
Parameter | Type | Description |
---|---|---|
rect | Rectangle | The annotation rectangle defining the location of the annotation on the page. |
contents | String | The contents of the annotation. |
attachmentStream | Stream | The attachment file stream. |
attachmentName | String | The attachment name. |
page | Int32 | The number of original page where the annotation will be created. |
name | String | The name of an icon will be used in displaying the annotation. This value can be: “Graph”, “PushPin”, “Paperclip”, “Tag”. |
Examples
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");
}
See Also
- class PdfContentEditor
- namespace Aspose.Pdf.Facades
- assembly Aspose.PDF
CreateFileAttachment(Rectangle, string, Stream, string, int, string, double)
Creates file attachment annotation.
public void CreateFileAttachment(Rectangle rect, string contents, Stream attachmentStream,
string attachmentName, int page, string name, double opacity)
Parameter | Type | Description |
---|---|---|
rect | Rectangle | The annotation rectangle defining the location of the annotation on the page. |
contents | String | The contents of the annotation. |
attachmentStream | Stream | The attachment file stream. |
attachmentName | String | The attachment name. |
page | Int32 | The number of original page where the annotation will be created. |
name | String | The name of an icon will be used in displaying the annotation. This value can be: “Graph”, “PushPin”, “Paperclip”, “Tag”. |
opacity | Double | Icon’s opacity from 0 to 1: 0 - completely transparant, 1 - completely opaque. |
Examples
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");
}
See Also
- class PdfContentEditor
- namespace Aspose.Pdf.Facades
- assembly Aspose.PDF