dbTalk Databases Forums  

PCL - Right Justified, Proportional Spacing

comp.databases.pick comp.databases.pick


Discuss PCL - Right Justified, Proportional Spacing in the comp.databases.pick forum.



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

Default PCL - Right Justified, Proportional Spacing - 07-05-2005 , 12:05 AM






Goo'day,

I really haven't got the inclination to spend however much time it
might take (the pubs are now open about 20 hours per day <g>...),
so.....

Does anybody have any simple method of right-justifying amounts when
the PCL font is "proportional", ie, if I have PCL printer and I've set
it to, say:

ESC:'(s1p8v0s0b16602T': ("1p" = proportional)

and we get lovely proportional print, is there a *simple* method of, I
don't know, counting dpi or something, a table of something from
somewhere, so that amounts we want right-justified ('R2#12') get
printed with proper right-justification?

At the moment, for right-justification, we're setting to

ESC:'(s0p16h0s2b16602T': ("0p" = fixed)

to print the amount and then resetting to proportional to get
something *close* but the type-face on the right-justified stuff is
noticibly different....

Or, is there some way we can position (ESC:'*p9x9Y') at the
right-justification point and "print to the left"? I'm still to
try "Print Direction" (ESC:'&a99P') to try 180 degree and printing the
numbers from the left.......

There *must* be something simple.... but I'm blowed if I can find
it.....

TIA
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

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

Reply With Quote
  #2  
Old   
Colin Alfke
 
Posts: n/a

Default Re: PCL - Right Justified, Proportional Spacing - 07-05-2005 , 12:26 AM






Bruce;

The easiest way we came up with was to start at the right hand side (using
the position code) and then print the number "backwards" using the backspace
command. So print the right most digit, backspace 2, print the next right
most digit backspace 2 etc. It takes some getting used to trying to read the
PCL code if you need to "debug" it - but it works reasonably well. The
biggest problems are the decimals and commas. The had to be handled a little
differently to look right. I can't remember exactly - we through this into a
subroutine and I haven't looked at it in years. I think you either had to
add an extra backspace or remove one??

hth
Colin Alfke

"Bruce Nichol" wrote ...
Quote:
Goo'day,

I really haven't got the inclination to spend however much time it
might take (the pubs are now open about 20 hours per day <g>...),
so.....

Does anybody have any simple method of right-justifying amounts when
the PCL font is "proportional",
[snip]
Or, is there some way we can position (ESC:'*p9x9Y') at the
right-justification point and "print to the left"? I'm still to
try "Print Direction" (ESC:'&a99P') to try 180 degree and printing the
numbers from the left.......

There *must* be something simple.... but I'm blowed if I can find
it.....

TIA
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

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



Reply With Quote
  #3  
Old   
Geoff Goodchild
 
Posts: n/a

Default Re: PCL - Right Justified, Proportional Spacing - 07-05-2005 , 12:41 AM



Bruce,

A few years ago I had to set up some routines to print documents in
proportional font - so I measured the width of all printable characters
in Times Roman, CG Times and Univers from 8pt to 16pt - all measured in
1/300th of an inch. I'd be happy to send you a table of the values if
this will help.

Regards,

Geoff


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

Default Re: PCL - Right Justified, Proportional Spacing - 07-05-2005 , 02:32 AM



Thanks, Geoff, but.....

As seeing we're using none of those fonts in this project (Helvetica
for us, at the moment), and we're using "fractional" points (6.5,
8.5, etc) in places, I'll try the "backspace" idea from Colin.....


On 4 Jul 2005 22:41:48 -0700, "Geoff Goodchild"
<goodchild_g (AT) yahoo (DOT) com.au> wrote:

Quote:
Bruce,

A few years ago I had to set up some routines to print documents in
proportional font - so I measured the width of all printable characters
in Times Roman, CG Times and Univers from 8pt to 16pt - all measured in
1/300th of an inch. I'd be happy to send you a table of the values if
this will help.

