AttachmentsEmbeddingMode

PdfSaveOptions.AttachmentsEmbeddingMode property

Obtiene o establece un valor que determina cómo se incrustan los archivos adjuntos en el documento PDF.

public PdfAttachmentsEmbeddingMode AttachmentsEmbeddingMode { get; set; }

Observaciones

El valor predeterminado esNone y los archivos adjuntos no están incrustados.

Los estándares PDF/A-1, PDF/A-2 y PDF/A-4 normal (no PDF/A-4f) no permiten archivos incrustados. None El valor se utilizará automáticamente.

Ejemplos

Muestra cómo agregar archivos adjuntos incrustados al documento PDF.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.InsertOleObject(MyDir + "Spreadsheet.xlsx", "Excel.Sheet", false, true, null);

PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.AttachmentsEmbeddingMode = PdfAttachmentsEmbeddingMode.Annotations;

doc.Save(ArtifactsDir + "PdfSaveOptions.PdfEmbedAttachments.pdf", saveOptions);

Ver también