Highlighted
Absent Member.
Absent Member.
259 views

[archive] Underscoring Print Lines

[Migrated content. Thread originally posted on 03 December 2007]

Hello
Is there any way to underscore a print line so that
Move "Print This" To Print-Line Write Print Line After 1
will appear Print This
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Underscoring Print Lines

You do not specify what OS you are on, but I presume it is Windows. To accomplish this on Windows, you need to have two fonts.
E.g.:
Open the print job.
Initialize WFONT-FACE-DATA.
Set font features as desired (font name, size, etc.)
Set WFDEVICE-WIN-PRINTER to true
Load font as font-handle-1.
Set WFONT-UNDERLINE to true.
Load font as font-handle-2.
Use WIN$PRINTER and WINPRINT-SET-FONT using font-handle-1.
Print your text, when you come to the part where you want underline, use WIN$PRINTER and WINPRINT-SET-FONT using font-handle-2.
Print the text you want underlined.
Use WIN$PRINTER and WINPRINT-SET-FONT using font-handle-1 to go back again.
Iterate as needed.
Close print.

Note; This will only work with -P SPOOLER. If you use -P SPOOLER-DIRECT you will have to send escape sequences.

For an example of how to print with fonts, see winspool.cbl in the sample directory of your installation.


If you think this is tedious and awquard, this is by design from Microsoft, not our invention.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Underscoring Print Lines

If you are printing directly to the printer (as opposed to using the Windows print spooler), then you can write your print line, and then you can write a line of underscores "_" after 000 lines. You will get nice looking underlines regardless of the operating system being used.

For example:

Write print-rec from "There once was a printer from Nantucket"
after 002 lines.
Write print-rec from "__________________________________"
after 000 lines.

it is indeed the old fashioned way, but it is effective.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.