PostScript new document command in duplex mode

We are printing several duplex documents to one single ps-file, and we have used the showpage command to indicate that a new document is to be printed. However, due to the duplex setting the first page of the new document might end up on the back of the last page of the previous document, if the number of pages previous document is odd.

Are there any standard way to handle this, or is the only (and ugly) solution that we count the number of pages in each document, and if the number of pages is odd then we add a blank page at the end?
LVL 1
torstenhagemannAsked:
Who is Participating?
 
nociConnect With a Mentor Software EngineerCommented:
On unix you normally generate a print file output and queue that to a print queue using commands like lpr (BSD printing)  lp (SUN/Cups printing) or in the case of kde use kprinter to fill out some processing details (if wanted), otherwise use lpr/lp for queing.

The queing command specifies options needed for the job (if needed, things like draft/final etc.) and a queue associated with the printer.

A file is generated PER printjob.
 
0
 
torstenhagemannAuthor Commented:
The problem happens between the StreamServe application (that is used for generating the postscript codes), running on Linux. The printers used are Xerox DP180 running standard postscript.
0
 
ai_ja_naiCommented:
it's your approach that is flawed, not PS

>We are printing several duplex documents to one single ps-file

PS is not supposed to manage such details. This is due to UNIX phylosophy: each program does one thing and does it well. To add features, add programs in the middle like rings in a chain that take output of a ring, elaborate, and send its own output to the next one.

If you want to use PS to do everything, yes, there's no other solution except adding a blank pages on odd documents to make them even.
0
Worried about phishing attacks?

90% of attacks start with a phish. It’s critical that IT admins and MSSPs have the right security in place to protect their end users from these phishing attacks. Check out our latest feature brief for tips and tricks to keep your employees off a hackers line!

 
nociSoftware EngineerCommented:
Are you printing directly from the application to the printer?
Or is there  a printing system in between?
In the last case that should handle the task of handling the output correctly...

Also a printer should reset when receiving the ^D that separates two print jobs,
if there is no End of Job sign then everything is received as a single large job with indeed running together of pages.

The ^D should be inserted by a Printing system, if you drive the printer DIRECTLY from you application then that needs to behave like a printing system.
0
 
ai_ja_naiCommented:
>Also a printer should reset when receiving the ^D that separates two print jobs,

I belive the printing job is only one... they append everything in a single PS file and then send it to the printer. That's why they get this glitch
0
 
torstenhagemannAuthor Commented:
Thanks.

@noci: The application generates the PS file, and I expected the application to handle this correctly - which it does not, and that was why I asked here, as I could get nowhere with the support from the applications support team.

I will check our PS files to see if there are any End of Job signs included, but I assume not, I would expect that was included when the PS file was added to the print queue.

@ai ja nai: thanks. The philosophy of having everything in one print file is from the application vendor, but they have only recently started to run on linux, previously they only supported MS, but I would expect that it did not make a difference how PS files were handled by the printer. Am I wrong on this?

Thanks for the help so far!
0
 
ai_ja_naiConnect With a Mentor Commented:
noci preceeded me, but it's like that: you can't use PS to queue to-be-printed files, it's flawed by concept. While on Windows, evidently, they misuse this feature, UNIX doesn't forgive your mistakes and does the right thing: append without thinking about it the two documents is a duplex format, which is not what you want. May using showpage twice be solving this issue?
The right way to do it eventually is to use a single PS file per document and queue them all with a separate command
0
 
torstenhagemannAuthor Commented:
Thanks for the input - I see that there is quite a bit to be discussed with the application provider (which is why I rated the answers as "Good" - let me know if this is unfair, and I will change it :-) - I feel that Excellent is when there is a ready-to-implement solution).
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.