Skip to content

API

createViewerApp

typescript
function createViewerApp(options: Options): PDFViewerApplication {
  // ...
}

Create a viewer app.

Options

properties

nametypedescriptiondefaultValue
parentHTMLElementElement the PDF viewer will be render to.-
srcstring,TypedArray,ArrayBufferThe source of the PDF document.-
resourcePathstringThe resource path of pdf.js.-
disableCORSCheck optionalbooleanDisable CORS check of pdf.js.false
disableAutoSetTitle optionalbooleanDisable auto-set title of document caused by pdf.js.false
appOptions optionalAppOptionsDefault app options of pdf.js.{}

Last updated: