Using Embedded Print Codes
This document includes the following sections:
Section 1. Introduction
Section 2. Command Parser Logic
Section 3. Sending Embedded
Escape Codes
Section 4. Embedded Code Examples
Section 5. Installing Queue
Monitor Programs
5a. Monitoring Windows NT
Print Queues (NT 3.51 and 4.0)
5b. Monitoring NetWare Print
Queues
Section 6. How To Get Your Print
Jobs Into the Queue
Section 7. Troubleshooting Errors
Section 1. Introduction
At a Windows NT server or NetWare 3.x/4.x server, you can
configure the Facsys print services to monitor a print queue
and respond to embedded codes within a print stream.
Embedded print codes are special commands supported by
Facsys that permit users to insert special character
sequences within print jobs. As a result, users gain the
ability to send faxes without having to use any platform
specific applications.
Because the embedded print commands are handled by the
use of print queues, any application that can print data to
a Windows NT or Novell NetWare print queue can easily add
these special embedded codes to create robust fax
applications without having to deal with complex APIs and/or
programming languages. When information is sent to the fax
server via Windows NT or Novell print services, Facsys
extracts the appropriate coded data from the print queue and
uses it to prepare outbound fax envelopes automatically.
Many Facsys users have created such applications as batch
files, special custom programs, or batch print jobs
downloaded from mainframe computer systems. Any application
capable of printing to a network print queue can easily send
faxes using this special and unique feature of Facsys.
The print queue server/monitor applications are written
for Windows NT as a print monitor and for Novell NetWare as
an NLM. Installation of these print queue server/monitors is
discussed later in this document.
Support for Earlier Versions of Facsys:
Though some new embedded commands are supported by
Facsys for Windows NT 4.x, all embedded command
applications written for earlier versions of Facsys will
work without modification.
Back to Top
Section 2. Command Parser Logic
The parser behaves like a print stream filter removing
all embedded information and writing the original print data
to an output file for further processing. All embedded codes
are translated into destination structures for use by the
implementation internally.
Embedded codes can be inserted anywhere in the print
stream since the entire stream is parsed from start to
finish. Several forms of escapes are supported along with
implied logic when creating destinations.
Escape codes can be the ASCII ESC (decimal 27) or the
caret symbol '^'. Since some applications find it hard to
embed non-printable characters, this additional escape has
been provided.
A left square bracket ‘[’ must follow the escape. Because
no such escape character exists in any known printer command
language, this escape is unique to the Facsys
implementation.
Following the ‘[’ you add special designators that behave
as follows:
B - Billing or matter code
C - Cover page message
Q - Quick message (cover message with no print data)
D - Dial number
M - Message or subject
N - Name of destination
O - Object name originating the print job (the UserID
of the sender)
P - Priority
R - Indicate end of record
S - Sender name
T - Schedule date and time
NOTE: You must enter the escape codes as upper
case to help limit the possibility of faulty detection
during parsing. Also, the escape must contain at least
one destination (the D designator).
Back to Top
Section 3. Sending Embedded Escape Codes
Printer escapes are embedded into the print stream which
may contain no less than one destination. There are no
limitations (other than memory) to the number of
destinations per given print job.
The only required embedded field designator is the ‘D’
for dialing.
All fields must be terminated by one of the following
conditions:
- By the terminating escape ESC[ or
^]
- By a terminating NULL
- By a continuation escape sequence
- By a record termination
Only the dial number and destination name fields are
considered dynamic. That is, only these fields are reset
when an end of record has been detected. Other escapes such
as priority, schedule time, cover page, etc. will remain in
effect from the point at which it was detected until
otherwise specified.
Back to Top
Section 4. Embedded Code Examples
A.
^[D555-1212^[NJohn Jones^]....... print stream.......
Target: John Jones @ 555-1212
B.
^[D555-1212^[NJohn Jones^[D271-1044^]
Target: John Jones @ 555-1212
Target: 271-1044
Use of additional dialing sequence is an "implied"
end of record.
C.
^[D555-1212^[NJohn Jones^[D271-1044^[NMary
Smith^[P1^[D271-9572^[NMickey Mouse^]
Target: John Jones @ 555-1212
Target: Mary Smith @ 271-1044 (Priority=1)
Target: Mickey Mouse @ 271-9572 (Priority=1)
D.
^[D555-1212^[T01/01/98 2:00p^]
Target: 555-1212 (Scheduled for 1/1/98 2:00p)
E.
^[D555-1212^[NJohn Jones^[NMary Smith^[D271-9572^]
Target: Mary Smith @ 555-1212
Target: 271-9572
The above example will cause the parser to overwrite the
original name (John Jones) since the dialing sequence was
used after the next name. To prevent this behavior, the
dialing sequence ESC[D should always be used first to imply
a new record or use the ESC[R record terminator sequence.
F.
^[D555-1212^[NJohn Jones^[R^[NMary Smith^[D271-9572^]
Target: John Jones @ 555-1212
Target: Mary Smith @ 271-9572
This corrects record overwrites as shown in Example E
above.
Back to Top
Section 5. Installing Queue Monitor Programs
Before you can send and process embedded print commands
with your Facsys server, you must install a print queue
server/monitor which will extract embedded commands from
print jobs and send them to a designated Facsys server.
5a. Monitoring Windows NT Print Queues (NT 3.51 and
4.0)
To install a queue server/monitor on a Windows NT server,
you need to copy the FXQMON.DLL and FXQMSG.DLL modules from
the FACSYS\UTILS directory to your Windows NT server’s
WINNT\SYSTEM32 directory.
FOR WINDOWS NT 3.51
To install and configure a "Facsys Print Queue" printer
on Windows NT 3.51:
1. From the FACSYS\UTILS directory, run the following
command:
ADDQMON ADD
2. Run Print Manager from the Main program group.
3. From the Printer menu, select the Create Printer
command. (Note: Do not select the Connect Printer command.)
The Create Printer dialog box is displayed.
4. From the Driver: field drop down list, select a Facsys
supported print driver (e.g. HP LaserJet 4, HP LaserJet 4/4M
PS 300).
5. From the Print To: field drop down list, select
‘Other...’. The Print Destinations dialog box is displayed.
6. Highlight ‘Facsys Print Queue’ and click the OK
button. You will be prompted for the name of your fax
server.
NOTE: If ‘Facsys Print Queue’ is not an available
option, run ADDQMON ADD again and configure the print
queue.
7. Enter the computer name of your fax server, and click
OK. The Printer Setup dialog box is displayed.
8. To close the Printer Setup dialog box, click the OK
button.
NOTE: It is strongly recommended that the installed
printer be set to print at 300 DPI rather than 600 DPI,
which is the default resolution of many of the HP
LaserJet series of printer drivers.
FOR WINDOWS NT 4.0
To install and configure a "Facsys Print Queue" printer
on Windows NT 4.0:
1. From the FACSYS\UTILS directory, run the following
command:
ADDQMON ADD
2. From the Windows NT Start menu, select
Settings\Printers.
3. In the Printers window, double click on the Add
Printer item.
4. In the Add Printer Wizard, select My Computer and
click the Next button.
5. Click the Add Port button, highlight 'Facsys Print
Queue' and click New Port.
NOTE: If ‘Facsys Print Queue’ is not an available
option, run ADDQMON ADD again and configure the print
queue.
6. Enter the name of the fax server and click Close. Then
click Next.
7. From the Manufacturers list, select HP. Then highlight
a Facsys supported print driver (e.g., HP LaserJet 4, HP
Laserjet 4M PostScript). Click the Next button to continue.
8. If you are prompted to keep your existing print
driver, click Yes to keep the current driver and then click
Next.
9. Enter the printer name you wish to assign.
10. Answer No for Windows programs to use this printer as
default and click Next.
11. Select Shared, enter the share name and click Next.
12. Answer No for printing a test page and click Finish.
Back to Top
5b. Monitoring NetWare Print Queues
To install a queue server/monitor on a Novell NetWare
server, you will need to copy the QSERVER.NLM module from
the FACSYS\UTILS directory to your NetWare server’s
SYS:SYSTEM directory.
The print queue server has been tested on the following
NetWare platforms: NetWare 3.11, 4.01, 4.02, and 4.10.
To load the queue server NLM, type the following command
from the NetWare server console:
LOAD QSERVER PRINTQ_FAX FAX1
The above example attempts to load the QSERVER.NLM which
will service jobs from print queue ‘PRINTQ_FAX’ and
re-direct faxes to Facsys server ‘FAX1’.
If any problems are encountered during initialization,
the QSERVER NLM will report all errors to the console
display.
NOTE: The QSERVER.NLM module will attempt to
communicate with the Facsys server using the NWLink
IPX/SPX compatible transport installed on the NT
workstation where your Facsys server is installed.
Located on the fax server, the Optus NetWare Named Pipes
service must also be operational.
Back to Top
Section 6. How To Get Your Print Jobs Into the Queue
The method by which you send your print jobs to the print
queue depends on the application from which you are
"printing" and also the server on which the Facsys print
queue resides.
For those applications that do have an "Insert Print
Code" capability, you can simply use the File Print command
to send your document to the Facsys print queue. For
example, in Word for Windows you can enter the embedded
codes into your document with the "Insert Print Field"
command. The PRINT field is designed to download commands to
the printer.
If your application does not have an "Insert Print Code"
capability and you have entered the embedded codes into your
document manually, you must copy the file to the print queue
from DOS. (If you print the document from the application,
the entire file will be converted into PCL format!)
To copy your file to a print queue on a Novell server,
execute:
NPRINT FILE_NAME Q=QUEUE_NAME
where FILE_NAME is the name of your file and QUEUE_NAME
is the name of your print queue. For detailed information on
Novell's NPRINT and CAPTURE commands, refer to your Novell
documentation.
To copy your file to a print queue on a Windows NT
server, execute:
COPY /B FILE_NAME LPT#
where FILE_NAME is the name of your file and LPT# is the
LPT device to which you print.
Back to Top
Section 7. Troubleshooting Errors
You cannot delete a print queue that has print jobs in
it. If you try to delete a print queue that is active, you
will get an error #170. Purge all print jobs from the queue,
and then delete the print queue.
Back to Top
|