I am developing a COBOL application that will print checks. The application creates an .asc file containing the HP PCL printer language with all the information, including font type and size, that will be printed on the check. However, I am having a difficult time with the routing and account number line. More specifically, I am unable to print the routing and account number in the IDAutomation MICR font, which is the standard font used to print the routing and account number on checks. It instead prints in regular font. I should mention that I print the .asc file through File\print in Notepadd++ and not through the COBOL application. To be clear, the font is installed on the computer, and I am able to print a word document with said font. Here is what the .asc file containing the PCL code for the IDAutomation MICR font looks like:
<ESC>(s1p10.0h12.0v0s0b24700T
12345
<ESC>(10U<ESC>(s0p12h12.0v0s0b0T
Explanation of the code:
- <ESC>(s1p10.0h12.0v0s0b24700T: This command sets the font to IDAutomationMICRIb10.
- <ESC> represents the escape character (ASCII 27).
- (s1p10.0h12.0v0s0b24700T sets the font ID and attributes. 24700 is the font identifier for IDAutomationMICRIb10.
- 12345 :actual check number and routing number.
- <ESC>(10U<ESC>(s0p12h12.0v0s0b0T: Resets the font to the default.
I recognize that this is not a Visual COBOL issue but if anyone can provide resources on how to solve this problem then I would appreciate it. I am currently looking at the PC printer library routines at the following link but have not come across anything that deals with HP PCL printing language:
www.microfocus.com/.../HRCLRHCALL0V.html
I am using Visual COBOL V9 on a Windows 10 pro.