# Class: PDFJS

## PDFJS

#### new PDFJS()

PDFJS scope object that contains all functions, objects and variables related to the PDF.js.

Source:
  - doc_helper.js, line 27

### Members

#### (static) cMapPacked :boolean

Specifies if CMaps are binary packed.

##### Type:

- boolean

Source:
  - display/global.js, line 114

#### (static) cMapUrl :string

The url of where the predefined Adobe CMaps are located. Include trailing slash.

##### Type:

- string

Source:
  - display/global.js, line 108

#### (static) disableAutoFetch :boolean

Disable pre-fetching of PDF file data. When range requests are enabled PDF.js will automatically keep fetching more data even if it isn't needed to display the current page. This default behavior can be disabled. NOTE: It is also necessary to disable streaming, see above, in order for disabling of pre-fetching to work correctly.

##### Type:

- boolean

Source:
  - display/global.js, line 184

#### (static) disableCreateObjectURL :boolean

Disables URL.createObjectURL usage.

##### Type:

- boolean

Source:
  - display/global.js, line 204

#### (static) disableFontFace :boolean

By default fonts are converted to OpenType fonts and loaded via font face rules. If disabled, the font will be rendered using a built in font renderer that constructs the glyphs with primitive path commands.

##### Type:

- boolean

Source:
  - display/global.js, line 122

#### (static) disableRange :boolean

Disable range request loading of PDF files. When enabled and if the server supports partial content requests then the PDF will be fetched in chunks. Enabled (false) by default.

##### Type:

- boolean

Source:
  - display/global.js, line 164

#### (static) disableStream :boolean

Disable streaming of PDF file data. By default PDF.js attempts to load PDF in chunks. This default behavior can be disabled.

##### Type:

- boolean

Source:
  - display/global.js, line 172

#### (static) disableWebGL :boolean

Disables WebGL usage.

##### Type:

- boolean

Source:
  - display/global.js, line 211

#### (static) disableWorker :boolean

Disable the web worker and run all code on the main thread. This will happen automatically if the browser doesn't support workers or sending typed arrays to workers.

##### Type:

- boolean

Source:
  - display/global.js, line 139

#### (static) externalLinkRel :string

Specifies the |rel| attribute for external links. Defaults to stripping the referrer.

##### Type:

- string

Source:
  - display/global.js, line 232

#### (static) externalLinkTarget :number

Specifies the |target| attribute for external links. The constants from PDFJS.LinkTarget should be used: - NONE [default] - SELF - BLANK - PARENT - TOP

##### Type:

- number

Source:
  - display/global.js, line 224

#### (static) imageResourcesPath :string

Path for image resources, mainly for annotation icons. Include trailing slash.

##### Type:

- string

Source:
  - display/global.js, line 130

#### (static) isEvalSupported :boolean

Determines if we can eval strings as JS. Primarily used to improve performance for font rendering.

##### Type:

- boolean

Source:
  - display/global.js, line 240

#### (static) maxImageSize :number

The maximum allowed image size in total pixels e.g. width * height. Images above this value will not be drawn. Use -1 for no limit.

##### Type:

- number

Source:
  - display/global.js, line 100

#### (static) openExternalLinksInNewWindow :boolean

(Deprecated) Opens external links in a new window if enabled. The default behavior opens external links in the PDF.js window. NOTE: This property has been deprecated, please use `PDFJS.externalLinkTarget = PDFJS.LinkTarget.BLANK` instead.

##### Type:

- boolean

Source:
  - display/global.js, line 280

#### (static) pdfBug :boolean

Enables special hooks for debugging PDF.js.

##### Type:

- boolean

Source:
  - display/global.js, line 191

#### (static) pdfjsNext :boolean

Opt-in to backwards incompatible API changes. NOTE: If the `PDFJS_NEXT` build flag is set, it will override this setting.

##### Type:

- boolean

Source:
  - display/global.js, line 248

#### (static) postMessageTransfers :boolean

Enables transfer usage in postMessage for ArrayBuffers.

##### Type:

- boolean

Source:
  - display/global.js, line 197

#### (static) verbosity :number

Controls the logging level. The constants from PDFJS.VERBOSITY_LEVELS should be used: - errors - warnings [default] - infos

##### Type:

- number

Source:
  - doc_helper.js, line 39

#### (static) workerPort

Defines global port for worker process. Overrides workerSrc and disableWorker setting.

Source:
  - display/global.js, line 156

#### (static) workerSrc :string

Path and filename of the worker file. Required when the worker is enabled in development mode. If unspecified in the production build, the worker will be loaded based on the location of the pdf.js file. It is recommended that the workerSrc is set in a custom application to prevent issues caused by third-party frameworks and libraries.

##### Type:

- string

Source:
  - display/global.js, line 150