Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_FIRSTPAGE_* options don't toggle ManualFeed #2318

Closed
michaelrsweet opened this issue Mar 29, 2007 · 2 comments
Closed

AP_FIRSTPAGE_* options don't toggle ManualFeed #2318

michaelrsweet opened this issue Mar 29, 2007 · 2 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.2-current
CUPS.org User: mike

[From David]

I'm looking at:

rdar://problem/5027904 "First page from" setting on "Paper Feed" is not available.

We've fixed a large portion of that bug on the client side but from what I can see there is one remaining portion. Specifically, if you are doing printing where the first page is from a specific input slot and the remaining pages are from Manual Feed, I don't think pstops.c is inserting the proper PostScript code. Specifically, what happens is that the DocumentSetup code emits ManualFeed true (as expected) but when we get to Page 1, the proper code is emitted for InputSlot N but there is no ManualFeed false code emitted. That might work for some printers I suppose but for most that will produce manual feed for page 1 instead of the appropriate slot.

I looked at pstops.c and I believe the diffs below address this, although you may not consider it the appropriate solution.

Index: pstops.c

--- pstops.c (revision 302)
+++ pstops.c (working copy)
@@ -1245,7 +1245,7 @@
pageinfo->num_options = cupsAddOption("InputSlot", doc->ap_input_slot,
pageinfo->num_options,
&(pageinfo->options));

  •  pageinfo->num_options = cupsAddOption("ManualFeed", doc->ap_manual_feed,
    
  •  pageinfo->num_options = cupsAddOption("ManualFeed", doc->ap_input_slot ? "False" : doc->ap_manual_feed,
                                         pageinfo->num_options,
                     &(pageinfo->options));
    
    }
    @@ -1258,7 +1258,7 @@
    pageinfo->num_options = cupsAddOption("InputSlot", doc->input_slot,
    pageinfo->num_options,
    &(pageinfo->options));
  •  pageinfo->num_options = cupsAddOption("ManualFeed", doc->manual_feed,
    
  •  pageinfo->num_options = cupsAddOption("ManualFeed", doc->ap_input_slot ? "False" : doc->ap_manual_feed,
                                         pageinfo->num_options,
                     &(pageinfo->options));
    
    }
@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Fixed in Subversion repository.

Minor bug in suggested fix, see attached patch...

@michaelrsweet
Copy link
Collaborator Author

"str2318.patch":

Index: pstops.c

--- pstops.c (revision 6414)
+++ pstops.c (working copy)
@@ -1245,7 +1245,9 @@
pageinfo->num_options = cupsAddOption("InputSlot", doc->ap_input_slot,
pageinfo->num_options,
&(pageinfo->options));

  •  pageinfo->num_options = cupsAddOption("ManualFeed", doc->ap_manual_feed,
    
  •  pageinfo->num_options = cupsAddOption("ManualFeed",
    
  •                                        doc->ap_input_slot ? "False" :
    
  •                       doc->ap_manual_feed,
                                         pageinfo->num_options,
                    &(pageinfo->options));
    
    }
    @@ -1258,7 +1260,9 @@
    pageinfo->num_options = cupsAddOption("InputSlot", doc->input_slot,
    pageinfo->num_options,
    &(pageinfo->options));
  •  pageinfo->num_options = cupsAddOption("ManualFeed", doc->manual_feed,
    
  •  pageinfo->num_options = cupsAddOption("ManualFeed",
    
  •                                        doc->input_slot ? "False" :
    
  •                       doc->manual_feed,
                                         pageinfo->num_options,
                    &(pageinfo->options));
    
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant