problems to print boxes

Schreiber FooF

New Member
Hi All !

I have some problems to print boxes on my HP-8100...

I wanted to put boxes on a document, but there's no chars between 127 and 159. only "_"'s...
I use
-lng "French"
-cpcase French
-cpcoll Basic
-cpinternal iso8859-1
-cpstream iso8859-1
options in my startup.pf

How can I do to get those usefull semigraphics chars ???

Can I change my cp's without loose my accentuated chars???

Thank's...

I decided to get off my problem by using a code page change...

i used this program to search the page code that fits :
def var ligne as char format "x(35)".
def var i as integer.

output through lpr "-Plaser".
def var esc as char format "x(1)".
def var j as integer.
esc = chr(27).
j = 0.
do while j < 15.
put unformatted esc + "E" + chr(12) + chr(13).
put unformatted esc + "(" + string(j) + "U".
i = 13.
do while i < 256 :

Ligne = Ligne + " " + string(i) + " " + chr(i).
i = i + 1.
if length(ligne) > 30 then do :
put unformatted "(" + string(j) + ")" + ligne at 1 .
Ligne = "".
end.
End.
put unformatted Ligne + chr(12).
j = j + 1.
end.


I need to use the 10th code page, but when I only put unformatted the
put unformatted esc + "(" + string(10) + "U".
sequence the printer doesn't change code page...
??? why ??? how can I do it ???? Grr !

:mad: :confused: :mad:
 
To print boxes directly from Progress 4GL, you simply need to output the appropriate CHR codes. To know which CHR codes to actually print, depends on which symbol (character) set your printer is using.

Complex printing programs wuch as Microsoft Word tend to download everything that they need into the printer. But Progress printing is very, very basic. Generally, documents printed from Progress 4GL will use the printer's default panel settings for font and symbol set etc.

Your printer manual should have a list of built-in symbol sets that are available to you. And you should be able to use simple control codes embedded into your output to select them. But generally, anything that you write in this way is limited to one type of printer. You could I suppose, use codepages to control the translation but I think that there are simpler ways.

Most printers these days have an HP emulation mode. In HP mode, there's using a PC-8 character set that contains the block graphics that you can use.

But there are other alternatives. You can use pre-printed stationery, or even printer macros where forms and logos can be downloaded into the printer and printed on demand using a simple embedded control code. Or you can use a third-party add-on tool such as Viper.
 

Schreiber FooF

New Member
I'm using an HP-8100 and the problems are :
- I have no printed chars between 127 and 159, I get only "_".
- When I send "codepage change" Esc sequences , It seems not to be corectly interpreted : When I send a lot sequences it works ( ideal to find the good one ), when I just send the Interesting seqence it doesn't seem to be read by the printer ...
:dead:
 
If you are printing through MS Windows, its possible that the printer driver is stripping out the escape sequences that you are embedding in the document.

Progress gets around this by using a pass-through mode, where the printer driver is bypassed and so allowing the escape sequences through. The knowledge base entry 13447 explains this mechanism.

There are a couple of start-up parameters that you can use, but Progress should enable pass-through mode automatically when your output document begins with a control sequence, or when you use the PUT CONTROL statement to create the first output in the document.
 

Schreiber FooF

New Member
hmm ...thanks fer answering as fast, but...

Can you explain me why the program I sent upper works when I start with the "0th" codepage and not when I start with 10th ?? (the one I want to use ... )

Thanks !!
 
Sorry, I don't know.

Presumably, you can see the 10th symbol set in its printed form from the loop. The only thing that I can suggest is to ensure that there is no reset sequence following the esc + "(10U". Issuing a reset will of course, tell the printer to reselect its default symbol set.
 

wbenhart

New Member
See if this will help you,


def input parameter vert-pos as integer.
def input parameter hor-pos as integer.
def input parameter vert-size as integer.
def input parameter hor-size as integer.
def input parameter shade-lvl as integer.
def input parameter do-border as logical.
def input parameter bdr-size as integer.
def input-output parameter pcl-cmd as character.

