Can anyone had any experience changing the font on an HP laserjet 4 from a cobol program?
01 REG-HEADER.
05 LABEL-REG PIC X(132) VALUE '<27>(s0p10h12s0b4099T'.
Have tried to code as a value but so far when it passes, it print the code on the line.
Try the following...
01 REG-HEADER.
05 ESC CHAR PIC X VALUE X'27'.
05 LABEL-REG PIC X(16) VALUE 's0p10h12s0b4099T'.
05 FILLER PIC X(115) VALUE SPACES.
This should send the ESC control character as a X'27'... I am not where I can get to my HP Book so I am assuming the rest of your data string is correct. Anyway, if there are other control characters they will need to be coded with the same syntax as shown above. I usually have to reset the printer a few times before I get it right...
01 REG-HEADER.
05 LABEL-REG PIC X(09) VALUE
@27s0p10h12s0b4099T@.
Try using HEX literals, note each 2 "places" in the hex
literal represents 1 byte. Therefore the pic is half as long
as the literal.
We are on a Unisys Mainframe and produce forms on HP printers using PCL5 often.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.