Skip to content

modern-pdf-lib


modern-pdf-lib / attachFile

Function: attachFile()

attachFile(registry, file): PdfRef

Defined in: src/core/embeddedFiles.ts:58

Create an embedded file stream and filespec dictionary, registering them in the object registry.

Parameters

registry

PdfObjectRegistry

The PDF object registry.

file

EmbeddedFile

The file to embed.

Returns

PdfRef

The indirect reference to the filespec dictionary.

Released under the MIT License.