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!

How to print > 80 characters in one line

Status
Not open for further replies.

gweng

Programmer
Nov 22, 2002
6
US
I'm printing a file that has more than 80 characters in one line. I find only first 80 printed. Which PCL commands can help?
 
You will have to use a smaller font or print in landscape orientation. I assume that you are probably ptinting a courier 10 pitch font. Your maximum printing width is eight inches on letter size so that translates to 80 char at 10 cpi. If you change to 12 cpi, your pagewidth is increased to 96 characters.

The PCL command for 12 cpi is <esc>(s12H

Jim Asman
jlasman@telus.net
 
Thanks, Jim!

I found I actually have same problem as Robert did. I need to change right margin from 1/4&quot; to 1/8&quot;. I cannot change font(it must be Courier 12).

I have tried to use Ec&a134M and it does not work.

Any suggestions?

Gene
 
There is a way that you can cheat it a little bit, but it requires that you insert some PCL code into the middle of every line the you want expanded. It's only going to yield one more character at 12 cpi. You can effectively gain about 15 dots(at 300dpi) on each side by manipulating the sheet offset. You are in trouble if you are duplexing. This only applies to a LaserJet. Not to DeskJets.

Does your application have the ability to insert the codes?

Jim Asman
jlasman@telus.net
 
Thanks, Jim!

1. We are gernating PCLs from Java. No problem to insert code.

2. Please tell me how.

Gene
 
Insert at the beginning of every line

<esc>&l-65U

Insert in the middle of every line

<esc>&l65U<esc>&a-130H

On my LJ5000 I get 98 characters at 12 cpi

Jim Asman
jlasman@telus.net
 
Hi Jim,

1. Your solution works!

2. I have a PCL file (generated by print to file) that has correct right and left margin (both of them are 1/5&quot;). This file only needs set up Esc at the begining, but the vertical space is not correct. You may take a look PCL command so that we can have a clean solution (instead of inserting command every line). Here is the code:

E*t600R&u600D*r0F&l0o1E&l0S&l7H&l2a8c1E*p0x0Y*c0t5760x7704Y&l1X*b0M
(19U(s4099t0b0s10h0P&d@*v0o0T*p20Y

Thanks!

Gene

 
Gene,

I don't believe there is any alternative but to put the commands that I gave you on every line.

In your code the line spacing is set to 6 lpi.

What did you want instead?

Jim Asman
jlasman@telus.net
 
Jim,

The truth is I got same result (from left and right margin point of view) with the code above as with the code you provides. What is the default line space? Could you change above code so that line space = default? Then we may get a cleaner solution. By the way, which part tells us line space is 6 lpi?

Gene
 
In the code you posted, the part that is ...&l2a8c1E

the 8c bit is the line spacing; i.e., 8/48ths of an inch or 6 lpi.

The font is set to 10 picth. I am very doubtful that the setup that you posted is can produce a text width as great as you by inserting the codes on every line.

Use the setup you have, goto 12 ptich and see how many characters you can get on the full line. Now if your original problem could be resolved with a narrower right margin gained by a fatter left margin, then <esc>&l65U at the beginning of file would probably fix you up.

Jim Asman
jlasman@telus.net
 
Jim,

Now I got another problem. When I print my PCL files to D640, I found my font setting does not apply to text after

<esc>&l65U<esc>&a-130H

Any idea?

Thanks!

Gene
 
What is D640? An inkjet printer?

The sheet offset command, <esc>&l65U, AFAIK only applies to PCL5 printers. The <esc>&a130H is purely a positioning code so neither affect your fonts.
Jim Asman
jlasman@telus.net
 
gweng,
I am looking to print pcl files from java. Would you be willing to post some code on how you did this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top