we are not using the lp command to print the document, we are using the -Q printername and send the job to the printer device in server and print it out.
The problem we facing now is when we print the document, it do not have the page eject and causing alignment issue when print 2 document at a time.
We are new to Linux, previously we are using HP-UX.
In HP-UX environment, there is a file in "/etc/lp/interface/model.orig/" we can edit it to add in the "echo "\f\c", then when we choose to print to the printer, it will have the page eject.
But now in Linux, we can't find the way to add in this "echo "\f\c" to solve the page eject issue.
So hope that anyone in the group here can share some experience with us.
You can test it on the command line.
In Linux in a /bin/sh shell echo "\f\c"
will print \f\c
While printf "\f"
will do some "formfeed" action, e.g. clear the screen.
On Unix in a /bin/sh shell you will find that both commands behave the same.
Sorry, the \c\n (as in my last post) should not be in the printf.
If you take a peek at the CUPS documentation, you can see that to submit commands to your default printer, typically you use:
# lpr filename
So, if you want to send any command to the printer, you can put the command in a file and then run the lpr command.
I have not tested this, but you can try to simply put the command you want to execute in a file and send that to the printer via lpr, for example to only print a form feed, or page feed, just put that sequence to send to the printer in a file and try sending it to the printer with lpr as above.
When you get this first step working; then you can see if you can add a CUPS filter or command to the pre-print process and you should be good to go.
I don't have a printer, so I cannot try this for you; but if you try some things and post back your results, we can help you get this working.