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

outputorder=reverse option is not working #2279

Closed
michaelrsweet opened this issue Mar 7, 2007 · 6 comments
Closed

outputorder=reverse option is not working #2279

michaelrsweet opened this issue Mar 7, 2007 · 6 comments

Comments

@michaelrsweet
Copy link
Collaborator

Version: 1.2.8
CUPS.org User: Zurd

The command "lp file" shows :
request id is HP_Deskjet_3900_USB_1-221 (1 file(s))
And will print the file.

The command "lp -o outputorder=reverse file" shows :
request id is HP_Deskjet_3900_USB_1-222 (1 file(s))
And will not print the file.

The file in the example above is a simple ASCII text file.

On localhost:631 in Jobs, it will show the status 'stopped'.

In /var/log/cups/error_log, for this job it says :
/undefined in N
(/usr/libexec/cups/filter/foomatic-rip) stopped with status 3!

With a LogLevel of debug it will say :
ESP Ghostscript 815.03: Unrecoverable error, exit code 1
renderer return value: 1
renderer received signal: 1
tail process done writing data to STDOUT
KID4 finished
KID3 exited with status 3
Renderer exit stat: 3
Process dying with "Possible error on renderer command line or PostScript error. Check options.", exit stat: 3
error: Illegal seek (29)
[Job 223] File 0 is complete.
Unloading job 223...

Information :
Kernel 2.6.20 on Gentoo with cups 1.2.8 and hplip 1.6.10
Using an HP Deskjet 3940 with /etc/cups/ppd/HP_Deskjet_3900_USB_1.ppd
/etc/cups/lpoptions do not exist

I didn't try it, but I saw in the manual of this printer that with the right driver and software of HP, you can go in Advanced Options and set the Layout Order in Reverse, so it should be possible with this printer to print in reverse. Thanks for any help on how to make that work.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Please attach your error_log file along with a sample file you are trying to print that doesn't work.

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: Zurd

I posted the error_log with a LogLevel of debug.

The file I'm trying to print is :
echo a > file

I also noticed some new lines in the error_log :
Pondering option 'outputorder=reverse
Unknown option outputorder=reverse.
--> This document is DSC-conforming!

Thanks

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

Try the attached patch; basically, any printer that didn't use JCL or provide an OutputOrder option of its own would have this problem...

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: Zurd

Since the patch is for revision 6319, I tough I should get the latest version of CUPS from SVN, so I downloaded it and tried to apply the patch with 'patch -p0 < str2279.patch' in the filter directory but it said that the patch was already made, so I didn't applied it. Called 'autoconf -f', './configure', 'make', 'make install' and '/etc/init.d/cups restart' and it's now working,
yeah! :)

I also called 'lpoptions -o outputorder=reverse' to create the file '/etc/cups/lpoptions' so that it always print in reverse and I just print something in Firefox and it's working.

Since Gentoo has version 1.2.8, would it be safe for me to use the next version of CUPS from Gentoo, like 1.2.9 or 1.3.0 when it goes out, like, would I still have the outputorder working or should I stick with CUPS from SVN?

Thanks a lot!

@michaelrsweet
Copy link
Collaborator Author

CUPS.org User: mike

1.2.9 will also contain the fix, and so should show up in Gentoo's next release of CUPS...

Thanks for confirming!

@michaelrsweet
Copy link
Collaborator Author

"str2279.patch":

Index: pstops.c

--- pstops.c (revision 6319)
+++ pstops.c (working copy)
@@ -937,14 +937,21 @@
ppdEmitJCL(ppd, stdout, doc->job_id, doc->user, doc->title);

puts("%!PS-Adobe-3.0");
  •    pageinfo = (pstops_page_t *)cupsArrayFirst(doc->pages);
    
  • copy_bytes(doc->temp, 0, pageinfo->offset);

number = 0;
}

/*
  •  \* Copy the prolog as needed...
    
  •  */
    
  •  if (!number)
    
  •  {
    
  •    pageinfo = (pstops_page_t *)cupsArrayFirst(doc->pages);
    
  • copy_bytes(doc->temp, 0, pageinfo->offset);
  •  }
    
  • /*
    
    • Then copy all of the pages...
      */

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