def var t-esc as char format "X(1)" init "~E".


/* Set position command */
pcl-cmd = pcl-cmd +
t-esc + "*p" + string(vert-pos) + "y" + string(hor-pos) + "X".

/* Set box size */
pcl-cmd = pcl-cmd +
t-esc + "*c" +
string(hor-size) + "a" +
string(vert-size) + "b".

/* Set shade level and print or set black and print */
if shade-lvl > 0 then
pcl-cmd = pcl-cmd + string(shade-lvl) + "g2P".
else
pcl-cmd = pcl-cmd +
if do-border and bdr-size > 0 then "1P" else "0P".

/* do borders */
if do-border and bdr-size > 0 then do:

/* do top horizontal */
run lib/pclbox(vert-pos, hor-pos, bdr-size, hor-size, 0, false, 0,
input-output pcl-cmd).

/* do bottom horizontal */
run lib/pclbox((vert-pos + vert-size - bdr-size),
hor-pos, bdr-size, hor-size, 0, false, 0,
input-output pcl-cmd).

/* do left vertical */
run lib/pclbox(vert-pos, hor-pos, vert-size, bdr-size, 0, false, 0,
input-output pcl-cmd).

/* do right vertical */
run lib/pclbox(vert-pos, (hor-pos + hor-size - bdr-size),
vert-size, bdr-size, 0, false, 0,
input-output pcl-cmd).
end.


Good Luck!
 

Schreiber FooF

New Member
Thanks for your answer !

Hmm ... this should be working on a unix system ... I think ...
But I'm on a windows progress, and can't find the "lib/pclbox" file ...
can you explain me how to make it work on a windows system,
and send me the unix library to be sure to make it work on a unix system, I want to try it on unix too, must be a great method...

Thank you !
 

Schreiber FooF

New Member
hmm ah yes !! Haha !!
I have the a LAST ( i hope ) question ....

can you send me a simple example of using it ...

That would be "the sugar on top" ....


Thank you !!
 

wbenhart

New Member
Here is an example of what you can do with pclbox.p.
Make sure you compile pclbox.p before you run this example.


DEFINE STREAM rpt.
DEFINE VARIABLE t-pcl-cmd AS CHARACTER.
OUTPUT STREAM rpt TO PRINTER.
PUT STREAM rpt CONTROL "~033&a90P".
ASSIGN t-pcl-cmd = "".

run lib/pclbox.p (580, 1065, 1210, 1915, 0, yes, 3,
input-output t-pcl-cmd).
run lib/pclbox.p (595, 1080, 1180, 1885, 0, yes, 3,
input-output t-pcl-cmd).
run lib/pclbox.p (1005, 1080, 150, 1885, 15, yes, 3,
input-output t-pcl-cmd).


put stream rpt control t-pcl-cmd "~033(5N~033(s1p06v0s0b16901T"
"~033*p665y2430X" "QUALITY * SERVICE * DEPENDABILITY"
"~033(5N~033(s1p16v0s3b16901T" "~033*p728y2430X" "PCL Solutions"
"~033(s0B" "~033(5N~033(s1p06v0s0b16901T" "~033*p760y2640X" "Benhart Innovations"
"~033(5N~033(s1p10v0s0b16901T"
"~033*p740y1205X" '12345 N. Main St.'
"~033*p790y1205X" "Miami, FL 33166"
"~033*p840y1205X" "TELEPHONE: (305) 123-4567"
"~033*p890y1205X" "CONTACT: Wayne Benhart"
"~033*p1093y1688X" "RETURN POSTAGE GUARANTEED"
"~033(s0B".

put stream rpt control "~033(5N~033(s1p12v0s0b16901T"
"~033*p1315y1600X" "TO:"
"~033*p1315y1755X" "CUSTOMER NAME".
OUTPUT STREAM RPT CLOSE.





Good Luck,
Wayne Benhart
 
Top