heliopaixao
26th July 2006, 21:10
Hi,

I run Baanc4 on AIX4.3 and I have configured a printer with the following specification (where t620 is a remote printer)

Maintain Device Data
Device : UEC020
Description : Lexmark T620
Device Type : Rewrite file
Locale :
Printer
----------------------------------------------------------------
Driver :
Device Queue :
Paper Type :
Left Margin : Form Feed :
File
----------------------------------------------------------------
Driver :
Shell Command :
4GL Program : ttstpconv
Argument : POSTSCRIPT\lp -d t620 ${HOME}/fn
Path : ${HOME}/fn
Change allowed : No
Page Length : 66


What I need to configure to print in landscape mode?

mig28mx
27th July 2006, 04:14
Hi,
If the printer is a Postscript, In the argument, you should specify a postscript driver for landscape format. Or, define to the printer a paper type to landscape.

Hope this help.

Markus Schmitz
27th July 2006, 09:13
I also would be interested for a solution to this.

To be honest, I think it is not possible. The postscript file generated by Baan itself contains most likely the orientation information. So if the ttstpconv puts a portrait in there, then the only solution would be to start a unix script to change this orientation in the file. But in this case all the other data and layout may be wrong.

Did anybody try this?

mig28mx
27th July 2006, 16:55
Hi Markus,
I send a file were is described the postscript file of a landscape orientation.
Hope this helps.

Markus Schmitz
27th July 2006, 17:03
Hi Markus,
I send a file were is described the postscript file of a landscape orientation.
Hope this helps.

Thanks, but unfortunately does not adress the topic at all. The attached document describes the escape sequences in PCL (Printing Command language) for HP printers. Obviously postscript does not use escape sequences. Also when you define a postscript printer in Baan, than you can not specify the printer driver, so whatever you change in printinf has no effect.

günther
28th July 2006, 11:40
In one of my sessions, I'm using ttstpconv to generate postscript. Then comes the trick: I'm reading the original file and writing a slightliy modified file ...

So, if you create your own version of ttstpconv that works like that, you could enter that into your device driver.

Heres is a code snippet of my session to give you an idea (translate and scale values are okay for A4 paper size):


if strip$(buf) = "fs -20 0 translate 0.88 1 scale" then
buf = "fs "
& "90 rotate "
& "0 -615 translate "
& "0.707106781 0.707106781 scale "
& "1.2 1.05 scale"

seq.puts(buf, fp.o)
continue
endif

günther
28th July 2006, 12:15
I just found that ttstpconv also offers a different option to generate postscipt: postscripta4l. I tried it on my system and checked the difference:


$ diff Fileout.postscripta4l Fileout.postscript

88,90c88
< /t {806 0 translate 90 rotate} bind def
< /p {680 0 translate} bind def
< /p2 {showpage} bind def
---
> /p {showpage} bind def
207c205
< fs
---
> fl -20 -2 translate 0.88 1 scale
211d208
< t
213c210
< flb 45 774 m (Date) s fl ( ) s flb (:) s fl ( ) s flb (28.07.06) s fl ( ) s flb ([) s fl flb (11:07) s fl flb (]) s fl ( ) s flb (PAPER TYPES) s fl ( ) s flb (Page) s fl ( ) s flb (:) s fl ( ) s flb ( 1) s fl
---
> flb 45 774 m (Date) s fl ( ) s flb (:) s fl ( ) s flb (28.07.06) s fl ( ) s flb ([) s fl flb (11:08) s fl flb (]) s fl ( ) s flb (PAPER TYPES) s fl ( ) s flb (Page) s fl ( ) s flb (:) s fl ( ) s flb ( 1) s fl
228c225
< p 2
---
> p

george7a
28th July 2006, 12:25
Heres is a code snippet of my session to give you an idea (translate and scale values are okay for A4 paper size):

This works good. I didn't change it in ttstpconv, I prefer to write a small script that will print to the PS device then add your code in the right place

- George

heliopaixao
28th July 2006, 14:39
Hi, guys

first of all thanks for your suggestions. I have found the documentation of ttstpconv and here is how I have configured my printer queue:

Maintain Device Data
Device : UEC020
Description : Lexmark T620
Device Type : Rewrite file
Locale :
Printer
----------------------------------------------------------------
Driver :
Device Queue :
Paper Type :
Left Margin : Form Feed :
File
----------------------------------------------------------------
Driver :
Shell Command :
4GL Program : ttstpconv
Argument : POSTSCRIPTA4L\lp -d t620 %s
Path :
Change allowed : No
Page Length : 66


Here is the documentation of ttstpconv:

The Baan program ttstpconv makes output conversions in different formats and is able to send the files for some formats to the client. This solution describes the arguments and their meanings. This is the status from September 2001.

For creating a device you use the session ttaad3100m000. This session maintains all the devices. Next to the normal printer definitions you can define output to a file. If this is used you can define a conversion program. It's name is ttstpconv and has several arguments to make a conversion.

First we describe how to define the head of the session.

field: content

device: This is a short name for the device to select in the ttstpsplopen dialog.
description: This is a longer text for describing the device you create.
device type: "rewrite file" This is the type you use for the ttstpconv program.
locale: ISO-8859-1 This is the standard locale for Central Europe.

Now the part for the conversion program itself follows:

field: content

