PDF JS Viewer

(part of package 'Servoy PDF Viewer') Extends designtime/SolutionModel: JSWebComponent Extends runtime: RuntimeWebComponent

pdfJsViewer provides more control and customization options than pdfViewer. It is more flexible and can handle advanced features like drawing and digital signatures. If customization is not required, consider using pdfViewer.

This is a reference page; many components have detailed usage guides here.

Properties

dataProviderID

Type: dataprovider


documentURL

Type: string


enableTooltips

Type: boolean Default Value: false


noCache

Type: boolean


pageNumber

Type: int


showToolbar

Type: boolean Default Value: true


styleClass

Type: styleclass


styleSheet

Type: media


tabSeq

Type: tabseq


visible

Type: visible


zoomLevel

Type: string


Events

onPageChanged(pageNumber,previousPageNumber)

Parameters:

  • {int} pageNumber

  • {int} previousPageNumber


API

getFieldNames()

Returns an array of strings representing the field names.

Returns: string[] ** s {String[]} An array of field names.


getFieldValues()

Returns a map containing the field values.

Returns: map ** s {Map} A map of field values.


getToolbarControlIds()

Returns an array of strings representing the toolbar control IDs.

This should not be used at runtime because it can only be called when the view is visible. It is intended for developers to get the names that the current pdfjs viewer internal component supports, which can then be used in the solution.

Returns: string[] ** s {String[]} An array of toolbar control IDs.


reload()

forces a reload of the current url


setFieldControlsVisibility(names,visible)

Sets the visibility of the field controls.

Parameters:

  • {string[]} names - An array of field control names.

  • {boolean} visible Visible - A boolean indicating the visibility of the field controls.


setFieldValues(values)

Sets the field values.

Parameters:

  • {map} values - A map containing the field values to be set.


setToolbarControlsVisibility(ids,visible)

Sets the visibility of the toolbar controls.

Parameters:

  • {string[]} ids - An array of toolbar control IDs.

  • {boolean} visible Visible - A boolean indicating the visibility of the toolbar controls.



Last updated