Class “PdfView”

Object > NativeObject > Widget > PdfView

A widget to display PDF documents.

Type: PdfView extends Widget
Constructor: public
Singleton: No
Namespace: tabris
Direct subclasses: None
JSX Support: Element: <PdfView/>
Parent Elements: <Canvas/>, <Cell/>, <Composite/>, <Page/>, <RefreshComposite/>, <Row/>, <ScrollView/>, <Stack/>, <Tab/>
Child Elements: Not Supported

See also:

JSX pdfview.jsx [► Run in Playground]


new PdfView(properties?)

Parameter Type Description
properties Properties<PdfView> Sets all key-value pairs in the properties object as widget properties. Optional.




Additional space to add inside the widgets bounds.

Type: BoxDimensions | null
Settable: By Constructor or JSX
Change Event: Not supported

This property can only be set via constructor or JSX. Once set, it cannot change anymore.



Determines the color visible in the transparent areas of a page.

Type: ColorValue
Default: 'initial'
Settable: Yes
Change Event: pageBackgroundChanged


Setting this property determines the intensity of the shadow page on the widget background. On iOS the shadow is either visible or not (property set to 0), but always looks the same.

Type: number
Default: 0
Settable: Yes
Change Event: pageElevationChanged



The vertical spacing between the individual pages. The default is specific to the device and can not be changed on iOS.

Type: Dimension
Settable: Yes
Change Event: spacingChanged


The source of the document. Can be a path on the local file system or a Blob/File object.

Type: string
| Blob
| null
Settable: Yes
Change Event: srcChanged


Enables the pinch-to-zoom gesture. On iOS this will scale the entire document, while on Android each page is scaled individually.

Type: boolean
Default: false
Settable: Yes
Change Event: zoomEnabledChanged



Fired when the document loading has finished.

EventObject Type: PdfViewLoadEvent<PdfView>

Property Type Description
error boolean If this is true the loading process failed.

Change Events


Fired when the src property has changed.

EventObject Type: PropertyChangedEvent<PdfView, string
| Blob
| null>

Property Type Description
value string
| Blob
| null
The new value of src.


Fired when the zoomEnabled property has changed.

EventObject Type: PropertyChangedEvent<PdfView, boolean>

Property Type Description
value boolean The new value of zoomEnabled.


Fired when the spacing property has changed.

EventObject Type: PropertyChangedEvent<PdfView, Dimension>

Property Type Description
value Dimension The new value of spacing.


Fired when the pageElevation property has changed.

EventObject Type: PropertyChangedEvent<PdfView, number>

Property Type Description
value number The new value of pageElevation.


Fired when the pageBackground property has changed.

EventObject Type: PropertyChangedEvent<PdfView, ColorValue>

Property Type Description
value ColorValue The new value of pageBackground.