4GL program: ttstpconv
page length: 66

For the line argument and path the following settings dependent for the type of conversion is needed.


1) postscript
This argument allows you to convert the output to postscript level 1. The file is created on the server and can be handled there with the command following the argument.

Example:
argument: POSTSCRIPT
path: /tmp/baan.out

Here the output is converted to postscript and stored in the file /tmp/baan.out.

Example:
argument: POSTSCRIPT\/tmp/test %s
path: /tmp/baan.out

Here the output is converted to postscript and handled afterwards by the program /tmp/test as the first parameter. /tmp/test can be for example the command "lp -d printer $1".

2) postscripta5
This argument is the same like before. The result is a page in postscript format for A5 size or half page on A4. All the rest is identically like POSTSCRIPT.

3) postscripta4l
This argument is the same like before. The result is a page in postscript format for A4 in landscape. All the rest is identically like POSTSCRIPT.

4) postscriptbsb
Again a postscript conversion with the same possibilities. It's just a special format.

5) monarch
I will also refer to the description of solution 17572. You can print the output in a format for the monarch print management program. The output is created on the server and then transferred to the client over the established bw connection. There is no filename to define. The result will be directly transferred to the client and then the monarch program be started.

Example:
argument: MONARCH c:\monarchw\monarch.exe
path:

Be careful that there is a blank between the argument MONARCH and the path to the monarch program on the client machine.

6) ascii or vi
The output is created on the server with only ASCII characters. The resulting file can then be processed after the creation.

Example:
argument: ASCII
path: /tmp/baan.out

The file /tmp/baan.out is created with the text of the report.

Example:
argument: ASCII\/tmp/test %s
path: /tmp/baan.out

The file /tmp/baan.out is created and afterwards the script /tmp/test executed on the server with the filename /tmp/baan.out as the first parameter.

You can use vi instead of ascii.

7)ascii: (please remind the colon after the ascii!!!!!)
The output is created in the ascii format and then transferred to the client. After the transfer the program in the argument line is executed on the client. This must be done with a bw connection.

Example:
argument: ascii:c:\progra~1\office\winword.exe
path: /tmp/baan.out

The file /tmp/baan.out is created on the server, transferred to the client and then called together with the winword program.

8) rtf
The output is created in the rtf format and placed on the server. You can add a program to handle the output file afterwards.

Example:
argument: rtf
path: /tmp/baan.out

The file /tmp/baan.out is created on the server in the rtf format.

Example:
argument: rtf\/tmp/test %s
path: /tmp/baan.out

The file /tmp/baan.out is created and handled by the script /tmp/test as the first argument.

9) rtf: (please remind the colon after the rtf!!!!!)
The output is created in the rtf format and then transferred to the client. After the transfer the program in the argument line is executed on the client. This must be done with a bw connection.

Example:
argument: rtf:c:\progra~1\office\winword.exe
path: /tmp/baan.out

The file /tmp/baan.out is created on the server, transferred to the client and then called together with the winword program.

10) rtf_landscape
This is the same like option 8) but only for output in landscape mode.

11) rtf_landscape: (please remind the colon after the rtf_landscape!!!!!)
This is the same like option 9) but only for output in landscape mode.

12) html
The output of Baan is created as a html file on the server. The file can be loaded in a web browser to see it.

Example:
argument: html
path: /tmp/baan.out

The html file /tmp/baan.out is created and left on the server.

Example:
argument: html\/tmp/test %s
path: /tmp/baan.out

The html file /tmp/baan.out is created on the server and processed by the script /tmp/test as the first argument.

Together with the html conversion you can also define one of the following or all:
-g
-c
-f

The picturefile will be included at the top of the HTML output. The name is a word that will be displayed additionaly on top of the report and fontsize is the size you define in the tag of html. All these parameters are optional and can be used in combinations.

13) html: (please remind the colon after the html!!!!!)
The output is generated in html format and then transferred to the client and processed by the program called in the argument line.

Example:
argument: html:c:\Progra~1\IEXPLORE.exe %s
path: c:\temp\file.html

The html file is transferred to the file c:\temp\file.html on the client and then the internet explorer is opened with the file.

Also the additional parameters of html can be used.

14) uni
The output is generated in the uniplex format on the server and can be handled by a script following the uni statement.

Example:
argument: uni
path: /tmp/baan.out

The file /tmp/baan.out is created on the server in uniplex format.

Example:
argument: uni\/tmp/test %s
path: /tmp/baan.out

The file /tmp/baan.out is created in uniplex format and handled as the first argument in the script /tmp/test.

15) vp
The output is generated in the ventura format on the server and can be handled by a script following the vp statement.

Example:
argument: vp
path: /tmp/baan.out

The file /tmp/baan.out is created on the server in ventura format.

Example:
argument: vp\/tmp/test %s
path: /tmp/baan.out

The file /tmp/baan.out is created in ventura format and handled as the first argument in the script /tmp/test.

16) wp5.0 or wp50
The output is generated in the wordperfect format on the server and can be handled by a script following the wp50 statement.

Example:
argument: wp50
path: /tmp/baan.out

The file /tmp/baan.out is created on the server in wordperfect format.

Example:
argument: wp50\/tmp/test %s
path: /tmp/baan.out

The file /tmp/baan.out is created in wordperfect format and handled as the first argument in the script /tmp/test.