Regards,

Geoff
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

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


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

Default Re: PCL - Right Justified, Proportional Spacing - 07-05-2005 , 02:38 AM



Goo'day, Colin,

On Tue, 05 Jul 2005 05:26:04 GMT, "Colin Alfke"
<administrator (AT) localhost (DOT) invalid> wrote:

Quote:
Bruce;

The easiest way we came up with was to start at the right hand side (using
the position code) and then print the number "backwards" using the backspace
command. So print the right most digit, backspace 2, print the next right
most digit backspace 2 etc. It takes some getting used to trying to read the
PCL code if you need to "debug" it - but it works reasonably well.
I'm pretty backward, so it should pose no problems to me.... <g>

Quote:
The biggest problems are the decimals and commas. The had to be handled a little
differently to look right. I can't remember exactly - we through this into a
subroutine and I haven't looked at it in years. I think you either had to
add an extra backspace or remove one??

hth
Colin Alfke
That sounds like it. On this project we're only using whole
numbers, but with commas separating thousands - my logic tells me for
them and decimal points we'd probably need an additional
backspace..........

Will let you know of the outcome.....

Quote:
"Bruce Nichol" wrote ...
Goo'day,

I really haven't got the inclination to spend however much time it
might take (the pubs are now open about 20 hours per day <g>...),
so.....

Does anybody have any simple method of right-justifying amounts when
the PCL font is "proportional",
Regards,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

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


Reply With Quote
  #6  
Old   
Tony Gravagno
 
Posts: n/a

Default Re: PCL - Right Justified, Proportional Spacing - 07-05-2005 , 04:24 AM



My goodness people, if this is the way we use printers, we deserve to
go extinct. Get some real printing software for $29.95 and send it
data - don't generate raw PCL from a DBMS - or at least don't go this
far with it. I haven't seen backspacing like this since ASCII art was
hot back in the 70's. Anyone else remember the wall-sized images
generated on line printers or with daisy wheels? Mr Spock, Mona Lisa,
USS Enterprise, Moon map...?

T

"Colin Alfke" <administrator (AT) localhost (DOT) invalid> wrote:

Quote:
Bruce;

The easiest way we came up with was to start at the right hand side (using
the position code) and then print the number "backwards" using the backspace
command. So print the right most digit, backspace 2, print the next right
most digit backspace 2 etc.

Reply With Quote
  #7  
Old   
Mark Brown
 
Posts: n/a

Default Re: PCL - Right Justified, Proportional Spacing - 07-05-2005 , 05:53 AM



I printed Snoopy giving the Red Baron the finger back in 1973.

I thought the idea of proportional font was that all the letter were the
same width.

Why doesn't R0,#12 work?

Mark
"Tony Gravagno" <g6q3x9lu53001 (AT) sneakemail (DOT) com.invalid> wrote

Quote:
My goodness people, if this is the way we use printers, we deserve to
go extinct. Get some real printing software for $29.95 and send it
data - don't generate raw PCL from a DBMS - or at least don't go this
far with it. I haven't seen backspacing like this since ASCII art was
hot back in the 70's. Anyone else remember the wall-sized images
generated on line printers or with daisy wheels? Mr Spock, Mona Lisa,
USS Enterprise, Moon map...?

T

"Colin Alfke" <administrator (AT) localhost (DOT) invalid> wrote:

Bruce;

The easiest way we came up with was to start at the right hand side (using
the position code) and then print the number "backwards" using the
backspace
command. So print the right most digit, backspace 2, print the next right
most digit backspace 2 etc.



Reply With Quote
  #8  
Old   
Simon Verona
 
Posts: n/a

Default Re: PCL - Right Justified, Proportional Spacing - 07-05-2005 , 06:11 AM



