Operating System - HP-UX
1752765 Members
5075 Online
108789 Solutions
New Discussion юеВ

How to disable blank page after each print job?

 
Bob Fonacier
Occasional Advisor

How to disable blank page after each print job?

After successfully disabling the header page, I now have this blank page after each print job. How can I disable it? Pls help, thanks.
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: How to disable blank page after each print job?

Tell us your spooler.

Tell us your OS.

If it happens to be openspool, live with it, the product is out of support.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bob Fonacier
Occasional Advisor

Re: How to disable blank page after each print job?

Basically our configuration is this:
We're printing from Oracle Financials Applications 11i sitting on HP-UX. All print requests will then be spooled to our Print server, and then to our Ricoh printers (remote printers).
Our O/S=HP-UX 11.11

Just this morning, I disabled the banner
printing as below:
cd /var/spool/lp/interface
vi
BSDh="-h"

Can I change other parameter on this file to disable blank page after every print job? If not what file should I configure in unix?
Bill Hassell
Honored Contributor

Re: How to disable blank page after each print job?

You'll have to verify that the Oracle program is not ejecting the extra page. Because you are using remote printing, there is virtually no control over the print job. The SysV spooler sends the file untouched to the remote server (in this case, a dumb LAN card) so you'll have to track down what was actually sent to the printer and whether the LAN card (the print server) has options for a page eject.

Note also that truly archaic programming techniques are still out there for handling printers, specifically, line counting. In the good old days of green bar paper, everyone knows that there are exactly 60 lines per page. Of course, that concept is completely useless with laser and inkjet printers. Lines per page are completely defined by fonts, interline spacing and even positioning macros in the printer language.

And to make this even more complex, modern printers have a concept of a logical page which may also be defined during the print job. In the logical page concept, when the selected font has produced N number of lines, a page eject is performed within the printer.

So the problem will take some time to resolve. HP-UX doesn't create any blank pages and most likely the Oracle Financials report writer probably doesn't (well, intentially) create an extra page. However, I have seen reports where the very last line of the report is followed by CR/LF and even though there is nothing on the new line, the LF (part of the report) kicks out a new page. Even though there is nothing to print on the new page, closing the print job will kick out the extra page. The fix is to remove the unnecessary CR/LF from the program or report writer.

With such problems, I would start by creating your own test pages, one that demonstrates the width of the page (start at 75 and work up to 134 chars in width) and create a 3 page document with every line numbered. Just print this with lp to see how the printer behaves with plain text.


Bill Hassell, sysadmin
Steven E. Protter
Exalted Contributor

Re: How to disable blank page after each print job?

It probably is Oracle btw.

You still didn't say what spooler you were using.

We do all of our oracle reports in pdf format, that helps with this issue.

We use a customized verion of easyspooler http://www.easyspooler.com to handle the requests. PDF and easyspooler will fix this.

Also check the default printer hard coded into the forms and reports startup scripts. If thats wrong, this behavior can be generated. To figure out what is wrong, check at metalink, I haven't a clue other than to know the one setup that works for me. Mine.


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
john korterman
Honored Contributor

Re: How to disable blank page after each print job?

Hi,
maybe you have already done this: if not, try to print on the printer from somehere else in order to se if that also produces an extra page - just to rule out that the printer setup is responsible for the extra page.
Just a thought, as the printer setup itself has been the culprit when our customers have complained about the same problem.

regards,
John K.
it would be nice if you always got a second chance
Steve Post
Trusted Contributor

Re: How to disable blank page after each print job?

Maybe your the page length is such that the last blank page is actually printing a lone space on a line.
Just a guess.....

Redirect the print job to a file and try to print it by hand.

You may discover the last blank page is actually part of the print job.
Or maybe the report puts a control-L at the end automatically.

Let's say it IS the report program and not the printer. You would need to remove that bottom line (the one with the line feed on it), from the report prior to printing.

cat report.txt | sed '$d' | lp -dprinter
Bob Fonacier
Occasional Advisor

Re: How to disable blank page after each print job?

Hi,

I'm not aware of our spooler name, what we're using is a the regular unix spooler for HP-UX 11.11.

I tried printing directly from command line the Oracle report and it printed WITHOUT the blank page. Maybe I'm just thinking that the report is the issue. BUT in saying this, I don't want to configure thousands of reports, instead I want to drill down on the real cause. If I can just tweak a setting in unix or our print server or on the physical printer itself, this would be the best solution for our company.

Bob
Bill Hassell
Honored Contributor

Re: How to disable blank page after each print job?

If the HP-UX spooler (lp) were adding a blank page, it would be on every job no matter what. This is an issue for your DBAs to look at. The report writer may be counting lines and if you are using a laser printer, there are virtually unlimited settings for lines per page. As mentioned before, a report may be exactly 60 lines long but what was sent to the printer was 60 lines of text plus a CR and LF. The LF character pushes the laser poistion beyond the limit of the page and will cause a page eject. The next page has nothing on it at all except the character pointer so when the job finishes, the blank page is ejected.

Now with some fancy scripting using awk or sed, you might figure out a way to strip off blank lines and perhaps formfeed characters (if any) end of each job, then modify the printer script to change from a cat of the file to use your script. This is of course nothing more than a patch to fix incorrectly formatted reports...


Bill Hassell, sysadmin