Replace Filter in FTSpooler

Note: This software is supplied with three months warranty, with no ongoing support or charges. It is designed for single-byte encoding systems only.

Introduction

This filter is used to modify FormTrap input or output. Data to change is recognised by a character string, with optional replacement of that character string. To delete, use " " as the empty replace string.

Top

Components

There are two components to the filter:

  1. replace.exe - the executable program
  2. replace.ini - stores character sequences to be identified and replaced and must be in the same directory as the program.

Both are normally in the same %ftinst% folder.

Top

Format of replace.ini

replace.ini is built in sections. Sections are set up in the following format:

[section]
"old_string" "new_string" all/first

Where

  • section is a name to identify this operation;
  • "old string" is the string to be replaced;
  • "new string" is the replacement; and
  • <all/first$gt; defines whether the replacement should occur on only the first instance or all instances of the string in the file.

For example, a section to select output bin 2, normal on the HP 9040 with the optional HP Q5693A 8-bin mailbox is shown below:

[OutputBin2Normal]
"@PJL COMMENT" "@PJL SET OUTBIN=OPTIONALOUTBIN2\0D\0A@PJL SET
FINISH=NONE\0D\0A@PJL COMMENT" First       (all on one line)

Special Characters: Unprintable characters (eg. escape, form feed) are represented by using a backslash "\" character followed by the ASCII representation of the character in hexidecimal format. For example, the escape character is represented as "\1b" - any case for characters a-f (A-F).

Multiple "old string" "new string" "all/first" lines may be provided and are inspected in the order given. Already processed replacement strings are NOT reinspected.

Top

Usage - Command Line

Command line is the norm for Unix/Linux and may be used for Windows outside of the normal Spooler procedure. You can use "replace" on any file, outside of FormTrap. The filter takes three parameters:

input file
output file
section name.

For example:

replace "c:\files\input.pcl" "c:\formtrap\output.pcl" short

Top

Installation within Spooler V7 via Setup

This is the norm for the replace filter, where each Section is a different filter within Setup. Filters are normally invoked as External input (and MUST precede the "Western" filter) or invoked as Post formatting filter for output manipulation (normally to drive special features of laser printers).

Version 7 Installation, SBE and Enterprise:

  • Copy replace.exe and replace.ini to the %ftinst% folder.
  • Define each different required Section in Setup, Filters (see the manual page via F1 and below) and invoke via Queues, Filters tab.
  • This is the Setup Filters screen for the filter to output to Bin 2, Normal for the HP 9040 with HP Q5693A 8-bin mailbox attached.
  • HP9040 Bin 2 Normal output Selected

Top