dbTalk Databases Forums  

PCL Text Length printing problem

comp.databases.pick comp.databases.pick


Discuss PCL Text Length printing problem in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mkamler
 
Posts: n/a

Default PCL Text Length printing problem - 11-04-2003 , 08:52 AM







We are having a problem printing from a UniVerse Basic program. We are
printing to an HP laserjet 5si laser printer, and using PCL 5 to format
the printouts. The printer accepts the PCL, but no matter what we do we
can't get more than 60 lines on the page. We need to start at line two
and print 62 lines. Here is our code:





ESC=CHAR(027)



FONT.TOP.MARGIN = ESC:"&l1e"



TEXT.LENGTH = ESC:"&l62F"



PRINTER ON



PRINT FONT.TOP.MARGIN:TEXT.LENGTH



EXECUTE 'SETPTR 0,80,62,0,0,1,NFMT,FORM ICSPCL,NHEAD'



PRINT '1'



PRINT '2'



PRINT etc, etc, etc...



If we specify a number lower than 60 for the text length, it seems to
work, but we can't get any more than 60 lines. We would appreciate any
ideas as to why we can only get 60 lines per page. Thanks.


--
Posted via http://dbforums.com

Reply With Quote
  #2  
Old   
Don Verhagen
 
Posts: n/a

Default Re: PCL Text Length printing problem - 11-04-2003 , 10:03 AM






In news:3557584.1067957533 (AT) dbforums (DOT) com,
mkamler <member46952 (AT) dbforums (DOT) com> typed:
: We are having a problem printing from a UniVerse Basic program. We
: are printing to an HP laserjet 5si laser printer, and using PCL 5 to
: format the printouts. The printer accepts the PCL, but no matter
: what we do we can't get more than 60 lines on the page. We need to
: start at line two and print 62 lines. Here is our code:
:
:
:
:
:
: ESC=CHAR(027)
:
:
:
: FONT.TOP.MARGIN = ESC:"&l1e"

You are setting your top margin to 1 line

Default top margin: 1/2 inch
Default bottom margin: 1/2 inch
Page Size: 11 inches
Effective page size: 10.0
Number of lines at 6 lines per inch(default): 10 x 6 = 60 lines per page

The PCL Command above has to end with a "E" not an "e"
Example ESC:"&l0E" will set the top margin to zero.

Hope this helps,

Donald Verhagen


: If we specify a number lower than 60 for the text length, it seems to
: work, but we can't get any more than 60 lines. We would appreciate
: any ideas as to why we can only get 60 lines per page. Thanks.



Reply With Quote
  #3  
Old   
Glen
 
Posts: n/a

Default Re: PCL Text Length printing problem - 11-04-2003 , 10:56 AM



On Tue, 04 Nov 2003 09:52:13 -0500, mkamler <member46952 (AT) dbforums (DOT) com>
wrote:

Concatenate the escape codes to your printed text. Also concatenate
all of your print statements.

Glen

Quote:
We are having a problem printing from a UniVerse Basic program. We are
printing to an HP laserjet 5si laser printer, and using PCL 5 to format
the printouts. The printer accepts the PCL, but no matter what we do we
can't get more than 60 lines on the page. We need to start at line two
and print 62 lines. Here is our code:





ESC=CHAR(027)



FONT.TOP.MARGIN = ESC:"&l1e"



TEXT.LENGTH = ESC:"&l62F"



PRINTER ON



PRINT FONT.TOP.MARGIN:TEXT.LENGTH



EXECUTE 'SETPTR 0,80,62,0,0,1,NFMT,FORM ICSPCL,NHEAD'



PRINT '1'



PRINT '2'



PRINT etc, etc, etc...



If we specify a number lower than 60 for the text length, it seems to
work, but we can't get any more than 60 lines. We would appreciate any
ideas as to why we can only get 60 lines per page. Thanks.


Reply With Quote
  #4  
Old   
Ed Sheehan
 
Posts: n/a

Default Re: PCL Text Length printing problem - 11-04-2003 , 11:22 AM



You need to specify a non-default page length:

Page Length # if Lines (5-128)

Ec&l#P (p)

027 038 108 #...# 080 (112) 1B 26 6C #...# 50 (70)

Here's more info:

http://www.hp.com/cposupport/printer.../bpl02705.html

Do a find for "Page Length"

Ed


