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

RequiresPageRegion should not be consulted for Manual Feed #514

Closed
michaelrsweet opened this issue Jan 8, 2004 · 2 comments
Closed

RequiresPageRegion should not be consulted for Manual Feed #514

michaelrsweet opened this issue Jan 8, 2004 · 2 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.1.20
CUPS.org User: david.gelphman

The *RequiresPageRegion keyword only applies to input slots, not to manual feed printing. The current cups implementation uses that keyword to decide whether to include the PageRegion code even when doing manual feed printing (where there is no input slot). This requires manual feed print jobs to produce incorrect output in many circumstances (I'm tracking this problem for envelopes right now.)

The issue with RequiresPageRegion is that for printers that do not detect the paper size associated with a given input tray, the page region code is required. For printers that DO have paper tray size detection the input slot code is not required. For manual feed, there is no paper tray/size that can be detected so PageRegion code should always be generated.

Here's the proposed change for emit.c:

{
/*
* Manual feed was selected and/or the input slot selection contains
* PostScript code. Use the PageRegion option...
*/

ppdMarkOption(ppd, "PageRegion", size->name);

/* 
    RequiresPageRegion does not apply to manual feed so we need to check that we are not doing manual feed
    before unmarking Page Region.
*/
if ( !(manual_feed != NULL && strcasecmp(manual_feed->choice, "True") == 0) &&
    ( (rpr && rpr->value && !strcmp(rpr->value, "False")) ||
    (!rpr && !ppd->num_filters) )
    )
{
 /*
  * Either the PPD file specifies no PageRegion code or the PPD file
  * not for a CUPS raster driver and thus defaults to no PageRegion
  * code...  Unmark the PageRegion choice so that we don't output the
  * code...
  */

  page = ppdFindMarkedChoice(ppd, "PageRegion");

  if (page)
    page->marked = 0;
}
@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: david.gelphman

RCS file: /home/anoncvs/cups/cups/emit.c,v
retrieving revision 1.37
diff -u -d -b -w -u -r1.37 emit.c
--- emit.c 20 Sep 2003 15:47:13 -0000 1.37
+++ emit.c 12 Jan 2004 23:03:27 -0000
@@ -691,8 +691,14 @@

 ppdMarkOption(ppd, "PageRegion", size->name);
  • if ((rpr && rpr->value && !strcmp(rpr->value, "False")) ||
  • /*
  •    RequiresPageRegion does not apply to manual feed so we need to check that we are not doing manual feed
    
  •    before unmarking Page Region.
    
  • */
  • if ( !(manual_feed != NULL && strcasecmp(manual_feed->choice, "True") == 0) &&
  •    ( (rpr && rpr->value && !strcmp(rpr->value, "False")) ||
     (!rpr && !ppd->num_filters))
    
  •    )
    
    {
    /*
    • Either the PPD file specifies no PageRegion code or the PPD file

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

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

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