Class: PDFJS

PDFJS()

new PDFJS()

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

Members

(static) cMapPacked :boolean

Specifies if CMaps are binary packed.
Type:
  • boolean
Source:

(static) cMapUrl :string

The url of where the predefined Adobe CMaps are located. Include trailing slash.
Type:
  • string
Source:

(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:

(static) disableCreateObjectURL :boolean

Disables URL.createObjectURL usage.
Type:
  • boolean
Source:

(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:

(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:

(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:

(static) disableWebGL :boolean

Disables WebGL usage.
Type:
  • boolean
Source:

(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:

(static) externalLinkRel :string

Specifies the |rel| attribute for external links. Defaults to stripping the referrer.
Type:
  • string
Source:

(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:

(static) imageResourcesPath :string

Path for image resources, mainly for annotation icons. Include trailing slash.
Type:
  • string
Source:

(static) isEvalSupported :boolean

Determines if we can eval strings as JS. Primarily used to improve performance for font rendering.
Type:
  • boolean
Source:

(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:

(static) pdfBug :boolean

Enables special hooks for debugging PDF.js.
Type:
  • boolean
Source:

(static) postMessageTransfers :boolean

Enables transfer usage in postMessage for ArrayBuffers.
Type:
  • boolean
Source:

(static) verbosity :number

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

(static) workerPort

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

(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: