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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HP 1300 LJ - ESCAPE CODES USING BBX

Status
Not open for further replies.

hplaser

Programmer
Nov 15, 2003
3
CA
I just bought an HP Laser Jet 1300. Installed on Microsoft XP Pro fine. My desktop is a dual boot using Windows & Linux (Redhat 7.3). Using linux I installed the printer ok & I can lpr to it fine. I have BBx/Pro5 (Business Basic/Progression 5) license and it uses a config.bbx file where you define a printer using an 'alias' statement with specific escape codes to print. I tried a few entries and I was able to print but stair stepping creeps in and it doesn't print any further than (s0P(s13H(s4099T\277) show, plus 'grestore/restore/etc..' on subsequent lines. I'm trying to setup the printer to print landscape. Can anyone help me out?? Thanks.... hplaser..
 
You need to be more specific about what you are trying to do, and exactly what sequences you are sending.

Your sample sequence (s0P(s13H(s4099T is not valid PCL; Esc(s0PEsc(s13HEsc(s4099T would be valid, as would Esc(s0p13h4099T, but none of this has anything to do with Landscape orientation (use Esc&l1O for this).

The 'staircase' problem can probably be resolved by using Esc&k2G to automatically add CarriageReturn to LineFeed and FormFeed characters.

I don't know about grestore/restore - sounds a bit like PostScript to me, so what's it doing in a PCL stream?
 
Here is the exact line I use in my config.bbx file...

alias PL ">lp -dhp1300 >/dev/null" "HP Laser Jet Landscape" CR, PTON=1B451B266C32411B266C314F1B26352E3435431B287330501B28733133481B28733430393954,SP=12,CP=0F,SPCOLS=132,CPCOLS=255,EOL=WRAP,PTOFF=1B45

THE PTON= Represents 1B45=RESET 1B266C3241=LETTER PAPER SIZE 1B266C314F=LANDSCAPE 1B26352E343543=REPRESENTS VERTICAL LINE HEIGHT (5.45) 1B28733050=FIXED SPACING 1B2873313348=CPI 13 1B28733430393954=TYPE FACE COURIER

WHEN CALLING FOR A PRINT JOB USING BBX (BUSINESS BASIC), 'PL' IS THE PRINTER AND THE BBX GETS IT'S ESCAPE CODES FOR THE HP1300 LASER FROM THE 'alias' LINE. MY PROBLEM IS IT DOEN'T PRINT LANDSCAPE, SO ONE OR SOME OF THESE CODES IS EITHER INCORRECT OR MISSING. HOPE YOU CAN HELP ME OUT. THANKS.....
 
Your Vertical Motion Index sequence is incorrect (it should be 0x1b266c352e343543) although this may just be a transcription error when you wrote the post; I can't see how this would make any difference to the selection of orientation anyway.

I don't know BBX at all, so I've no idea if this is correct, or introducing any oddities, so I suggest that you send your sequence (suffixed with a small bit of text) direct to the printer, in order to check that your sequences are OK.

How you do this depends on how the printer is connected; if it a network printer (with its own IP address), just use 'lpr' to send direct to the address; not sure how to do it if it is parallel port or USB connected, as I don't know Linux very well (maybe 'cat' to the device?).
 
I was able to succeed today using the following escape codes. If anyone has the same problem, here's the solution.
The alias line is :
alias PL ">lp -d hp1300 >/dev/null" "HP Laser Jet Landscape",PTON=1B451B266C32411B266C314F1B266C352E3435431B287330501B28733133481B287334303939541B266B3247,PTOFF=1B45,SPCOLS=132,CPCOLS=255

1B45 - Reset
1B266C3241 - Letter Paper Size
1B266C314F - Landscape
1B266C352E343543 - Vertical lines (5.45)
1B28733050 - Fixed Spacing
1B2873313348 - CPI (13)
1B28733430393954 - Type Face Courier
1B266B3247 - End of line Termination (no difference if you use 3347)

Thanks for your help.

Rgds,

hplaser.......


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top