mkamler wrote:
Quote:
We are having a problem printing from a UniVerse Basic program. We
are printing to an HP laserjet 5si laser printer, and using PCL 5 to
format the printouts. The printer accepts the PCL, but no matter
what we do we can't get more than 60 lines on the page. We need to
start at line two and print 62 lines. Here is our code:





ESC=CHAR(027)



FONT.TOP.MARGIN = ESC:"&l1e"



TEXT.LENGTH = ESC:"&l62F"



PRINTER ON



PRINT FONT.TOP.MARGIN:TEXT.LENGTH



EXECUTE 'SETPTR 0,80,62,0,0,1,NFMT,FORM ICSPCL,NHEAD'



PRINT '1'



PRINT '2'



PRINT etc, etc, etc...



If we specify a number lower than 60 for the text length, it seems to
work, but we can't get any more than 60 lines. We would appreciate
any ideas as to why we can only get 60 lines per page. Thanks.



Reply With Quote
  #5  
Old   
Elio
 
Posts: n/a

Default Re: PCL Text Length printing problem - 11-04-2003 , 11:53 AM



Hello,
I did some forms printing a while ago through Unidata. I believe that every
time you "PRINT" it counts as 1 line even though your printing PCL cmds.
Concatenate as much of your PCL cmds into 1 line before using the PRINT
statement.

"mkamler" <member46952 (AT) dbforums (DOT) com> wrote

Quote:
We are having a problem printing from a UniVerse Basic program. We are
printing to an HP laserjet 5si laser printer, and using PCL 5 to format
the printouts. The printer accepts the PCL, but no matter what we do we
can't get more than 60 lines on the page. We need to start at line two
and print 62 lines. Here is our code:





ESC=CHAR(027)



FONT.TOP.MARGIN = ESC:"&l1e"



TEXT.LENGTH = ESC:"&l62F"



PRINTER ON



PRINT FONT.TOP.MARGIN:TEXT.LENGTH



EXECUTE 'SETPTR 0,80,62,0,0,1,NFMT,FORM ICSPCL,NHEAD'



PRINT '1'



PRINT '2'



PRINT etc, etc, etc...



If we specify a number lower than 60 for the text length, it seems to
work, but we can't get any more than 60 lines. We would appreciate any
ideas as to why we can only get 60 lines per page. Thanks.


--
Posted via http://dbforums.com



Reply With Quote
  #6  
Old   
System Admin
 
Posts: n/a

Default Re: PCL Text Length printing problem - 11-04-2003 , 12:31 PM



Some sample code to change HP Laser printer defaults (or for one-time):

* HPLJ.DEFAULT
* Setup HP LaserJet Defaults
* KILO MAR 2003
*
* PJL - Printer Job Language
* Used to change control panel settings on HP LaserJet Printer (4 and
above)
* Note - Not all PJL commands are supported on all printers
* See "Printer Job Language Reference Manual", part of "Technical
Reference Manual" bundle
* Note - HP LaserJet 4L, 5L, 6L and 1100 will reset to factory
defaults if
* they are manually reset or unplugged
*
* UEL - Universe Exit Language
* Used to enter and exit PJL on a HP Laser Printer
*
EQU ESC TO CHAR(27); * Escape Character
*
PJL.CMD = '@PJL'; * PJL Command, enter Printer Job Language
*
PJL.TYPE = ' DEFAULT'; * PJL Type
* = DEFAULT - Changes Default settings permanently
* = SET - Change Default settings only for current job
*
UEL.CMD = ESC : '%-12345X'; * UEL Command
*
PRINTER ON; * Send to printer
*
* Enter PJL with a UEL Command
*
PRINT UEL.CMD : PJL.CMD
*
PRINT PJL.CMD : PJL.TYPE : ' ORIENTATION=LANDSCAPE'
*
PRINT PJL.CMD : PJL.TYPE : ' FORMLINES=60'
*
PRINT PJL.CMD : PJL.TYPE : ' LPARM : PCL PITCH=14.00'
*
* Exit PJL with a UEL Command
*
PRINT UEL.CMD
*
STOP

Also:

http://h20000.www2.hp.com/bizsupport...ectID=bpl01378

http://www.hp.com/cposupport/printer.../bpl02705.html

http://h20000.www2.hp.com/bizsupport...ish%20%28US%29



Reply With Quote
  #7  
Old   
Bruce Nichol
 
Posts: n/a

Default Re: PCL Text Length printing problem - 11-05-2003 , 03:51 PM



