Examples using Plugins

Click to expand/collapse hidden textMoveText Plugin

MoveText can change the colour of text: for example, to change the word 'Overdue' into red:

Define a tag (search string) by right-clicking on the word 'Overdue' and selecting New tag....
Select the Action tab of the 'Fields' dialog. Choose the movetext plugin from the list then click Configure: see To attach a plugin to a field.
Click the 'Red' tile in the Standard colours panel (see Colour change) then click OK.
Click to expand/collapse hidden textAddText Plugin

See www.pclviewer.com/FLASH/wm2.html for a demo showing how to add text to a PCL document and then export it as a PDF.

Click to expand/collapse hidden textAddImage Plugin

This demo shows how an image can be placed on every page of a document: www.pclviewer.com/FLASH/addimage.html

Click to expand/collapse hidden textAddFile Plugin

In this example, a field version-number supplies a value which addfile uses to select a file and page then place it in the document. A banner is also added 'directly' to the edge of the document page.

Define the banner field anywhere on the document page then select the Action tab of the 'Fields' dialog. Choose addfile from the 'Call plugin' list and click Configure (see To attach a plugin to a field).
Enter the banner filename on the Direct page of the plugin configuration dialog, e.g.
C:\LAYOUTS\BANNERA4.PDF
Select a corner of the page as the Reference point and choose the appropriate Scale and Rotation.
Tick Delete original field check-box then click OK.
Define another field containing the version-number then select the Dynamic page of the addfile configuration dialog. Set up the template for choosing the appropriate file, e.g.
Prefix C:\INSTRUCTIONS\MODEL
Suffix .PS
and specify the number of the page from the (PostScript) document to be used.
Set up the position for the page relative to the version-number field.
Click to expand/collapse hidden textBarCode Plugin

To see a demo of a barcode being added to a print file, see www.pclviewer.com/barcode.html

Click to expand/collapse hidden textOCR Plugin

Requires Microsoft Office to be installed

Sweep out the part of the page containing the image of the text; select New field... to define a field as usual. Then select OCR plugin from the list on the Action page: the plugin will extract the text and export it as the field's value.

For example, a field named OCRfield could be used in a composite field whose value was {OCRfield}. This field could have a tag so that its action and sub-fields would be conditional on the OCRfield having a particular value.

See a demo of optical character recognition on www.pclviewer.com/FLASH/ocr.html

Click to expand/collapse hidden textEvaluate Plugin
Example of an RS/2 expression

Select Expression and enter this string in the edit box:

s:=FieldValue('CNAME'); Font(8,'Arial',''); text(100,100,lowercase(trim(s)));

This example "expression" performs the following operations using the RS/2 script and some library functions.

a. Recover the value of field "CNAME" in the string identifier "s".
b. Engage the font "Arial 8pt".
c. Trim whitespace from the field value.
d. Convert the field value to lower case.
e. Display the result 1/6inch across and 1/6inch down from the top-left corner of the page.

Tick the Modifies the page checkbox – use of the "TEXT" procedure in the RS/2 expression re-draws part of the page, thus changing the appearance of the page.

This expression contains one identifier and two procedure statements – any more would be unwieldy in a single line. When lots of statements are required it is better to place them in a separate RS2 file: select 'File name' instead of 'Expression' and enter the file path and name in the edit box.

Example of an isolated function that returns a new field value:

Select Expression and enter this string in the edit box
NOW('ddd mmm yyyy hh:mm:ss.zzz')

The RS/2 "NOW" function formats the current date/time.

[The RS/2 identifier "ASYMBOL" is used to pass the return parameter. The example above is a shorthand for
"ASYMBOL:=NOW('ddd mmm yyyy hh:mm:ss.zzz');"