Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Cbourque_gts-genesis Absent Member.
Absent Member.
1976 views

Printing 16 CPI

Jump to solution

I am a long time Cobol programmer but new to MicoFocus.  I am trying to get a report to print 176 characters on letter paper (16 cpi) without bypassing the windows print driver.  I have looked through the documentation but I just can not get it to work.

0 Likes
1 Solution

Accepted Solutions
DougP Outstanding Contributor.
Outstanding Contributor.

RE: Printing 16 CPI

Jump to solution

The attached sample program demonstrates 150 characters per line printing.  Modify it to load a different font that will provide 176 characters per line.  You might need to experiment with which font and size will give what you need.

View solution in original post

0 Likes
5 Replies
Micro Focus Expert
Micro Focus Expert

RE: Printing 16 CPI

Jump to solution

Are you using Micro Focus Visual COBOL, or Net Express, or are you using Extend, as in extend 9 or extend 10? Are you embedding your own control codes? Can you provide a small example of what you are doing. With Extend .. you can under Windows, you may print directly to the printer by defining PRINTER in the configuration file as "-D PRN or use "-P SPOOLER". If you want to control the format of the printout yourself using embedded control codes, simply assign your print file to "-P SPOOLER-DIRECT" . There seems to have been some changes to Windows 10 involving the spooler, so you might want to tell us where (what Windows systems ) you're trying to print on.

0 Likes
Cbourque_gts-genesis Absent Member.
Absent Member.

RE: Printing 16 CPI

Jump to solution

I am upgrading to the 10.0.1 compiler from 7.2.  On 7.2, it was hit a miss on the printer selection when bypassing the Windows print driver.  I was told my Micro Focus support that Windows no longer supports bypassing the print driver.  So I am trying to get a 16 cpi font using the WIN$PRINTER command.

0 Likes
Micro Focus Expert
Micro Focus Expert

RE: Printing 16 CPI

Jump to solution

Have you tried taking your existing print and  assigned your print file to -P SPOOLER-DIRECT or to -Q printername using the DIRECT=ON option

For WIN$PRINTER, you would choose a font that provides 16cpi and use W$FONT to obtain a handle to that font, then use WIN$PRINTER

When you take a look at WIN$PRINTER there are a lot of op-codes WINPRINT-SET-FONT being one of them

0 Likes
Cbourque_gts-genesis Absent Member.
Absent Member.

RE: Printing 16 CPI

Jump to solution

Our company writes accounting software so I have customers using all forms of Windows operating systems.  I am compiling with 7.2 runtime for my existing customers but will be using 10.0.1 for new customers.  At my office, if I bypass the print driver, I can print on one of my network printers but not my slave printer so I do not think bypassing the print driver is an option.

0 Likes
DougP Outstanding Contributor.
Outstanding Contributor.

RE: Printing 16 CPI

Jump to solution

The attached sample program demonstrates 150 characters per line printing.  Modify it to load a different font that will provide 176 characters per line.  You might need to experiment with which font and size will give what you need.

View solution in original post

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.