attachmentsEmbeddingMode property

PdfSaveOptions.attachmentsEmbeddingMode property

Gets or sets a value determining how attachments are embedded to the PDF document.

get attachmentsEmbeddingMode(): Aspose.Words.Saving.PdfAttachmentsEmbeddingMode

Remarks

Default value is PdfAttachmentsEmbeddingMode.None and attachments are not embedded.

PDF/A-1, PDF/A-2 and regular PDF/A-4 (not PDF/A-4f) standards do not allow embedded files. PdfAttachmentsEmbeddingMode.None value will be used automatically.

Examples

Shows how to add embed attachments to the PDF document.

let doc = new aw.Document();
let builder = new aw.DocumentBuilder(doc);

builder.insertOleObject(base.myDir + "Spreadsheet.xlsx", "Excel.Sheet", false, true, null);

let saveOptions = new aw.Saving.PdfSaveOptions();
saveOptions.attachmentsEmbeddingMode = aw.Saving.PdfAttachmentsEmbeddingMode.Annotations;

doc.save(base.artifactsDir + "PdfSaveOptions.PdfEmbedAttachments.pdf", saveOptions);

See Also