Problems using PCL in SUN Solaris

cesida

New Member
Hi there!

I have a program that print forms using PCL code to select a form from printer memory and set fonts sizes and styles (bold, Italic, etc.). It run OK on Clients NT but I'm having some problems to run it on SUN Solaris in batch mode.
When I change the output to a text file I get the correct characters (PCL strings merged with field values), the same characters I get in NT.
When the output is the printer, I get the blank forms (all the boxes and lines but none data).
I try deleting the PCL code part that select the form to print and I got a blank page. By the other hand, if I send the results of FOR EACH statement directly to the printer (without PCL codes) it is printed OK.
I think the problem is the merge of both PCL and data but it works OK in NT.

Somebody can help me?

Thanks.
 

Jens

New Member
Hi there!

What command are you using to print?
I do something like this (and it works):

OUTPUT STREAM xx thru("lpr -Pprintername -h").
PUT STREAM xx codes and things to print.
OUTPUT STREAM xx CLOSE.


Regards
Jens
 

cesida

New Member
Hi Jens!

I always use something like this:

ASSIGN
vSetPage = chr(27) + "E" + chr(27) + "&l26a1o0s0z0u8d1e0l66F"
vSetPrinterForm = chr(27) + "&f30y4X"
vSetFont = chr(27) + "(s0p12h10v0s0b3T" /* Courier 12 */
vSetBold = chr(27) + "(s3B"
vSetNormal = chr(27) + "(s0B".

FORM HEADER
vSetPage AT ROW 1 COLUMN 1
vSetPrinterForm
vSetFont
TODAY AT ROW 3 COLUMN 1
vSetBold
vTitle AT ROW 4 COLUMN 10
vSetNormal
FIELD-1 AT ROW I1 COLUMN J1
...
FIELD-n AT ROW In COLUMN Jn
WITH SIZE 200 BY 50 NO-LABEL NO-BOX FRAME Form1.

OUTPUT TO PRINTER.
VIEW FRAME Form1.
OUTPUT CLOSE.

It works OK on NT but It doesn't work very well on Solaris.
Is there any different in the way of use of PCL codes and ESC code in Solaris?
Should I use "STREAM" instead of "TO PRINTER"?

Many thanks!
 

Jens

New Member
I don't know if the frame might use some strange control characters or something like that.

Think i missed a thing in my previous answer: i use "put control" instead of just put , and also (which shouldn't make any difference) "\033" instead of chr(27).

Regards
Jens
 
Top