Skip to end of metadata
Go to start of metadata

Important

This page refers to the IA Labs PDF Viewer module. This module is only available in Ignition versions 7.7, 7.6, and 7.5. For information on the PDF Viewer component avalabie in versions 7.8 or greater, please see the PDF Viewer page.



The PDF Viewer showing a schematic in a maintenance manual.

Description

The PDF Viewer component displays a PDF that exists as a file in some accessible filesystem, or as a URL. Note that this component is simply for viewing existing PDFs. To create dynamic reports, use the Report Viewer component.

This component is typically used in conjunction with the File Explorer component, in order to create a PDF viewing window. See the File Explorer documentation, as well as the File Explorer and PDF Viewer page for instructions on how to put these two components together.

This component is not as high-quality as Adobe Reader. This component can only be guaranteed to correctly display reports generated by the Report Viewer. In practice, it is able to view many PDFs, but it does have trouble with some, especially PDFs created by AutoCAD.


The PDF Viewer component will accept raw bytes of information in addition to a file location. See Example - Storing Files in a Database.

 

NameData TypeFlags
accessibleContextAccessibleContextbindable
actionMapActionMapbindable
alignmentXfloatbindable
alignmentYfloatbindable
ancestorListenersAncestorListener[]bindable
antialiasbooleanbindable
appContextVisionClientContextbindable
autoscrollsbooleanbindable
backgroundColorbindable
backgroundSetbooleanbindable
baselineResizeBehaviorBaselineResizeBehaviorbindable
borderBorderbindable
boundsRectanglebindable
bytesbyte[]bindable
classClassnone
colorModelColorModelbindable
componentComponentbindable
componentCountintbindable
componentListenersComponentListeners[]bindable
componentOrientationComponentOrientationbindable
componentPopupMenuJPopupMenubindable
componentsComponents[]bindable
containerListenersContainerListeners[]bindable
cursorCursorbindable
cursorCodeintbindable
cursorSetbooleanbindable
dataQualityintbindable
debugGraphicsOptionsintbindable
displayablebooleanbindable
doubleBufferedbooleanbindable
dropTargetDropTargetbindable
dynamicPropsTreeMapbindable
enabledbooleanbindable
filenameStringbindable
focusCycleRootbooleanbindable
focusCycleRootAncestorContainerbindable
focusListenersFocusListener[]bindable
focusOwnerbooleanbindable
focusTraversablebooleanbindable
focusTraversalKeysSetbindable
focusTraversalKeysEnabledbooleanbindable
focusTraversalPolicyFocusTraversalPolicybindable
focusTraversalPolicyProviderbooleanbindable
focusTraversalPolicySetbooleanbindable
focusablebooleanbindable
fontFontbindable
fontSetbooleanbindable
foregroundColorbindable
foregroundSetbooleanbindable
graphicsGraphicsbindable
graphicsConfigurationGraphicsConfigurationbindable
heightintbindable
hierarchyBoundsListenersHierarchyBoundsListener[]bindable
hierarchyListenersHierarchyListener[]bindable
ignoreRepaintbooleanbindable
inheritsPopupMenubooleanbindable
inputContextInputContextbindable
inputMapInputMapbindable
inputMethodListenersInputMethodListener[]bindable
inputMethodRequestsInputMethodRequestsbindable
inputVerifierInputVerifierbindable
insetsInsetsbindable
keyListenersKeyListener[]bindable
layoutLayoutManagerbindable
lightweightbooleanbindable
localeLocalebindable
locationPointbindable
locationOnScreenPointbindable
managingFocusbooleanbindable
maximumSizeDimensionbindable
MaximumSizeSetbooleanbindable
minimumSizeDimensionbindable
minimumSizeSetbooleanbindable
mouseListenersMouseListener[]bindable
mouseMotionListenersMouseMotionListener[]bindable
mousePostionPointbindable
mouseWheelListenersMouseWheelListener[]bindable
nameStringbindable
nextFocusableComponentComponentbindable
opaquebooleanbindable
optimizedDrawingEnabledbooleanbindable
paintingForPrintbooleanbindable
paintingTilebooleanbindable
parentContainerbindable
peerComponentPeerbindable
preferredSizeDimensionbindable
perferredSizeSetbooleanbindable
printingDPIintbindable
printingModeintbindable
propertiesDynamicPropertyDescriptor[]bindable
propertyChangeListenersPropertyChangeListener[]bindable
registeredKeyStrokesKeyStroke[]bindable
requestFocusEnabledbooleanbindable
retainPageOnReloadbooleanbindable
rootPaneJRootPanebindable
showingbooleanbindable
sizeDimensionbindable
stylesDatasetbindable
toolTipTextStringbindable
toolkitToolkitbindable
topLevelAncestorContainerbindable
transferHandlerTransferHandlerbindable
treeLockObjectbindable
validbooleanbindable
validateRootbooleanbindable
verifyInputWhenFocusTargetverifyInputWhenFocusTargetbindable
vetoableChangeListenersVetoableChangeListener[]bindable
visiblebooleanbindable
visibleRectRectanglebindable
widthintbindable
xintbindable
yintbindable
zoomFactorfloatbindable
UIPanelUIbindable
UIClassIDStringbindable

 

 

