CreateFileAttachment

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

Crea una anotación de archivos adjuntos.

public void CreateFileAttachment(Rectangle rect, string contents, string filePath, int page, 
    string name)
ParámetroEscribeDescripción
rectRectangleEl rectángulo de anotación que define la ubicación de la anotación en la página.
contentsStringEl contenido de la anotación.
filePathStringSe adjuntará la ruta del archivo.
pageInt32El número de página original donde se creará la anotación.
nameStringEl nombre de un icono se utilizará para mostrar la anotación. Este valor puede ser: “Gráfico”, “PushPin”, “Paperclip”, “Tag”.

Ejemplos

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

Ver también


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

Crea una anotación de archivos adjuntos.

public void CreateFileAttachment(Rectangle rect, string contents, string filePath, int page, 
    string name, double opacity)
ParámetroEscribeDescripción
rectRectangleEl rectángulo de anotación que define la ubicación de la anotación en la página.
contentsStringEl contenido de la anotación.
filePathStringSe adjuntará la ruta del archivo.
pageInt32El número de página original donde se creará la anotación.
nameStringEl nombre de un icono se utilizará para mostrar la anotación. Este valor puede ser: “Gráfico”, “PushPin”, “Paperclip”, “Tag”.
opacityDoubleOpacidad del icono de 0 a 1: 0 - completamente transparente, 1 - completamente opaco.

Ejemplos

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

Ver también


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

Crea una anotación de archivos adjuntos.

public void CreateFileAttachment(Rectangle rect, string contents, Stream attachmentStream, 
    string attachmentName, int page, string name)
ParámetroEscribeDescripción
rectRectangleEl rectángulo de anotación que define la ubicación de la anotación en la página.
contentsStringEl contenido de la anotación.
attachmentStreamStreamEl flujo de archivos adjuntos.
attachmentNameStringEl nombre del archivo adjunto.
pageInt32El número de página original donde se creará la anotación.
nameStringEl nombre de un icono se utilizará para mostrar la anotación. Este valor puede ser: “Gráfico”, “PushPin”, “Paperclip”, “Tag”.

Ejemplos

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

Ver también


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

Crea una anotación de archivos adjuntos.

public void CreateFileAttachment(Rectangle rect, string contents, Stream attachmentStream, 
    string attachmentName, int page, string name, double opacity)
ParámetroEscribeDescripción
rectRectangleEl rectángulo de anotación que define la ubicación de la anotación en la página.
contentsStringEl contenido de la anotación.
attachmentStreamStreamEl flujo de archivos adjuntos.
attachmentNameStringEl nombre del archivo adjunto.
pageInt32El número de página original donde se creará la anotación.
nameStringEl nombre de un icono se utilizará para mostrar la anotación. Este valor puede ser: “Gráfico”, “PushPin”, “Paperclip”, “Tag”.
opacityDoubleOpacidad del icono de 0 a 1: 0 - completamente transparente, 1 - completamente opaco.

Ejemplos

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

Ver también