Constructor
new BaseViewer(options)
Parameters:
Name | Type | Description |
---|---|---|
options |
PDFViewerOptions |
- Implements:
- Source:
Members
currentPageLabel :string|null
Returns the current page label, or `null` if no page labels exist.
Type:
- string | null
- Source:
currentPageLabel
- Source:
currentPageNumber :number
Type:
- number
- Source:
currentPageNumber
- Source:
currentScale :number
Type:
- number
- Source:
currentScale
- Source:
currentScaleValue :string
Type:
- string
- Source:
currentScaleValue
- Source:
hasEqualPageSizes :boolean
Whether all pages of the PDF document have identical widths and heights.
Type:
- boolean
- Source:
optionalContentConfigPromise :Promise.<(OptionalContentConfig|null)>
Type:
- Promise.<(OptionalContentConfig|null)>
- Source:
optionalContentConfigPromise
- Source:
pagesRotation :number
Type:
- number
- Source:
pagesRotation
- Source:
pageViewsReady :boolean
- True if all {PDFPageView} objects are initialized.
Type:
- boolean
- Source:
scrollMode :number
One of the values in {ScrollMode}.
Type:
- number
- Source:
scrollMode
- Source:
spreadMode :number
One of the values in {SpreadMode}.
Type:
- number
- Source:
spreadMode
- Source:
Methods
_getCurrentVisiblePage()
Helper method for `this._getVisiblePages`. Should only ever be used when
the viewer can only display a single page at a time, for example in:
- `PDFSinglePageViewer`.
- `PDFViewer` with Presentation Mode active.
- Source:
createAnnotationLayerBuilder(pageDiv, pdfPage, imageResourcesPathopt, renderInteractiveForms, l10n) → {AnnotationLayerBuilder}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
pageDiv |
HTMLDivElement | |||
pdfPage |
PDFPage | |||
imageResourcesPath |
string |
<optional> |
Path for image resources, mainly for annotation icons. Include trailing slash. | |
renderInteractiveForms |
boolean | false | ||
l10n |
IL10n |
- Source:
Returns:
createTextLayerBuilder(textLayerDiv, pageIndex, viewport, enhanceTextSelection, eventBus) → {TextLayerBuilder}
Parameters:
Name | Type | Default | Description |
---|---|---|---|
textLayerDiv |
HTMLDivElement | ||
pageIndex |
number | ||
viewport |
PageViewport | ||
enhanceTextSelection |
boolean | false | |
eventBus |
EventBus |
- Source:
Returns:
- Type
- TextLayerBuilder
getPagesOverview() → {Array}
Returns sizes of the pages.
- Source:
Returns:
Array of objects with width/height/rotation fields.
- Type
- Array
isPageVisible(pageNumber)
Parameters:
Name | Type | Description |
---|---|---|
pageNumber |
number |
- Source:
scrollPageIntoView(params)
Scrolls page into view.
Parameters:
Name | Type | Description |
---|---|---|
params |
ScrollPageIntoViewParameters |
- Source:
setDocument(pdfDocument)
Parameters:
Name | Type | Description |
---|---|---|
pdfDocument |
PDFDocument |
- Source:
setPageLabels(labels)
Parameters:
Name | Type | Description |
---|---|---|
labels |
Array | null |
- Source: