A FileSpec Dictionary is used for embedding files in a PDF. This dictionary contains keys:
F
: filenameUF
: filename as utf16EF
: the embedded file
The simplist method for attaching a file is using Document.attachFile.
class FileSpec {
new(file: string, doc: Base, embed?: boolean): FileSpec
new(obj: Object): FileSpec
readonly name: string
getContents(): Buffer
}
new(file: string, doc: Base, embed?: boolean): FileSpec
Constructs a new FileSpec Dictionary with the file provided and attached to the Document.
The name of the file as utf8
getContents(): Buffer
Get the contents of a file