proportional is that the width of the letter when printed is proportional to
the size of the character - ie an I is narrower than an H. It does seem
a little bizarre the way the OP is trying to do the printing when there are
so many third party tools that will do the job for him...

I don't know exactly what is being printed, but it sounds like an invoice
form or something similar... this can be done using html and filling in the
blanks, or using other form generation software to achieve similar. Also
has the benefit that the layout of the form is independent of the
application generating it... I seem to recall that Tony G has some
software that does this with HTML forms that the OP might be interested
in...

Seems like a sledgehammer approach is being taken to crack the proverbial
walnut..

MV products generally are not very good at formatted printing except for the
boring standard non-proportional text only tabular format... It's better
to use better tools to do the job.

Regards
Simon
"Mark Brown" <mbrown (AT) drexelmgt (DOT) com> wrote

Quote:
I printed Snoopy giving the Red Baron the finger back in 1973.

I thought the idea of proportional font was that all the letter were the
same width.

Why doesn't R0,#12 work?

Mark
"Tony Gravagno" <g6q3x9lu53001 (AT) sneakemail (DOT) com.invalid> wrote in message
news:hpjkc15epvmrtnfef9toqsif10vc99682p (AT) 4ax (DOT) com...
My goodness people, if this is the way we use printers, we deserve to
go extinct. Get some real printing software for $29.95 and send it
data - don't generate raw PCL from a DBMS - or at least don't go this
far with it. I haven't seen backspacing like this since ASCII art was
hot back in the 70's. Anyone else remember the wall-sized images
generated on line printers or with daisy wheels? Mr Spock, Mona Lisa,
USS Enterprise, Moon map...?

T

"Colin Alfke" <administrator (AT) localhost (DOT) invalid> wrote:

Bruce;

The easiest way we came up with was to start at the right hand side
(using
the position code) and then print the number "backwards" using the
backspace
command. So print the right most digit, backspace 2, print the next right
most digit backspace 2 etc.





Reply With Quote
  #9  
Old   
tpellitieri@centuryequip.com
 
Posts: n/a

Default Re: PCL - Right Justified, Proportional Spacing - 07-05-2005 , 07:40 AM



Bruce Nichol wrote:

Quote:
Does anybody have any simple method of right-justifying
amounts when the PCL font is "proportional"...
The easy way to do this:

1) Position your cursor at the right margin
2) Change your print direction 180 degrees
3) Change your print color to white
4) Print your string - this positions the cursor at the left edge
5) Change your print direction to 180 degrees
6) Change your print color to black
7) Print your string

The same trick can be used to center justify by also changing to 1/2
point size before printing the white text.

And regarding Tony G.'s comment -- not everyone has the option of using
more advanced software to do this for them. Especially if they are
working within a vendor-provided package.

--Tom Pellitieri
Century Equipment
Toledo, Ohio



Reply With Quote
  #10  
Old   
Colin
 
Posts: n/a

Default Re: PCL - Right Justified, Proportional Spacing - 07-05-2005 , 08:00 AM



He just asked for a simple way to right justify a number in
proportional font. I think a 25 line (including comments) subroutine to
print numbers fits the bill.

If he wants to re-work his invoicing/reporting routines to work with
$29.95 software he's more than welcome.

We went with leaving all of the printing routines and send everything
through the engines provided by http://www.whitehilltech.com that
really makes your output shine!

I remember my Dad printing a Mona Lisa and Snoopy for me on his new
computer. It didn't backspace once ;-) But it did have 8" floppy disks.

Colin

Tony Gravagno wrote:
Quote:
My goodness people, if this is the way we use printers, we deserve to
go extinct. Get some real printing software for $29.95 and send it
data - don't generate raw PCL from a DBMS - or at least don't go this
far with it. I haven't seen backspacing like this since ASCII art was
hot back in the 70's. Anyone else remember the wall-sized images
generated on line printers or with daisy wheels? Mr Spock, Mona Lisa,
USS Enterprise, Moon map...?

T


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.