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:
Constructor
new PdfView(properties?)
| Parameter | Type | Description |
|---|---|---|
| properties | Properties<PdfView> |
Sets all key-value pairs in the properties object as widget properties. Optional. |
Properties
padding
Android
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.
pageBackground
Android
Determines the color visible in the transparent areas of a page.
| Type: | ColorValue |
| Default: | 'initial' |
| Settable: | Yes |
| Change Event: | pageBackgroundChanged |
pageElevation
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 |
spacing
Android
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 |
src
The source of the document. Can be a path on the local file system or a Blob/File object.
| Type: | string |
| Settable: | Yes |
| Change Event: | srcChanged |
zoomEnabled
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 |
Events
load
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
srcChanged
Fired when the src property has changed.
EventObject Type: PropertyChangedEvent<PdfView, string
| Blob
| null>
| Property | Type | Description |
|---|---|---|
| value | string |
The new value of src. |
zoomEnabledChanged
Fired when the zoomEnabled property has changed.
EventObject Type: PropertyChangedEvent<PdfView, boolean>
| Property | Type | Description |
|---|---|---|
| value | boolean |
The new value of zoomEnabled. |
spacingChanged
Fired when the spacing property has changed.
EventObject Type: PropertyChangedEvent<PdfView, Dimension>
| Property | Type | Description |
|---|---|---|
| value | Dimension |
The new value of spacing. |
pageElevationChanged
Fired when the pageElevation property has changed.
EventObject Type: PropertyChangedEvent<PdfView, number>
| Property | Type | Description |
|---|---|---|
| value | number |
The new value of pageElevation. |
pageBackgroundChanged
Fired when the pageBackground property has changed.
EventObject Type: PropertyChangedEvent<PdfView, ColorValue>
| Property | Type | Description |
|---|---|---|
| value | ColorValue |
The new value of pageBackground. |