PDFView Properties
The properties for PDFView widget are as follows:
accessibilityConfig Property
Enables you to control accessibility behavior and alternative text for the widget.
For more information on using accessibility features in your app, see the Accessibility appendix in the Volt MX IrisUser Guide.
Syntax
Type
Object
Read/Write
Read + Write
Remarks
- The accessibilityConfig property is enabled for all the widgets which are supported under the Flex Layout.
Note: From Volt MX Iris V9 SP2 GA version, you can provide i18n keys as values to all the attributes used inside the
accessibilityConfig
property. Values provided in the i18n keys take precedence over values provided ina11yLabel
,a11yValue
, anda11yHint
fields.
The accessibilityConfig property is a JavaScript object which can contain the following key-value pairs.
Key | Type | Description | ARIA Equivalent |
---|---|---|---|
a11yIndex | Integer with no floating or decimal number. | This is an optional parameter. Specifies the order in which the widgets are focused on a screen. | For all widgets, this parameter maps to the aria-index , index , or taborder properties. |
a11yLabel | String | This is an optional parameter. Specifies alternate text to identify the widget. Generally the label should be the text that is displayed on the screen. | For all widgets, this parameter maps to the aria-labelledby property of ARIA in HTML. > Note: For the Image widget, this parameter maps to the alt attribute of ARIA in HTML. |
a11yValue | String | This is an optional parameter. Specifies the descriptive text that explains the action associated with the widget. On the Android platform, the text specified for a11yValue is prefixed to the a11yHint. | This parameter is similar to the a11yLabel parameter. If the a11yValue is defined, the value of a11yValue is appended to the value of a11yLabel. These values are separated by a space. |
a11yHint | String | This is an optional parameter. Specifies the descriptive text that explains the action associated with the widget. On the Android platform, the text specified for a11yValue is prefixed to the a11yHint. | For all widgets, this parameter maps to the aria-describedby property of ARIA in HTML. |
a11yHidden | Boolean | This is an optional parameter. Specifies if the widget should be ignored by assistive technology. The default option is set to false. This option is supported on iOS 5.0 and above, Android 4.1 and above, and SPA | For all widgets, this parameter maps to the aria-hidden property of ARIA in HTML. |
a11yARIA | Object | This is an optional parameter. For each widget, the key and value provided in this object are added as the attribute and value of the HTML tags respectively. Any values provided for attributes such as aria-labelledby and aria-describedby using this attribute, takes precedence over values given in a11yLabel and a11yHint fields. When a widget is provided with the following key value pair or attribute using the a11yARIA object, the tabIndex of the widget is automatically appended as zero.{"role": "main"} aria-label |
This parameter is only available on the Desktop Web platform. |
Android limitations
- If the results of the concatenation of a11y fields result in an empty string, then
accessibilityConfig
is ignored and the text that is on widget is read out. - The soft keypad does not gain accessibility focus during the right/left swipe gesture when the keypad appears.
SPA/Desktop Web limitations
- When
accessibilityConfig
property is configured for any widget, thetabIndex
attribute is added automatically to theaccessibilityConfig
property. - The behavior of accessibility depends on the Web browser, Web browser version, Voice Over Assistant, and Voice Over Assistant version.
- Currently SPA/Desktop web applications support only a few ARIA tags. To achieve more accessibility features, use the attribute a11yARIA. The corresponding tags will be added to the DOM as per these configurations.
Example 1
This example uses the button widget, but the principle remains the same for all widgets that have an accessibilityConfig property.
Example 2
This example uses the button widget to implement internationalization in accessibilityConfig
property, but the principle remains the same for all widgets.
Platform Availability
- Available in the IDE
- iOS, Android, SPA, and Desktop Web
autoScale Property
This property is used to set the PDF documentation to fit the screen size. Toggles mode whereby the scale factor is automatically changed as the view is resized, or rotated, to maximize the PDF displayed. For continuous modes this is a “fit width” behavior, for non-continuous modes it is a “best fit” behavior.
Syntax
Read/Write
Read + Write
Remarks
The default value for this property is true.
Example
Platform Availability
- iOS
bottom Property
This property determines the bottom edge of the widget and is measured from the bottom bounds of the parent container.
The bottom property determines the position of the bottom edge of the widget’s bounding box. The value may be set using DP (Device Independent Pixels), Percentage, or Pixels. In freeform layout, the distance is measured from the bottom edge of the parent container. In flow-vertical layout, the value is ignored. In flow-horizontal layout, the value is ignored.
The bottom property is used only if the Height property is not provided.
Syntax
Type
String
Read/Write
Read + Write
Remarks
The property determines the bottom edge of the widget and is measured from the bottom bounds of the parent container.
If the layoutType is set as voltmx.flex.FLOW_VERTICAL, the bottom property is measured from the top edge of bottom sibling widget. The vertical space between two widgets is measured from bottom of the top sibling widget and the top of the bottom sibling widget.
Example
Platform Availability
- Available in the IDE
- iOS, Android, Windows, SPA , and Desktop Web
centerX Property
This property determines the center of a widget measured from the left bounds of the parent container.
The centerX property determines the horizontal center of the widget’s bounding box. The value may be set using DP (Device Independent Pixels), Percentage, or Pixels. In freeform layout, the distance is measured from the left edge of the parent container. In flow-vertical layout, the distance is measured from the left edge of the parent container. In flow-horizontal layout, the distance is measured from the right edge of the previous sibling widget in the hierarchy.
Syntax
centerX
Type
String
Read/Write
Read + Write
Remarks
If the layoutType is set as voltmx.flex.FLOW_HORIZONTAL, the centerX property is measured from right edge of the left sibling widget.
Example
Platform Availability
- Available in the IDE
- iOS, Android, Windows, SPA, and Desktop Web
centerY Property
This property determines the center of a widget measured from the top bounds of the parent container.
The centerY property determines the vertical center of the widget’s bounding box. The value may be set using DP (Device Independent Pixels), Percentage, or Pixels. In freeform layout, the distance is measured from the top edge of the parent container. In flow-horizontal layout, the distance is measured from the top edge of the parent container. In flow-vertical layout, the distance is measured from the bottom edge of the previous sibling widget in the hierarchy.
Syntax
Type
String
Read/Write
Read + Write
Remarks
If the layoutType is set as voltmx.flex.FLOW_VERTICAL, the centerY property is measured from bottom edge of the top sibling widget.
Example
Platform Availability
- Available in the IDE
- iOS, Android, Windows, SPA, and Desktop Web
displayAsBook Property
This property is used to configure the first page of the PDF document as a book cover. This is will applicable when the displayMode is PDF_DISPLAY_MODE_TWO_UP_PAGE or PDF_DISPLAY_MODE_TWO_UP_PAGE_CONTINUOUS
Syntax
Read/Write
Read + Write
Remarks
The default value for this property is false.
Example
Platform Availability
- iOS
displayDirection Property
This property is used to configure the displayDirection of the PDFView widget. The following two patterns are available in the display direction for the PDFView widget.
- constants.PDF_DISPLAY_DIRECTION_VERTICAL: Sets the layout direction as vertical for the given display mode.
- constants.PDF_DISPLAY_DIRECTION_HORIZONTAL: Sets the layout direction as horizontal for the given display mode.
Syntax
Read/Write
Read + Write
Remarks
The default value for this property is constants.PDF_DISPLAY_DIRECTION_VERTICAL.
Example
Platform Availability
- iOS
displayMode Property
This property is used to configure the displayMode of the PDFView widget. The following four patterns are available in the display mode of PDFView.
- constants.PDF_DISPLAY_MODE_SINGLE_PAGE : Displays only one page with scrolling support.
- constants.PDF_DISPLAY_MODE_SINGLE_PAGE_CONTINUOUS: Displays the entire PDF document with scroll bar support to scroll between multiple pages.
- constants.PDF_DISPLAY_MODE_TWO_UP_PAGE: Displays two pages side by side with scrollbar support.
- constants.PDF_DISPLAY_MODE_TWO_UP_PAGE_CONTINUOUS: Displays the entire PDF document with 2 pages shown side by side.
Syntax
Read/Write
Read + Write
Remarks
The default value for this property is constants.PDF_DISPLAY_MODE_SINGLE_PAGE_CONTINUOUS.
Example
Platform Availability
- iOS
displayPageBreak Property
This property is used to configure the spacing between the pages (page break) of the PDFView widget.
Syntax
Read/Write
Read + Write
Remarks
The default value for this property is true.
Example
Platform Availability
- iOS
displayRTL Property
This property is used to configure RTL support for the PDFView widget. This property orders the pages from right to left when the displayMode is PDF_DISPLAY_MODE_TWO_UP_PAGE or PDF_DISPLAY_MODE_TWO_UP_PAGE_CONTINUOUS.
Syntax
Read/Write
Read + Write
Remarks
The default value for this property is false.
Example
Platform Availability
- iOS
enablePDFThumbnailView Property
This property is used to add the PDFThumbnailView to the PDfView widget. PDFThumbnailView is a custom view that contains a set of PDFPage thumbnails that a user can scroll over, interact with, and have these interactions drive view changes on PDFView.
Note: When you enable this property, you must pass the pdfThumbnailPosition and pdfThumbnailSizeInPercentage properties along with the respected values.
Syntax
Read/Write
Read + Write
Remarks
The default value for this property is false.
Example
Platform Availability
- iOS
enableZoom Property
This property specifies whether the Zoom (ability to change the scale of the view area) functionality must be enabled.
Syntax
Read/Write
Read + Write
Remarks
The default value for this property is false.
If set to true, the Zoom feature is enabled.
If set to false, the Zoom feature is disabled.
Example
Platform Availability
- iOS
height Property
It determines the height of the widget and measured along the y-axis.
The height property determines the height of the widget’s bounding box. The value may be set using DP (Device Independent Pixels), Percentage, or Pixels. For supported widgets, the height may be derived from either the widget or container’s contents by setting the height to “preferred”.
Syntax
Type
Number and String
Read/Write
Read + Write
Remarks
Following are the available measurement options:
- %: Specifies the values in percentage relative to the parent dimensions.
- px: Specifies the values in terms of device hardware pixels.
- dp: Specifies the values in terms of device independent pixels.
- default: Specifies the default value of the widget.
- voltmx.flex.USE_PREFERED_SIZE: When this option is specified, the layout uses preferred height of the widget as height and preferred size of the widget is determined by the widget and may varies between platforms.
Example
Platform Availability
- iOS
id Property
id is a unique identifier of PDFView widget consisting of alpha numeric characters. Every PDFView should have a unique id within a Form.
Syntax
Type
String
Read/Write
Read only
Example
Platform Availability
- iOS
info Property
A custom JSObject with the key value pairs that a developer can use to store the context with the widget. This will help in avoiding the globals to most part of the programming.
Syntax
Type
JSObject
Read/Write
Read + Write
Remarks
This is a non-Constructor property. You cannot set this property through widget constructor. But you can read and write data to it.
Info property can hold any JSObject. After assigning the JSObject to info property, the JSObject should not be modified. For example,
Example
Platform Availability
- iOS
interpolationQuality Property
This property is used to configure the interpolation quality for images drawn into the PDFView context. You can set the following 3 quality levels on the PDFView widget.
- constants.PDF_INTERPOLATION_QUALITY_NONE
- constants.PDF_INTERPOLATION_QUALITY_LOW
- constants.PDF_INTERPOLATION_QUALITY_HIGH
Syntax
interpolationQuality
Read/Write
Read + Write
Remarks
The default value for this property is NONE.
Example
Platform Availability
- iOS
isVisible Property
This property controls the visibility of a widget on the form.
Syntax
Type
Boolean
Read/Write
Read + Write
Remarks
The default value for this property is true.
If set to false, the widget is not displayed.
If set to true, the widget is displayed.
You can also set the visibility of a widget dynamically from code using the setVisibility method.
Example
Platform Availability
- iOS
left Property
This property determines the lower left corner edge of the widget and is measured from the left bounds of the parent container.
The left property determines the position of the left edge of the widget’s bounding box. The value may be set using DP (Device Independent Pixels), Percentage, or Pixels. In freeform layout, the distance is measured from the left edge of the parent container. In flow-vertical layout, the distance is measured from the left edge of the parent container. In flow-horizontal layout, the distance is measured from the right edge of the previous sibling widget in the hierarchy.
Syntax
Type
String
Read/Write
Read + Write
Remarks
If the layoutType is set as voltmx.flex.FLOW_HORIZONTAL, the left property is measured from right edge of the left sibling widget.
Example
Platform Availability
- Available in the IDE
- iOS, Android, Windows, SPA, and Desktop Web
maxHeight Property
This property specifies the maximum height of the widget and is applicable only when the height property is not specified.
The maxHeight property determines the maximum height of the widget’s bounding box. The value may be set using DP (Device Independent Pixels), Percentage, or Pixels. The maxHeight value overrides the preferred, or “autogrow” height, if the maxHeight is less than the derived content height of the widget.
Syntax
Type
Number
Read/Write
Read + Write
Example
Platform Availability
- Available in the IDE
- iOS, Android, Windows, SPA, and Desktop Web
maxScaleFactor Property
This property is used to set the maximum scaling factors for the PDF document. Assigning these values will implicitly turn off autoScales, and allows scaleFactor to vary between these min / max scale factors.
Syntax
Read/Write
Read + Write
Example
Platform Availability
- iOS
maxWidth Property
This property specifies the maximum width of the widget and is applicable only when the width property is not specified.
The Width property determines the maximum width of the widget’s bounding box. The value may be set using DP (Device Independent Pixels), Percentage, or Pixels. The maxWidth value overrides the preferred, or “autogrow” width, if the maxWidth is less than the derived content width of the widget.
Syntax
Type
Number
Read/Write
Read + Write
Example
Platform Availability
- Available in the IDE
- iOS, Android, Windows, SPA, and Desktop Web
minHeight Property
This property specifies the minimum height of the widget and is applicable only when the height property is not specified.
The minHeight property determines the minimum height of the widget’s bounding box. The value may be set using DP (Device Independent Pixels), Percentage, or Pixels. The minHeight value overrides the preferred, or “autogrow” height, if the minHeight is larger than the derived content height of the widget.
Syntax
Type
Number
Read/Write
Read + Write
Example
Platform Availability
- Available in the IDE
- iOS, Android, Windows, SPA, and Desktop Web
minScaleFactor Property
This property is used to set the minimum scaling factors for the PDF document. Assigning these values will implicitly turn off autoScales, and allows scaleFactor to vary between these min / max scale factors.
Syntax
Read/Write
Read + Write
Example
Platform Availability
- iOS
minWidth Property
This property specifies the minimum width of the widget and is applicable only when the width property is not specified.
The minWidth property determines the minimum width of the widget’s bounding box. The value may be set using DP (Device Independent Pixels), Percentage, or Pixels. The minWidth value overrides the preferred, or “autogrow” width, if the minWidth is larger than the derived content width of the widget.
Syntax
Type
Number
Read/Write
Read only
Example
Platform Availability
- Available in the IDE
- iOS, Android, Windows, SPA, and Desktop Web
opacity Property
Specifies the opacity of the widget. The value of this property must be in the range 0.0 (transparent) to 1.0 (opaque). Any values outside this range are fixed to the nearest minimum or maximum value.
Specifies the opacity of the widget. Valid opacity values range from 0.0 (transparent), to 1.0 (opaque). Values set to less than zero will default to zero. Values more than 1.0 will default to 1. Interaction events set on a transparent widget will still be fired. To disable the events, also set the “isVisible” property to “false”.
Syntax
Type
Number
Read/Write
Read + Write
Remarks
Note: This property has more priority compared to the values coming from the configured skin.
Example
Platform Availability
- Not available in the IDE.
- iOS, Android, Windows, SPA, and Desktop Web
parent Property
Helps you access the parent of the widget. If the widget is not part of the widget hierarchy, the parent property returns null.
Syntax
Read/Write
Read only
Remarks
Note: The property works for all the widgets inside a FlexForm, FlexContainer or FlexScrollContainer.
Example
Platform Availability
- Not available in the IDE
- iOS, Android, Windows, SPA, and Desktop Web
pdfThumbnailPosition Property
This property is used to set the position of the PDFThumbnailView for the PDfView. The following four patterns are available in the position of PDFThumbnailView.
- constants.PDF_THUMBNAIL_POSITION_BOTTOM: Set the PDFThumbnailView at the bottom of the PDFView.
- constants.PDF_THUMBNAIL_POSITION_TOP: Set the PDFThumbnailView at the top of the PDFView.
- constants.PDF_THUMBNAIL_POSITION_LEFT: Set the PDFThumbnailView at the left side of the PDFView.
- constants.PDF_THUMBNAIL_POSITION_RIGHT: Set the PDFThumbnailView at the right side of the PDFView.
Note: The Bottom and Top positions will be displayed the PDFThumbnailView in the horizontal direction. The Left and Right positions will be displayed the PDFThumbnailView in the vertical direction.
Syntax
Read/Write
Read + Write
Example
Platform Availability
- iOS
pdfThumbnailSizeInPercentage Property
This property is used to set the size of the PDFThumbnailView in percentage with respect to the height or width of the PDFView widget.
Note: When you provide the PDFThumbnailView position as Bottom or Top, the size of the PDFThumbnailView is calculated based on the height of the PDFView widget. When you provide the PDFThumbnailView position as Left or Right, the size of the PDFThumbnailView is calculated based on the width of the PDFView widget.
Syntax
Read/Write
Read + Write
Example
Platform Availability
- iOS
right Property
This property determines the lower right corner of the widget and is measured from the right bounds of the parent container.
The right property determines the position of the right edge of the widget’s bounding box. The value may be set using DP (Device Independent Pixels), Percentage, or Pixels. In freeform layout, the distance is measured from the left edge of the parent container. In flow-vertical layout, value is ignored. In flow-horizontal layout, the value is ignored.
The right property is used only if the width property is not provided.
Syntax
Type
String
Read/Write
Read + Write
Remarks
If the layoutType is set as voltmx.flex.FLOW_HORIZONTAL, the right property is measured from left edge of the right sibling widget. The horizontal space between two widgets is measured from right of the left sibling widget and left of the right sibling widget.
Example
Platform Availability
- Available in the IDE
- iOS, Android, Windows, SPA, and Desktop Web
skin Property
This property specifies the look and feel of the PDFView widget when it is not in focus. You can set the background color, the color of the border, and the width of the border.
Syntax
Read/Write
Read + Write
Example
Platform Availability
- iOS
thumbnailBackgroundColor Property
This property is used to set the background color for the PDFthumbnailView.
Syntax
Type
JSObject
Read/Write
Read + Write
Example
Platform Availability
- iOS
top Property
This property determines the top edge of the widget and measured from the top bounds of the parent container.
The top property determines the position of the top edge of the widget’s bounding box. The value may be set using DP (Device Independent Pixels), Percentage, or Pixels. In freeform layout, the distance is measured from the top edge of the parent container. In flow-vertical layout, the distance is measured from the bottom edge of the previous sibling widget in the hierarchy. In flow-horizontal layout, the distance is measured from the left edge of the parent container.
Syntax
Type
String
Read/Write
Read + Write
Remarks
If the layoutType is set as voltmx.flex.FLOW_VERTICAL, the top property is measured from the bottom edge of the top sibling widget. The vertical space between two widgets is measured from bottom of the top sibling widget and top of the bottom sibling widget.
Example
Platform Availability
- Available in the IDE
- iOS, Android, Windows, SPA, and Desktop Web
transform Property
Contains an animation transformation that can be used to animate the widget.
Syntax
Type
JSObject
Read/Write
Read + Write
Remarks
This property is set to the identify transform by default. Any transformations applied to the widget occur relative to the widget’s anchor point. The transformation contained in this property must be created using the voltmx.ui.makeAffineTransform function.
Example
This example uses the button widget, but the principle remains the same for all widgets that have a transform property.
Platform Availability
- iOS, Android, Windows, and SPA
url Property
This property is used to configure the URL and load a resource file in a PDFView widget.
Syntax
Type
String
Read/Write
Read + Write
Remarks
The default value for this property is blank.
This property is mandatory for loading the pdf documentation inside a PDFView.
Example
Platform Availability
- iOS
width Property
This property determines the width of the widget and is measured along the x-axis.
The width property determines the width of the widget’s bounding box. The value may be set using DP (Device Independent Pixels), Percentage, or Pixels. For supported widgets, the width may be derived from either the widget or container’s contents by setting the width to “preferred”.
Syntax
Type
Number, String, and Constant
Read/Write
Read + Write
Remarks
Following are the options that can be used as units of width:
- %: Specifies the values in percentage relative to the parent dimensions.
- px: Specifies the values in terms of device hardware pixels.
- dp: Specifies the values in terms of device independent pixels.
- default: Specifies the default value of the widget.
- voltmx.flex.USE_PREFERED_SIZE: When this option is specified, the layout uses preferred width of the widget as width and preferred size of the widget is determined by the widget and may varies between platforms.
Example
Platform Availability
- Available in the IDE
- iOS, Android, Windows, SPA, and Desktop Web
zIndex Property
This property specifies the stack order of a widget. A widget with a higher zIndex is always in front of a widget with a lower zIndex.
The zIndex property is used to set the stack, or layer order of a widget. Widgets with higher values will appear “over”, or “on top of” widgets with lower values. Widgets layered over other widgets will override any interaction events tied to widgets beneath. Modifying the zIndex does not modify the order of the widgets in the Volt MX Iris hierarchy, inside of a flexContainer or form. The zIndex property accepts only positive values.
Syntax
Type
Number
Read/Write
Read + Write
Remarks
The default value for this property is 1.
Note: Modifying the zIndex does not modify the order of the widgets inside the FlexContainer. If zIndex is same for group of overlapping widgets then widget order decides the order of overlapping. The last added widget is displayed on top.
From Volt MX Iris V9 SP2 FP7, developers can configure the Z Index value for a Responsive Web app as Auto or Custom. When the selected Z Index value is Auto, the default Z Index value of 1 is applied. When the selected Z Index value is Custom, developers can specify a desired numeric value.
Prior to the V9 SP2 FP7 release, the default value for the Z Index was 1. When developers imported any third-party libraries with the Z index set as Auto, content overflow was disabled as the value of Auto is less than 1.
Note: The Z Index value Auto is supported only when the Enable JS Library mode is configured as unchecked.
For existing components, the value of the Z Index is configured as 1 for the Native channel. For the Responsive Web channel, the Z Index will be set as Custom with 1 as the value.
For new components, the value of the Z Index is configured as 1 for the Native channel. For the Responsive Web channel, the Z Index will be set as Auto or 1 based on the project level settings.
Note: If ModalContainer property is set to true in any of the FlexContainer widget, the Z Index value of that container and all of its parent containers should be set to Custom.
voltmx.flex.ZINDEX_AUTO : Constant to configure the Z Index value as auto programmatically.
Example
Platform Availability
- Available in the IDE
- iOS, Android, Windows, SPA, and Desktop Web