Kbase P114286: How to print with a different font for one procedure
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  13/04/2006 |
|
Status: Unverified
GOAL:
How to print with a different font for one procedure
GOAL:
How to configure PrinterFont setting on-the-fly to print with a different font for one procedure
GOAL:
How to modify the PrinterFont setting in the Windows Registry on-the-fly
GOAL:
How to modify the PrinterFont setting in a Progress .INI file on-the-fly
FACT(s) (Environment):
Windows
FIX:
Option #1
Modify the Progress Registry settings on-the-fly to use the PrinterFont setting. Modify the Progress version noted to match the current Progress installation.
/* Sample #1 */
PROCEDURE runPrintTest:
OUTPUT TO printer.
MESSAGE "This is a test".
OUTPUT CLOSE.
END PROCEDURE.
/* Use Default Font */
RUN runPrintTest.
LOAD "SOFTWARE\PSC\PROGRESS\9.1D\" BASE-KEY "HKEY_CURRENT_USER".
/* Set PrinterFont */
PUT-KEY-VALUE SECTION "Startup" KEY "PrinterFont" VALUE "Courier New, size=8, bold".
USE "SOFTWARE\PSC\PROGRESS\9.1D\".
/* Use new PrinterFont setting */
RUN runPrintTest.
/* Reset PrinterFont */
PUT-KEY-VALUE SECTION "Startup" KEY "PrinterFont" VALUE "".
UNLOAD "SOFTWARE\PSC\PROGRESS\9.1D\".
/* Use Default Font */
RUN runPrintTest.
Option #2
Modify the .INI file on-the-fly to use the PrinterFont setting. This sample assumes that -BASEKEY "INI" -ININAME "<path to .ini file>" have been specified as client startup parameters.
/* Sample #2 */
PROCEDURE runPrintTest:
OUTPUT TO printer.
MESSAGE "This is a test".
OUTPUT CLOSE.
END PROCEDURE.
/* Use Default Font */
RUN runPrintTest.
/* Set PrinterFont */
PUT-KEY-VALUE SECTION "Startup" KEY "PrinterFont" VALUE "Courier New, size=8, bold".
USE "progress.ini".
/* Use new PrinterFont setting */
RUN runPrintTest.
/* Reset PrinterFont */
PUT-KEY-VALUE SECTION "Startup" KEY "PrinterFont" VALUE "".
USE "progress.ini".
RUN runPrintTest.