Guidelines
We have new content about printers, Click here to check it out!
HP Recommended
HP 401n
Linux

Hello,

Urgent
I am using HP 401n printer to print MICR fonts from PCL.

The font is not printing correctly, I am not able to identify the reason.
I have used the below-mentioned code block to print MICR font

 

String checkNumberEnclosure = "&"
    String routingNumberEnclosure = "/"
        output += "\033&l0O\033(8M\033(s0p8.00h10v0s0b80T" + "\r\n"
        output +=  "\033*p0726 x0927 Y " + routingNumberEnclosure + "123400" + routingNumberEnclosure
        output +=  "\033*p1032 x0927 Y " + "112233" + checkNumberEnclosure
        output +=  "\033*p1338 x0927 Y " + "00052001" + routingNumberEnclosure

The font was printing a week ago, after that I changed some of the x-y coordinates and did some UI changes for the cheque but the code block mentioned above was untouched and nor any setting was changed in the printer. I am not able to figure out the reason and have tried almost everything like changed UTF-8 to ASCII, used multiple other symbol sets.

 

Please help me with this, it's been a whole week since I am trying. Please let me know as soon as possible.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
HP Recommended

>> ... The font is applying correctly now and I achieved this by just changing 10v to 12v, else everything remains same. As far as I understand 10v/12v is to set the height to 10/12. I don't know how does the height have an impact on MICR font ...

 

This implies that the MICR font (provided in add-on hardware or as a downloaded soft font) is a bitmap (fixed size) font rather than a scalable one, and is hence only available in one particular size (12 point in your case).

View solution in original post

5 REPLIES 5
HP Recommended

>> ... The font is not printing correctly ...

 

In what way is it not (now) printing correctly? e.g.:

 

  • does anything print, or not?
  • If something prints, is it the right 'characters' but in the wrong font?
  • or are the characters not those expected?
  • ... or what?  

 

I've taken your PCL snippet, and placed the rudiments of it into a file for analysis; a few comments:

 

  • I've replaced the (octal) \033 values with (hexadecimal ) 1b (both are representations of the (non-graphic) Escape control-code character).

 

  • I've removed the space characters between the cursor position values and the "x" or "Y" sequence terminators (my analyser does not accept such spaces (they are not expected within the PCL syntax for escape sequences), although some printers may perhaps just ignore them).

 

  • The analysis shows:Capture.PNG

 

  • Bear in mind that most printers (which I assume includes your Laserjet 401n) do not include a built-in (printer-resident) font with those font selection characteristics - so the target font must either be on some sort of add-on hardware unit attached to the printer, or previously downloaded as a PCL-format soft font - which? - what does a PCL font (typeface) list from the printer show (I've no idea how to invoke one of these on your printer model).

 

Are you able to 'capture' a small sample print job for analysis? This would show exactly what 'instructions' are being sent to the device, and should provide clues as to what is amiss.

 

[If you were using a  Windows application, you'd probably do this by choosing the 'print to file' option in the Print dialogue - I've no idea what the *n*x equivalent might be].

 

If you can obtain such a capture, you couild analysis it yourself (on a Windows system) using the PRN File Analyse tool in the PCL Paraphernalia application (available via https://www.pclparaphernalia.eu); or send the file to me via the support mailbox 'at' pclparaphernalia.eu.

HP Recommended


Thanks, @dansdaduk for your reply.

 

>>>> If something prints, is it the right 'characters' but in the wrong font?
Yes, the numbers were printing but MICR font was not applying to it.

 

The font is applying correctly now and I achieved this by just changing 10v to 12v, else everything remains same. As far as I understand 10v/12v is to set the height to 10/12. I don't know how does the height have an impact on MICR font but yes the MICR font is working fine with this change.

 

 

String checkNumberEnclosure = "&"
String routingNumberEnclosure = "/"
output += "\033&l0O\033(8M\033(s0p8.00h12v0s0b80T" + "\r\n"
output += "\033*p0726 x0927 Y " + routingNumberEnclosure + "123400" + routingNumberEnclosure
output += "\033*p1032 x0927 Y " + "112233" + checkNumberEnclosure
output += "\033*p1338 x0927 Y " + "00052001" + routingNumberEnclosure

 

 

 

HP Recommended

>> ... The font is applying correctly now and I achieved this by just changing 10v to 12v, else everything remains same. As far as I understand 10v/12v is to set the height to 10/12. I don't know how does the height have an impact on MICR font ...

 

This implies that the MICR font (provided in add-on hardware or as a downloaded soft font) is a bitmap (fixed size) font rather than a scalable one, and is hence only available in one particular size (12 point in your case).

HP Recommended

Thanks for clearing the mystery.

HP Recommended

Hello, 

 

I have installed the font, i am operating on macOS high Sierra. However it still will not print. Where do I need to go to get it to print?

† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the <a href="https://www8.hp.com/us/en/terms-of-use.html" class="udrlinesmall">Terms of Use</a> and <a href="/t5/custom/page/page-id/hp.rulespage" class="udrlinesmall"> Rules of Participation</a>.