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.... |
▪ | Click the 'Red' tile in the Standard colours panel (see Colour change) then click OK. |
|
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. |
▪ | 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. |
o | 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. |
|
To extract a reference number contained in a QR Code 2D bar-code on a page and add it to a new sentence on the page.
• | Define a field (named, for example, code) around the QR code and configure it to be read by QRCode Reader Plugin plugin. |
• | Define another field (named, for example, text) at some convenient location on the page and configure it to use the AddText plugin. |
o | Set up the new sentence (e.g. This is your reference number {code}). Position it relative to a corner of the page or the location of the text field itself. |
|
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. |
o | Recover the value of field "CNAME" in the string identifier "s". |
o | Engage the font "Arial 8pt". |
o | Trim whitespace from the field value. |
o | Convert the field value to lower case. |
o | Display the result 1/6inch across and 1/6inch down from the top-left corner of the page. |
• | Tick the Modifies the page check-box – 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');"
|
Links
About Plugins
RS/2 functions and procedures