Consultor Eletrônico



Kbase P69331: 4GL/ABL: How to specify the font used with a windows network printer?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/3/2008
Status: Verified

GOAL:

4GL/ABL: How to specify the font used with a windows network printer?

FACT(s) (Environment):

Windows
Progress 8.x
Progress 9.x
OpenEdge 10.x

FIX:

The following steps specify the font used with a windows network printer:
1. Connect an LPT port the network printer using the NET USE DOS command:

NET USE LPT1 \\ServerName\NetworkPrinterName

If ServerName contains spaces, use quotation marks around the entire Server Name from the double backslash (\\) to the end of the computer name (for example, "\\Server Name\Network Printer Name").

2. Confirm that the following registry value:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\PrinterPorts

in your key: \\ServerName\NetworkPrinterName is "winspool,LPT1:" If not set it to "winspool,LPT1:"

3. In the [Startup] section of the progress.ini, specify a printer font to use with on the corresponding LPTn port using the syntax:

PrinterFontn=typeface, [ size=screen-point-size ]

For example, the following two entries defines an 8-point Times as the default font for the LPT1 printer and 12-point Helvetica for the LPT2 printer:

PrinterFont1=Times, size 8
PrinterFont2=Helvetica, size 12

4. Use the 4GL statement OUTPUT TO LPTn to send the output in the desired font to the desired printer:

OUTPUT TO LPT1.
DISPLAY "This is a test".
OUTPUT CLOSE.