Back Forward Using the Image Viewer

About the Image Viewer

The Image Viewer tool enables users with a TWAIN scanner attached to their workstations to scan one or more documents and attach them as TIFF files to work objects. A scanned document comprises a page image within each TIFF file. Documents are scanned in as grayscale images with a dots per inch (DPI) setting of 150.

The Viewer is started with a flow action rule called Work-.AttachFromScanner. The tool is an Active control named PegaImgViewer, which provides a set of options for manipulating the image.

Typical scenario

In an expense report application, users can enter line items and scan receipts for each item. This creates a one-to-one relationship between a scanned attachment and a line item. During verification, each line item and its receipt can be displayed for easy and efficient review.

Working with the Image Viewer

To set up the Image Viewer in an application, include the standard local flow action Work-.AttachFromScanner in the appropriate assignment. At runtime, a user invokes and uses the tool as follows:

  1. Drop-down listIn the work form, the user selects Attach Scanned Document in the Take Action field. The Image Viewer appears.
  2. The user places the document in the scanner and selects the correct page size using the page size drop-down list.
  3. If there is more than one scanner attached to the workstation, the user clicks the  Select Source button and selects a scanner from the list.
  4. The user clicks the  Scan button. This creates an image in the Viewer, which can be edited using the Image Viewer toolbar options. Text of up to 60 characters can be entered in the Note box. When a document is scanned, a page in the file is created.
  5. If there is another document, the user scans it. The tool then prompts the user whether to scan another document. This prompt can be turned off using the zzz setting.
    Each new page is appended to the previous page. The user can navigate between the pages using options in the toolbar. Page images can be displayed and edited in any order.
  6. To replace a scanned page with another one, the user displays original page and scans the new document by clicking the  Replace Current button. This page overwrites the original one.
  7. When the user is satisfied with the page images, she clicks the  Save button. This saves the edits to the images and creates the TIFF file.
  8. The user clicks the  Submit button to send the work object to the next process. The scanned attachments can be opened in the History/Attachments form, which are grouped as ScanDocument items. When the attachment is opened, the Image Viewer displays the pages; the images are set as read-only.

Image Viewer toolbar

The Image Viewer includes a toolbar for manipulating an image. The following table describes the functions on the toolbar.

Icon

Name

Description

zzz Print Prints the image.
zzz Copy Copies the image so that it can be pasted into another document.
Fit Horizontal Fit horizontal Enlarges the image to the width of the viewer window. (Some portion of the bottom of the image may not be visible)
zzz Fit vertical Enlarges the image to the height of the viewer window. (Some portion of the right of the image may not be visible)
Fit best Best fit Enlarges the image as much as possible within the viewer window
zzz Zoom in Enlarges the image for viewing.
zzz Zoom out Reduces the image for viewing.
zzz First page If there are multiple images in one attachment (multi-page image), displays the first image.
zzz Next page If there are multiple pages in one attachment, moves from the current page to the next one.
zzz Previous page If there are multiple pages in one attachment, moves from the current page the previous one.
zzz Goto page When scanning multiple pages in one attachment, allows you to specify the page number you want to view.
zzz Pan Allows you to box a section within an image so that it fills the display window.
zzz Refresh Returns the image to original display and cancels all edits To display this icon, slide the bar on the right hand side of Pan to the right.
zzz Rotate left Rotates the image 90 degrees counter-clockwise.
zzz Rotate right Rotates the image 90 degrees clockwise.
zzz Flip horizontally Inverts the image horizontally (mirror image).
zzz Flip vertically Inverts the image vertically (upside down)
zzz Invert color Displays a negative image.
zzz Convert to gray scale Changes the image to up to 256 shades of gray.
zzz Sharpen the image Changes the image sharpness based upon a percentage value you enter
Enabled Adjust contrast Changes the image contrast based upon a percentage value you enter
zzz Insert scanned document Opens a selection window so that you can pick from a multiple scanners attached to a workstation. When a scanner is selected, the scan is performed.

You can also access a selection-list of these functions by right-clicking in the Image Viewer form.

Definitions ActiveX control, attachment, attachment type
Related topics About the Scan Station tool
Understanding work object attachments

UpTools, accelerators, and wizards