API Documentation for FileSpec

NoPoDoFo FileSpec

A FileSpec Dictionary is used for embedding files in a PDF. This dictionary contains keys:

  • F: filename
  • UF: filename as utf16
  • EF: 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
}

Constructors


new(file: string, doc: Base, embed?: boolean): FileSpec

Constructs a new FileSpec Dictionary with the file provided and attached to the Document.

Properties


name

The name of the file as utf8

Methods


getContents

getContents(): Buffer

Get the contents of a file

results matching ""

    No results matching ""