Natural and Printing, Part IV

I have 3 printers currently defined in CUPS : Suse Linux,
dpp1(lexmark T644), dpp3(lexmark T644), systems (lexmark C910),

Natparms look like:

LPT1 Auto 132 66 32767 /usr/sag/Scripts/LPT1 D
LPT2 Auto 132 66 32767 /usr/sag/Scripts/LPT2 D
LPT3 Auto 132 66 32767 /usr/sag/Scripts/LPT3 D
LPT4 Auto 132 66 32767 /usr/sag/Scripts/LPT4 D

Scripts/LPT1 looks like:

#!/bin/sh
cat > $HOME/PrintJobs/LPT1.rpt
lp -d dpp1 $HOME/PrintJobs/LPT1.rpt
exit 0

Scripts LPT2,3 and 4 are similar except for the digit following LPT will be 2 for LPT2, 3 for LPT3 etc.

In my Natural pgm, I can use
define printer(1) output ‘LPT1’ with Write(1)
define printer(1) output ‘LPT3’ with Write(1)
define printer(1) output ‘LPT4’ with Write(1)

and everything works, and I can substitute different physical printer names, like dpp1 or dpp3 or systems in the scripts, and it routes the print to the correct printer according to whatever printer is specified in the script.

BUT, As SOON As I use
define printer(1) output ‘LPT2’

I receive Nat 1586, It does not like LPT2…I can use LPT1 or LPT3 or LPT4, I havent tried any others, but I know LPT2 will not work. It doesnt make sense to me.
Any ideas??
thanks in advance

Have you checked the permissions of the scripts?

ls -l /usr/sag/Scripts/LPT?

Hi Matthias, How is it in the Bufferpool? :slight_smile:
Yes, I have learned to check permissions always, (hopefully), here is what I have
-rwxr-xr-x 1 sag sag 89 2007-04-25 14:18 LPT1
-rwxr-xr-x 1 sag sag 92 2007-04-26 15:03 LPT2
-rwxr-xr-x 1 sag sag 92 2007-04-26 14:58 LPT3
-rwxr-xr-x 1 sag sag 89 2005-10-21 11:33 LPT4

Please try the following command to find out, whether your script works without natural or not:

printf "test and formfeed\n\f" | /usr/sag/Scripts/LPT2

That worked fine Matthias,
so, something in Natural is causing this?
hmmmm…

If you did it with the same user…

Aren’t there any differences in NATPARM? I think there’s a parameter called “print to file” for each printer which can be “Y” or “N”. In your case it has to be “N”. Because you don’t want to write into /usr/sag/Scripts/LPT1. You want to pipe into the script.

But to be honest, I don’t have any other ideas any more. :frowning:

Matthias:
Here are the options in NATPARM: for that last field:
Physical (D)evice, (E)ntire Connection, (F)ile. Use [PF2] for selection list
I have all the entries set to ‘D’ for Physical Device… F would designate ‘FILE’
We’re at Nat 6.2.2 in Linux, so maybe different than yours.

I just found out it is intermittent… Now I can use LPT2, Last time I tried it didnt work, now it does… just great :roll:
thanks for your time