Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PCL printer commands to a LJ4... issues!! 1

Status
Not open for further replies.

FB9

Technical User
Oct 14, 2006
9
0
0
US
I'm outputting sheet labels to an LJ4 printer, using the HP PCL escape sequences to control the printer. (Has to be accurate so the labels will come out right on the sheets).

When I just used the page length and page margin commands (chr(27)+"&l60P" and chr(27)+"&l5E)", it doesn't work right... either asks for Exec paper, or just runs off the bottom of the page onto the next page. I solved that by just using the page size command (chr(27)+"&l2A"), but then I can't control the top margin... it just stays where it is, which is off by a line.

Any hints? Can I not just tell the printer how many lines long my lables are and what top margin I want? (Apparently not).

I'm an amateur who's written my own program (20 years ago) for my own business, and am maintaining it, but not writing enough code to stay very current...

Frank
 
Hi, Frank

It's been awhile so I don't remember offhand, however you will find a good PCL reference here:

Likely you will have to experiment a bit (lot?) to get it right.

Personally I usually just write a CSV file and use it as input to a MS Word mailmerge using one of their standard label templates - saves a lot of grief when using different printers.

Jock
 
Frank,

I have a program that prints billing coupons, four to a page, I had to go nuts to make it work. Strip off the top & bottom margins, half line feeds, change the pitch, print to a OCR font. Start at the top and work down, get the first row of labels set then move down the page. Jock is correct it is easier to use the mailmerge function in WORD, but your user has to juggle between apps and select the right file to print from every time.

Jim C.
 
Hi, Jim

Actually it is a bit more seamless than that.

I set up the mailmerge .doc file (e.g. Avery5160.doc) to default to the .csv file name which is generated by the clipper prog (avery5160.csv) and then in the clipper program run "start <path to winword.exe>\winword avery5160.doc".

That causes MS word to start in a separate window and open the mailmerge document. The operator just has to confirm the input file name (click on button) and then they are presented with a preview of the first page of labels. If they look ok then they just click on merge to print or merge to new document and it's done.

Jock
 
Jock,

I have got to get out more. I end up relating this stuff to my systems, and forget that everybody isn't using a 20 year old system & structure.

Jim C.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top