Summary: | No back side orientation support for duplex printing with "pclm" output device | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Till Kamppeter <till.kamppeter> |
Component: | PDF Writer | Assignee: | Default assignee <ghostpdl-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | robin.watts |
Priority: | P4 | ||
Version: | 9.53.3 | ||
Hardware: | PC | ||
OS: | Linux | ||
Customer: | Word Size: | --- |
Description
Till Kamppeter
2021-08-02 16:03:33 UTC
To manage back side orientation in pclm and pdfimage... device I suggest the following: Use the already existing boolean options -dDuplex and -dTumble and add (for pclm and pdfimage...) -sSheetBack with the 4 choices Normal, Flipped, Rotated, and ManualTumble in this order. If the user does not supply the appropriate option, use the default: -dDuplex -> false -dTumble -> false -sSheetBack -> Normal Now do this (pseudo code): if (!Duplex || is_front_side(current_page)) { flipX = false; flipY = false; else { if (SheetBack == Normal) { if (Tumble) { flipX = true; flipY = true; } else { flipX = false; flipY = false; } } else if (SheetBack == Flipped) { if (Tumble) { flipX = false; flipY = true; } else { flipX = false; flipY = true; } } else if (SheetBack == Rotated) { if (Tumble) { flipX = false; flipY = false; } else { flipX = true; flipY = true; } } else if (SheetBack == ManualTumble) { if (Tumble) { flipX = false; flipY = false; } else { flipX = false; flipY = false; } } } This should do the correct thing. Soory, I got somehow completely confused. Now I have found the official documentation for backside orientation as part of the documentation of the PWG Raster format: https://ftp.pwg.org/pub/pwg/candidates/cs-ippraster10-20120420-5102.4.pdf See sections: 4.3.2.8 CrossFeedTransform and FeedTransform / Table 9 and 5.1.1 PwgRasterDocumentSheetBack / Figure 5 I have implemented support for doing Duplex/Tumble in the PCLm device in the following commit. commit 0a0c521d85d0275c0d207a35bd27f0a31d54012b Author: Robin Watts <Robin.Watts@artifex.com> Date: Fri Aug 6 12:59:11 2021 +0100 Duplex/Tumble/Tumble2 support for PCLm. This also allows Tumble2 to be set to introduce an additional X flip. This should allow you to support all the required output types for IPP. While I expect this to work for PDF, PCL, XPS etc, I have my doubts that this will work for PS files. We manage Duplex in software by changing the 'initial' matrix returned by the device. Postscript has a (slightly awkward) way of allowing the 'default' matrix for a device to be set and to persist from page to page. Because of this the changed matrix is not consulted on each page. I am considering possible ways around this that give the correct result without breaking our conformance to the Postscript spec. |