Barcode(codabar) escapecodes(HP printer)

I looking for example printing barcode(codabar) with using the escapecodes(HP printer)

Tags:

  • Barcodes can be done in several ways:
    1. Your printer can have a font pre-installed. Then you can use escape codes.
    2. You can have a windows barcode font installed, then you can use WIN$PRINTER font control to print using that font.
    3. You can google "postscript barcode" and go to terry burton's website and download the postscript header file that implements routines for all known barcode types. (He developed it while at nasa and still maintains it).

    I am not sure how to do escape codes to the printer while using WIN$PRINTER, but if you write to the printer using the phrase "WITH NO CONTROL" you can do something like this:

    MOVE X"1B30313233" TO PRINT-VAR.
    WRITE PRINT-VAR (1:5) WITH NO CONTROL.

    will write out escape followed by 0123, which would be replaced by whatever string you need.

    Or you can set up a variable, make it varying and depending on another variable for the size, then you do not have to use the reference feature (1:x) to limit how much you write.