Goo'day,

One method I've seen in an instance (UniVerse) where a BASIC program
is used to (a) send PCL sequences for lines, shadowing, headings, et
al and then (b) revert to a font that is 10cpi/6lpi and then (c) use
PRINT as one normally would in a BASIC program and they found that
page throws were getting in the way at "the bottom of the page" is to
revert to PCL addressing ie ESC:'*p0x3200Y': followed by what is
required to print at the bottom of the page..... At 300 dpi it's easy
enough apparently to work out that 50 dots = 1 line @ 6lpi .......

On Tue, 4 Nov 2003 11:03:26 -0500, "Don Verhagen"
<news (AT) southeast-florida (DOT) com> wrote:

Quote:
In news:3557584.1067957533 (AT) dbforums (DOT) com,
mkamler <member46952 (AT) dbforums (DOT) com> typed:
: We are having a problem printing from a UniVerse Basic program. We
: are printing to an HP laserjet 5si laser printer, and using PCL 5 to
: format the printouts. The printer accepts the PCL, but no matter
: what we do we can't get more than 60 lines on the page. We need to
: start at line two and print 62 lines. Here is our code:
:
:
:
:
:
: ESC=CHAR(027)
:
:
:
: FONT.TOP.MARGIN = ESC:"&l1e"

You are setting your top margin to 1 line

Default top margin: 1/2 inch
Default bottom margin: 1/2 inch
Page Size: 11 inches
Effective page size: 10.0
Number of lines at 6 lines per inch(default): 10 x 6 = 60 lines per page

The PCL Command above has to end with a "E" not an "e"
Example ESC:"&l0E" will set the top margin to zero.

Hope this helps,

Donald Verhagen


: If we specify a number lower than 60 for the text length, it seems to
: work, but we can't get any more than 60 lines. We would appreciate
: any ideas as to why we can only get 60 lines per page. Thanks.

Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

If it ain't broke, fix it until it is....


Reply With Quote
  #8  
Old   
Meghan Kamler
 
Posts: n/a

Default Re: PCL Text Length printing problem - 11-10-2003 , 12:20 PM



Thanks Bruce, your advice was good! Turns out that like Elio
suggested, everytime you use print, it counts it as a line even though
you are just sending pcl commands. So concatinating will solve that
problem. I was still having problems getting down to the bottom of
the page, so using your suggestion worked for me. Thanks again.

Bruce Nichol <talon (AT) hotkey (DOT) net.au> wrote

Quote:
Goo'day,

One method I've seen in an instance (UniVerse) where a BASIC program
is used to (a) send PCL sequences for lines, shadowing, headings, et
al and then (b) revert to a font that is 10cpi/6lpi and then (c) use
PRINT as one normally would in a BASIC program and they found that
page throws were getting in the way at "the bottom of the page" is to
revert to PCL addressing ie ESC:'*p0x3200Y': followed by what is
required to print at the bottom of the page..... At 300 dpi it's easy
enough apparently to work out that 50 dots = 1 line @ 6lpi .......

On Tue, 4 Nov 2003 11:03:26 -0500, "Don Verhagen"
news (AT) southeast-florida (DOT) com> wrote:

In news:3557584.1067957533 (AT) dbforums (DOT) com,
mkamler <member46952 (AT) dbforums (DOT) com> typed:
: We are having a problem printing from a UniVerse Basic program. We
: are printing to an HP laserjet 5si laser printer, and using PCL 5 to
: format the printouts. The printer accepts the PCL, but no matter
: what we do we can't get more than 60 lines on the page. We need to
: start at line two and print 62 lines. Here is our code:
:
:
:
:
:
: ESC=CHAR(027)
:
:
:
: FONT.TOP.MARGIN = ESC:"&l1e"

You are setting your top margin to 1 line

Default top margin: 1/2 inch
Default bottom margin: 1/2 inch
Page Size: 11 inches
Effective page size: 10.0
Number of lines at 6 lines per inch(default): 10 x 6 = 60 lines per page

The PCL Command above has to end with a "E" not an "e"
Example ESC:"&l0E" will set the top margin to zero.

Hope this helps,

Donald Verhagen


: If we specify a number lower than 60 for the text length, it seems to
: work, but we can't get any more than 60 lines. We would appreciate
: any ideas as to why we can only get 60 lines per page. Thanks.


Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

If it ain't broke, fix it until it is....

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.