On MS Windows (version does not matter) duplex code in a Postscript file worked correctly in version 8.56. (This is using the mswinpr2 driver.) Some change was made since and it is no longer working. To recreate, follow these steps: 1) Set your default printer to a printer that supports duplex printing. 2) Create a file called duplex.ps with this contents: mark /NoCancel true % don't show the cancel dialog /BitsPerPixel 1 % force 1 bit/pixel /QueryUser 3 % use default printer /UserSettings << /DocumentName (Immediate print ltr) % name for the Windows spooler /MaxResolution 600 % maximum document resolution >> (mswinpr2) finddevice % select the Windows device driver putdeviceprops setdevice << /Duplex true /Tumble false >> setpagedevice 3) Execute this command line: gswin32c -dBATCH -dNOPAUSE duplex.ps any-muli-page-document.pdf 4) If you run as above with 8.56, the document prints duplex. If you run with 8.6x, the document prints simplex. I've have not tested with 8.57, I never bothered to install that version.
The /Duplex key was added to the .outputattrkeys list in gs_setpd.ps with the massive 'cups merge' (rev 8026). This broke Duplex for all devices since it would be forced false by the .presentspecial logic invoked by .prepareparams This may be a factor in several other open bugs that mention Duplex: 689048 Duplex not working with pswrite device 689174 Pages 689363 Duplex information embedded within the document not honored 689729 Preserve copy count when converting PostScript to PCL-XL Since there is no detailed documentation on this change, I recommend the following patch. Then we can re-evaluate all of the other bugs and close those that are fixed. Log message: Revert .outputattrkeys to the list prior to rev 8026 to fix problems with Duplex introduced with that change. Index: Resource/Init/gs_setpd.ps =================================================================== --- Resource/Init/gs_setpd.ps (revision 9084) +++ Resource/Init/gs_setpd.ps (working copy) @@ -421,7 +421,7 @@ % Define the keys used in output attribute matching. /.outputattrkeys [ - /OutputType /Duplex /Tumble /ManualFeed + /OutputType ] readonly def } ifelse -------------------------------------------------------------------------- Assigning to Alex for patch review.
Upping the priority since a customer has reported the same issue.
I agree with the patch. PLRM (p. 416) says that /OutputType is the only attribute in the subdirectories of /OutputAttributes dictionary.
Patch committed as rev. 9350.
Changing customer bugs that have been resolved more than a year ago to closed.