Hi, I gave a 3 page ps file which is generated using Mozilla application to pstops filter with duplex and watermark option. Printed properly with duplex and watermark on 3 pages. The same file i gave it to gs in command line. gs -sDEVICE=ljet4 -sOUTPUTFILE=gs.prn pstops_duplex_watermark.ps It has generated 4 pages and watermark is printed on 4th page also only for solaris 10 OS. We did not face the issue when we were using Solaris 9 OS. The same ps file i gave it to AIX and it has generated 3 pages properly. Please help with solution.
Created attachment 4699 [details] ps file generated using pstops filter
Created attachment 4700 [details] pcl file by Ghostscript
Hi, Please confirm the bug and please let me know whether the bug will be fixed in later releases.
When /Duplex is true it is necessary to generate 4 pages. Page 1, Page 2 (printed on the back of page 1), Page 3 and Page 4 (printed on the back of page 3). See p416 of the 3rd edition PostScript Language Reference Manual. If this is not done, the 'last' page would remain in the duplex unit of the printer and the first page of the next document printed as the reverse of the 3rd page. However, the 'ps file generated using pstops filter.ps' document does not activate PostScript duplexing. There are a number of comments (which are no-ops as far as staright PostScript interpreters are concerned), which relate to the Foomatic RIP, eg: %%BeginFeature: *Duplex DuplexNoTumble %% FoomaticRIPOptionSetting: Duplex=DuplexNoTumble %%EndFeature Ghostscript will ignore these, other DSC processing applications may not. In particular the FoomaticRip (a part of CUPS) may well do something with these comments. The job does in fact contain 4 pages, the fourth page consists of a simple showpage: %%Page: 4 4 showpage %%Trailer %%Pages: 4 %%EOF This gets a watermark because of the custom EndPage procedure contained in the PostScript program. So, Ghostscript is doing exactly what it should do. I believe that pstops may have added the additional 4th page due to duplexing being active in the original program. The original report says: "I gave a 3 page ps file which is generated using Mozilla application to pstops filter with duplex and watermark option. Printed properly with duplex and watermark on 3 pages. The same file i gave it to gs in command line." Yet the only PostScript file we have been given appears to be the result of pstops. So is the complaint that Ghostscript pritns 4 pages on the *converted* job ? Or have we not been given the 'same file' as was input to pstops ? Since pstops doesn't print anything, how was this 'printed properly' ? Much of the report doesn't make sense. There are references to 'giving' the file to operating systems, which don't handle PostScript directly. Eg: "The same ps file i gave it to AIX and it has generated 3 pages properly" Possibly what is meant is that the file has been processed by versions of Ghostscript installed on several different operating systems. In this case it is likely that the difference in behaviour is due to different versions of Ghostscript being present. Possibly duplexing behaviour has changed between different versions of Ghostscript, most likely due to bugs being fixed. Summary: The supplied PostScript file behaves as expected. The description of the behaviour of the original file (not supplied apparently) matches the expected behaviour of a PostScript device when Duplex is true. I don't believe this is a bug, but can't tell for certain without the original file.
Not sure why this wasn't closed or why this was assigned to me. Ken's analysis appears complete and correct.