PCL Right Justify
Craig Tooker
craig at cwtsoftware.com
Wed Apr 20 17:49:28 PDT 2011
Proportional fonts are no mystery, it's just math. What you must know is
the dot width of every character you will be printing in that font at
the given point size. Load that table into an array in filePro and then
just work through a loop for the column contents and subtract the dot
width of each character from the column ending dot position. Send that
with the PCL position command and then the field contents. On the output
form you would place a dummy field at the end of each column. In
processing you would define that dummy field to be large enough to hold
the PCL positioning codes and the contents of the column. Remember to
push left any padded filePro fields (or count the width of the spaces
also) when you process the field. Then of course they will want to
change the font or the printer type and then you get to create more font
tables.
It's a lot easier in cases like this to write the output in HTML (where
you can do tables and font changes and other things) to a file. Process
the file using 'html2ps' or it's ilk with a SYSTEM command or shell
script which would further convert (using ghostscript) the output to a
PDF file. This can then be viewed on screen or emailed or printed or
whatever. But you don't need to become a typesetter driver. Typically
this kills fewer trees as well because they tend to only print what they
*really* want.
On my client systems, each user gets a share where these PDF files show
up and they know, for any given report, to go look on drive S: for
"Balance-Sheet-043011.pdf". You could also start a viewer for them (if
they are really dumb and your security model allows injecting commands
from the server to the workstation - not recommended, just train the
users how to launch a PDF file).
You did not specify but I'm assuming this is a *ix server with Windows
clients. In which case this is all a snap and all available in your
distribution or as free downloads. If not YMMV but I think (but don't
care) that this tool chain is available in some form for Windows - I
know that ghostscript is available. In the worst case under Windows they
could view the HTML files in their favorite browser.
Craig
.
On 4/20/2011 19:42, Scott wrote:
> Sorry
>
> Maybe I wasn’t clear , I need a pcl code to right justify and proportional
> space font not a fixed space .... I am using filepro .2 field types ... but
> with the 'client requested' font it is printed from the left side.
>
>
> So I need to move to a pcl location then print it backwards from there.
>
> Thanks
> Scott
>
>
> -----Original Message-----
> From: Richard Kreiss [mailto:rkreiss at gccconsulting.net]
> Sent: Wednesday, 20 April 2011 10:57 PM
> To: scott.filepro at aanet.com.au; filepro-list at lists.celestial.com
> Subject: RE: PCL Right Justify
>
>
>
>> -----Original Message-----
>> From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
>> [mailto:filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com] On
>> Behalf Of Scott
>> Sent: Tuesday, April 19, 2011 8:49 PM
>> To: filepro-list at lists.celestial.com
>> Subject: PCL Right Justify
>>
>> How do I right justify by amount fields ?
>>
>>
>>
>> I have a amount column set at $1b2a703139353058
>>
>>
>>
>> But it is left align.
> Use the field edit RJ (\ ASCII)
>
> This should right align this field.
>
>
>
> Richard Kreiss
> GCC Consulting
> rkreiss at gccconsulting.net
>
>
>
>
>
>
>
>>
>>
>>
>>
>>
>>
>>
>>
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: http://mailman.celestial.com/pipermail/filepro-
>> list/attachments/20110420/3ac1d7aa/attachment.html
>> _______________________________________________
>> Filepro-list mailing list
>> Filepro-list at lists.celestial.com
>> Subscribe/Unsubscribe/Subscription Changes
>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list