Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

collated duplex printing of odd number of sheets doesn't work correctly beyond the first copy #389

Closed

Description

@michaelrsweet

Version: 1.1.20rc6
CUPS.org User: david.gelphman

When printing collated output and doing duplexing in the printer, a document that has an odd number of pages is producing incorrect output. The first copy is correct, that is, the first copy has an extra sheet generated before the next copy is generated. This ensures that the first set is correct. Unfortunately the extra sheet is ONLY generated for the first set and the second copy has the first sheet of the 3rd copy on the back of the last sheet of the second. And so on.

Activity

  1. michaelrsweet commented on Nov 13, 2003

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Reassigned to 1.1.x, since we'll want to fix this bug there as well...

  2. michaelrsweet commented on Nov 19, 2003

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Can you post a sample print file and PPD file that demonstrates this problem? Also, what options are getting passed into the PostScript filter?

    I just did a quick check of the code and it looks like we are sending an even number of pages in all cases...

  3. michaelrsweet commented on Nov 20, 2003

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: david.gelphman

    I just tried this with TOT cups from easysw. I had a 3 page PS file and ran the pstops filter with the following options in gdb:

    set env PPD /private/etc/cups/ppd/Badger8500.ppd

    file pstops

    set args "205" "daveg" "test" "3" "Collate=True Duplex=DuplexNoTumble" 3page.ps > out.ps

    The PPD file is for a duplexing printer. The output was a 10 page PS file. As described in the bug report the first copy was correct and subsequent copies did not generate the extra side at the end of the set.

    Let me know if you have any problem reproducing this.

  4. michaelrsweet commented on Nov 20, 2003

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Can you post the PPD and PS files you are using?

  5. michaelrsweet commented on Nov 24, 2003

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    OK, super simple patch (see file); basically, the extra page was only output for "slow" duplex (for the inkjet printers that duplex by flipping the page), instead of for all printers (like the first copy does).

  6. michaelrsweet commented on Nov 24, 2003

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Fixed in CVS - the anonymous CVS repository will be updated at midnight EST.

  7. michaelrsweet commented on Nov 24, 2003

    @michaelrsweet
    ContributorAuthor

    "str389.patch":

    Index: pstops.c

    RCS file: /development/cvs/cups/filter/pstops.c,v
    retrieving revision 1.108
    diff -u -r1.108 pstops.c
    --- pstops.c 28 Aug 2003 14:30:02 -0000 1.108
    +++ pstops.c 24 Nov 2003 15:31:37 -0000
    @@ -873,7 +873,7 @@
    end_nup(NUp - 1);
    }

    • if (slowduplex && !(page & 1))
      
    • if (Duplex && !(page & 1))
      
      {
      /*
      * Make sure we have an even number of pages...
  8. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions