1821587 Members
3791 Online
109633 Solutions
New Discussion юеВ

Barcode printing

 
SOLVED
Go to solution
Laszlo Csizmadia
Frequent Advisor

Barcode printing

I'm looking for a little technical support.
We have HP LJ 2300 with BarDIMM Pro(www.jetcapslabs.com). This printer is used to print barcodes from HP-UX. It works perfectly.
However our new HP LJ 4350 with BarDIMM pro doesn't work correctly. It prints out everything perfectly expect the barcodes.
It prints out a string like *000098734* where barcode should be.
It seems the barcode printing is somehow not triggred by the control characters.

The printers are identically configured (network printer, net_lj4x) in HP-UX, and barcode can be printed to both from Windows.

I have even compared the print jobs in the UNIX spool in case of the two (LJ2300 and LJ4350) printers. When printig the same barcode to the printers, the print jobs are identical.
It contains a string where barecode is: ^[(0Y^[(s0p4.6h12v0s3b0T*00091500*^[(3@
The LJ2300 prints it correctly the LJ4350 not. Why?

Thanks in advance.
7 REPLIES 7
Chris Vail
Honored Contributor
Solution

Re: Barcode printing

You've answered your own question. The 4350 is not backward-compatible with the 2300. It will take a different series of control codes to get the same result. The LJ printer driver is an exact match for the older printer, but only very close for the new one.

The only solution is to write your own driver. Many years ago I would've been able to do this--but I did it last on a daisy wheel printer which is a far simpler system than a modern laserjet. This is a compatibility issue that you should blame on whoever bought the printer without a guarantee that it work on HPUX. Your best bet right now is to make this HP's problem in one manner or another. If they sold you the printer, they need to supply the proper driver OR sell you a printer that does work.


Chris
Bill Hassell
Honored Contributor

Re: Barcode printing

HP-UX has NO printer drivers at all. Instead, it has simple scripts that can modify options for printing plain ASCII files and triggering global format options like PORTRAIT or DUPLEX. The codes used to signal a switch to the barcode font must be imbedded into your program and this in turn triggers the special BarDIMM hardware. This is clearly an issue for JetMobile, specifically, have they tested their product on the LJ 4350? Also, since you mentioned that it prints correctly from a PC, there may be some differences between the PC Windows drivers for the LJ 2300 and the LJ 4350, especially in handling the BarDIMM product.

If you can edit the printjob, you might add the 2 characters esc Y somewhere on the page to turn on display functions (prints escape sequences and special codes) and esc Z to turn it off. This text can be used to show the mfr that the right sequences are reaching the printer but the BarDIMM is not responding.


Bill Hassell, sysadmin
Laszlo Csizmadia
Frequent Advisor

Re: Barcode printing

Thanks for the good ideas.

If I create a file containing this the LJ4350 prints out a barcode:
^[(s3p5hvsb24601T0123456789012^[(10U^[(s0p12h4099T
(I get the idea from: http://www.jetmobile.com/samples/samples.htm)
And relevant sequence comming from the application is this: ^[(0Y^[(s0p4.6h12v0s3b0T*000915
00*^[(3@
In this case BARDIMM is not triggered.

What is generating this PCL codes? The modell script or the wharehouse application itself? How to find this out?
The file going to the printer is exactly the same independently if I use net_lj4x or net_lj4350 (http://www.hp.com/pond/modelscripts/index2.html).

If the application generate this PCL sequence can I easly match and replace with a right one by modifying the modellscript?
Bill Hassell
Honored Contributor

Re: Barcode printing

HP-UX does not generate any PCL sequences inside a print job. The string you are showing came from your application. For some reason, it is not triggering the BarDIMM. It may be that a specific font ID number is needed and in the 4350, the font numbers are different. Your vendor will have to check this.


Bill Hassell, sysadmin
TwoProc
Honored Contributor

Re: Barcode printing

I think I've tackled something similar before by just going to each printer and printing out the external font cartrige page (not sure what it's called). Those things give you the escape sequences to access the contents of the cartrdige. If the two pages don't match - then you've got to write some code either in your program - or write another program to post-process the output and convert the strings that used to go to one location to the new location. I've done both depending if I had the original source code or not - or whether I'm fully deploying on the new and dumping the old. The problems I had were between the 4000 and 8000 level printers, and the problems were resolved by replacing the escape sequences that were indicated by the font cartridge printout diagnostic sheet on one vs ther other. The simplest fix if you want to avoid looking at someone else's code (can get ugly in there) - just postprocess the data after it's generated and fix it in a shell script that takes their file, massages, it , writes a new one, and prints the new.
We are the people our parents warned us about --Jimmy Buffett
Laszlo Csizmadia
Frequent Advisor

Re: Barcode printing

At the end that was the solution:
sed 's/.(0Y//g;s/v0s3b0T/v0s3b0s24670T/;s/(3@/(10U^[(s0p10h4099T/g'

It was very helpfull: http://www.jetmobile.com/samples/samples.htm
This is a code39 barcode. The LJ2300 had a Code39 barcode font downloaded into it's firmware. And (0Y called that font so I suppose the BarDIMM was not even triggered.

Anyway if I change the patterns as above in the print job everything prints well on LJ4350.

How can I write this into the modellscript?

Bill Hassell
Honored Contributor

Re: Barcode printing

Unfortunately, the JetDirect model scripts such as net_ljx000 have gotten so convoluted, it is very difficult to simply insert an escape sequence in the script. If you insert the code too soon in the script, it may be overidden by a subsequent option. There are so many special options (2-up, 4-up, 8-up, etc) that it is much simpler to insert the required string into your print job by modifying the program.


Bill Hassell, sysadmin