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

All options ignored when printing from Windows Driver #1839

Closed
michaelrsweet opened this issue Jul 13, 2006 · 11 comments
Closed

All options ignored when printing from Windows Driver #1839

michaelrsweet opened this issue Jul 13, 2006 · 11 comments
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

@michaelrsweet michaelrsweet commented Jul 13, 2006

Version: 1.2.1
CUPS.org User: jmtorres

I have a postscript printer configured in CUPS with the manufacturer original PPD. Printing from a Linux client work fine. But I've used cupsaddsmb to setup the CUPS Windows Driver in a samba server and when I print throught samba all options are ignored (e.g. duplex).

After some test, I think:

  • This isn't the bug #1750, because the release 1.2.2 has the same problem.
  • The problem is how pstops works. pstops preserve all BeginFeature from the original document but inserts some default options (taken from the PPD in /etc/cups/ppd) at the document beginning. Therefore the printer use that options, ignoring the options set by the driver.
@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jul 13, 2006

CUPS.org User: mike

Please attach a sample print file from the Windows system (check the "print to file" box) along with the PPD file in /etc/cups/ppd for the queue you are printing to.

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jul 13, 2006

CUPS.org User: jmtorres

print.ps is the sample print file and oc5400.ppd is the printer PPD.

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jul 17, 2006

CUPS.org User: kolbi

I have the same problem (with different other printers) and solved this with an ugly hack.

I installed every printer twice. 1x with duplex enabled @ default + 1x with duplex disabled @ default.
So the windows user should choose a printer for duplex or the other for
simplex.

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jul 28, 2006

CUPS.org User: tbsky

Hi:
the same problem here. i use cups windows driver, and want to
select tray. the generated postscript file do have tray information
in it. but somehow cups server just ignore the information. is there
any way to fix it?

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jul 31, 2006

CUPS.org User: pigsign

I worried this same problem of selecting tray for a long time.

I see the generated .ps file with Cups windows 6.0 driver that have the information of selecting tray. So does Cups server somewhere ignore this information or any method that can resolve this ?

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Aug 22, 2006

CUPS.org User: klaus.steinberger.physik.uni-muenchen

The Options will be ignored if "cups options = raw" in the smb.conf File is not set.

Setting "cups options = raw" works well, but only with real Postscript Printers. If you use e.g. a turboprint driver for a Inkjet, again options are ignored.

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Aug 23, 2006

CUPS.org User: pigsign

Thanks for suggestion.

But if set "cups option = raw" in smb.conf, the CUPS would not care this print process.
Any CUPS funcations that will be ignore...

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Aug 24, 2006

CUPS.org User: mike

Try the attached patch to pstops.c and let me know if it resolves the problems you are seeing...

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Aug 28, 2006

CUPS.org User: kmshanah

I was experiencing this problem, and the patch seems to have fixed it.

I applied the patch against the Debian cupsys-1.2.1 package on backports.org and after installing, I was able to print duplexed pages on a HP LaserJet 4250 which didn't work before the patch.

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Aug 28, 2006

CUPS.org User: jmtorres

It works fine and solves the problem.
I tried the patch 3 days ago but seems my answer didn't arrive. Sorry.

Thank you.

@michaelrsweet
Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Aug 28, 2006

"str1839.patch":

Index: pstops.c

--- pstops.c (revision 5871)
+++ pstops.c (working copy)
@@ -1587,6 +1587,10 @@
break;
}

  • puts("%%BeginSetup");
  • do_setup(doc, ppd);

if (!strncmp(line, "%%BeginSetup", 12))
{
while (strncmp(line, "%%EndSetup", 10))
@@ -1603,7 +1607,7 @@
doc->num_options = include_feature(ppd, line, doc->num_options,
&(doc->options));
}

  •  else
    
  •  else if (strncmp(line, "%%BeginSetup", 12))
     fwrite(line, 1, linelen, stdout);
    

    if ((linelen = cupsFileGetLine(fp, line, linesize)) == 0)
    @@ -1615,11 +1619,7 @@
    else
    fputs("ERROR: Missing %%EndSetup!\n", stderr);
    }

  • else

  • puts("%%BeginSetup");

- do_setup(doc, ppd);

puts("%%EndSetup");

return (linelen);

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

Successfully merging a pull request may close this issue.

None yet
1 participant