PCL Printer Language in VC v9

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:

  1. <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.
  2. 12345 :actual check number and routing number.
  3. <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.

  • 0  

    the Escape functions was used for long time ago and allow text formatting on a printer, so i was able to print barcode with this >ESC> commands, that each printer can anderstand, see in the printer documentation. 

    a old trick/tip is for bold to print this word more times, etc...

    many things, but the new world is more better, use graphical designer, design a template and then only pass the data, see List&Label and other tools

    But you are your own chief and can do what you want and can!

  • 0 in reply to   

    Greiner,

    Thank you for your input. Would you recommend a reputable and supported graphic designer that I can pass data from an .asc file for printing checks? Thanks in advance.

  • 0   in reply to 

    i don't knwo what you really want to do!

    The product i use is List&Label and it can use the data coming from all inputs (asc, csv, isam, sqldatabase). The graphical designer is for design the output, may be a label, a card, as list or invoice, delivery note. Each ouptut can have text, barcode, graphics, charts. You can export your printings in pdf, excel, word, send as mail, etc...

    It is much more easyer as coding with printer Esc-commands!

    send me your email-address or a pm, then i can send you a little documentation for this

    what is you os you developp and the os for your application?

    What is you cobol compiler? Netexpress5.x or Visual Cobol 9.x/10.x?