Scripting
Scripting Functions
 .loadPDFBytes(bytes, name)

 

  • Description

This function will pass in the bytes of a PDF and load them into the PDF Viewer component. Please see Storing Files in a Database for more details

  • Parameters

string bytes - The bytes of the PDF to be displayed on the component

string name - The name of the PDF

 

  •  Return

Nothing

  • Scope

Client

 .print(useDialog)
  • Since 7.8.2

  • Description

This function will print the PDF.

  • Parameters

boolean- If true, shows the user a print dialog. Default is true [optional]

  • Return

Nothing

  • Scope

Client

 .setZoomFactor(zoomFactor)
  • Since 7.8.2

  • Description

This function will set the current zoom level of the PDF, adjusted to stay within the minimum / maximum zoom range. Will zoom in on center of page.

  • Parameters

float- Zoom factor to use. 1.0 is no zoom.

  • Return

Nothing

  • Scope

Client

Extension Functions

This component does not have extension functions associated with it.

Event Handlers
 mouse
 mouseClicked

This event signifies a mouse click on the source component. A mouse click the combination of a mouse press and a mouse release, both of which must have occurred over the source component. Note that this event fires after the pressed and released events have fired.

PropertyDescription
sourceThe component that fired this event
buttonThe code for the button that coused this event to fire.
clickCountThe number of mouse clicks associated with this event.
xThe x-coordinate (with respect to the source component) of this mouse event.
yThe y-coordinate (with respect to the source component) of this mouse event.
popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.

 mouseEntered

This event fires when the mouse enters the space over the source component.

PropertyDescription
sourceThe component that fired this event
buttonThe code for the button that coused this event to fire.
clickCountThe number of mouse clicks associated with this event.
xThe x-coordinate (with respect to the source component) of this mouse event.
yThe y-coordinate (with respect to the source component) of this mouse event.
popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.

 mouseExited

This event fires when the mouse leaves the space over the source component.

PropertyDescription
sourceThe component that fired this event
buttonThe code for the button that coused this event to fire.
clickCountThe number of mouse clicks associated with this event.
xThe x-coordinate (with respect to the source component) of this mouse event.
yThe y-coordinate (with respect to the source component) of this mouse event.
popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.

 mousePressed

This event fires when a mouse button is pressed down on the source component.

PropertyDescription
sourceThe component that fired this event
buttonThe code for the button that coused this event to fire.
clickCountThe number of mouse clicks associated with this event.
xThe x-coordinate (with respect to the source component) of this mouse event.
yThe y-coordinate (with respect to the source component) of this mouse event.
popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.

 mouseReleased

This event fires when a mouse button is released, if that mouse button's press happened over this component.

PropertyDescription
sourceThe component that fired this event
buttonThe code for the button that coused this event to fire.
clickCountThe number of mouse clicks associated with this event.
xThe x-coordinate (with respect to the source component) of this mouse event.
yThe y-coordinate (with respect to the source component) of this mouse event.
popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.

 mouseMotion
 mouseDragged

Fires when the mouse moves over a component after a button has been pushed.

PropertyDescription
sourceThe component that fired this event
buttonThe code for the button that coused this event to fire.
clickCountThe number of mouse clicks associated with this event.
xThe x-coordinate (with respect to the source component) of this mouse event.
yThe y-coordinate (with respect to the source component) of this mouse event.
popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.

 mouseMoved

Fires when the mouse moves over a component, but no buttons are pushed.

PropertyDescription
sourceThe component that fired this event
buttonThe code for the button that coused this event to fire.
clickCountThe number of mouse clicks associated with this event.
xThe x-coordinate (with respect to the source component) of this mouse event.
yThe y-coordinate (with respect to the source component) of this mouse event.
popupTriggerReturns True (1) if this mouse event is a popup trigger. What constitutes a popup trigger is operating system dependent, which is why this abstraction exists.
altDownTrue (1) if the Alt key was held down during this event, false (0) otherwise.
controlDownTrue (1) if the Control key was held down during this event, false (0) otherwise.
shiftDownTrue (1) if the Shift key was held down during this event, false (0) otherwise.

 propertyChange
 propertyChange

Fires whenever a bindable property of the source component changes. This works for standard and custom (dynamic) properties.

PropertyDescription
sourceThe component that fired this event
newValueThe new value that this property changed to.
oldValueThe value that this property was before it changed. Note that not all components include an accurate oldValue in their events.
propertyNameThe name of the property that changed. NOTE: remember to always filter out these events for the property that you are looking for! Components often have many properties that change.

 


IULocgo


PDF Viewer

 

 

  • No labels