Ubuntu

Multi bin printing broken in OpenOffice.org due to cupsys pstops filter bug

Reported by Scott Balneaves on 2008-12-12
34
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cupsys (Ubuntu)
Undecided
Unassigned
Hardy
Undecided
Unassigned

Bug Description

Binary package hint: cupsys

In Hardy, there is a bug with upstream cupsys, where %%IncludeOption directives weren't being properly handled. I submitted a patch upstream: str2831.

Here's a dpatch that fixes the problem for hardy. I'm sure it's affecting more people than just me, perhaps this could be an SRU.

Scott Balneaves (sbalneav) wrote :
Jordan Erickson (lns) wrote :

Wow...really? 8.5 months later, and ... nothing? With a submitted patch upstream? Who's doing the bug monitoring here?

Till Kamppeter (till-kamppeter) wrote :

Nominated for a possible SRU in Hardy. In later Ubuntu releases this bug is fixed.

Changed in cupsys (Ubuntu):
status: New → Fix Released
Changed in cupsys (Ubuntu Hardy):
milestone: none → ubuntu-8.04.4
Scott Balneaves (sbalneav) wrote :

Still not working in Karmic, just tested. I didn't follow Karmic too closely, seeing as how (for my business), I need to track LTS. I'll fix for Karmic/Lucid, so we'll have working multibin for LTS.

Should I do this here? Or close this one for Hardy once a fix is released, and open a fresh one for Lucid?

Scott Kitterman (kitterman) wrote :

Reopening since it's found not to be fixed.

Changed in cupsys (Ubuntu):
status: Fix Released → Confirmed
Scott Balneaves (sbalneav) wrote :

Ok, by way of trying to nail this down, here are the EXACT steps to reproduce this problem:

I've added a printer in cups. It's an HP LaserJet 4250. I've ticked off the options for the 500 sheet bin3, and the envelope feeder.

I fire up OpenOffice.org 3.1

Go to Page Styles

Modify "First Page" style, drop down the "Paper tray" option, select "Tray 2" (where we keep letterhead)
Modify "Default" style, drop down the "Paper tray" option, select "Tray 3" (where we keep plain)

Doubleclick "First Page" to apply the first page style to the current page. Type "FRIST PAGE!!!!111one", hit control-enter to get
another page.
Note that page style is now Default, as it should be.
Type "PAEG TWOZORZ!!!!!!!one".

So, expected behaviour is, page1 on letterhead, page2 on plain.

Both come out on letterhead.

Printing to a file, we see:

%!PS-Adobe-3.0
%%BoundingBox: (atend)
%%Creator: (OpenOffice.org 3.1)
%%For: (sbalneav)
%%CreationDate: (Wed Nov 4 15:29:15 2009)
...blah blah...
%%DocumentSuppliedResources: font LiberationSerifFID194HGSet1
[{
%%IncludeFeature: *InputSlot Tray_2 <------ Here in the document setup, InputSlot Tray_2 is selected
} stopped cleartomark
[{
%%IncludeFeature: *PageSize Letter
} stopped cleartomark
%%EndSetup
%%Page: 1 1
%%PageOrientation: Portrait
%%PageBoundingBox: 12 12 600 780
%%BeginPageSetup
%
%%EndPageSetup
gsave
[0.06 0 0 -0.06 12 780] concat
gsave
746 1852 moveto
0 setgray
(LiberationSerifFID194HGSet1) cvn findfont 200 -200 matrix scale makefont setfont
<4C657474657268656164>
[122 89 55 56 88 67 100 90 88 0]
xshow
grestore grestore
showpage
%%PageTrailer

%%Page: 2 2
%%PageOrientation: Portrait
%%PageBoundingBox: 12 12 600 780
%%BeginPageSetup
%
[{
%%IncludeFeature: *InputSlot Tray3_500 <------- And here on the second page, Tray3_500 is selected
} stopped cleartomark
%%EndPageSetup
gsave
[0.06 0 0 -0.06 12 780] concat
gsave
746 932 moveto
0 setgray
(LiberationSerifFID194HGSet1) cvn findfont 200 -200 matrix scale makefont setfont
<4C6574746572>
[122 89 55 56 88 0]
xshow
grestore grestore
showpage
%%PageTrailer

So, my interpretation is, OpenOffice.org is sending out the correct %%IncludeFeature stanzas to switch papertrays.

Now, could someone (Till?) point me to what the chain of filters is? Looks like it's getting butcherd first by oopstops, then is it going on to pstops? or to pstopdf? I hope it's not the latter since there appears (to my eyes anyway) to be NO IncludeFeature handling in pstopdf at all!

Scott Balneaves (sbalneav) wrote :

Sorry for the wrapping above :(

Scott Balneaves (sbalneav) wrote :

I'm going to be digging into this today. For the record, and by way of documentation, here's the *minimum* amount of postscript needed to print out one page on an "Middle" and one page on a "Lower" input slot. You might need to adjust the IncludeFeature lines depending on your InputSlots defined in your printer's PPD.

%!PS-Adobe-3.0
%%Pages: 2
%%BoundingBox: (atend)

%%BeginSetup
%
[{
%%IncludeFeature: *InputSlot Middle
} stopped cleartomark
%%EndSetup

%%Page: 1 1
%%PageOrientation: Portrait
%%PageBoundingBox: 0 0 612 792
%%BeginPageSetup
%
%%EndPageSetup

%Letterhead
/Helvetica-Bold findfont
18 scalefont
setfont
newpath
20 650 moveto
(Letterhead) show
closepath

showpage
%%PageTrailer

%%Page: 2 2
%%PageOrientation: Portrait
%%PageBoundingBox: 0 0 612 792
%%BeginPageSetup
%
[{
%%IncludeFeature: *InputSlot Lower
} stopped cleartomark
%%EndPageSetup

%Letterhead
/Helvetica-Bold findfont
18 scalefont
setfont
newpath
20 650 moveto
(Plain) show
closepath

showpage
%%PageTrailer

%%Trailer
%%BoundingBox: 0 0 612 792
%%Orientation: Portrait
%%Pages: 2
%%EOF

Scott Balneaves (sbalneav) wrote :

I've identified the area within the pstops filter where the problem exists:

http://www.cups.org/str.php?L3417

Apparently, this code has undergone mods to work with adobe software, but at the cost of breaking OpenOffice.org.
I'm going to work with upstream to produce a patch acceptable for upstream, then I'll produce a debdiff for here.

Scott Balneaves (sbalneav) wrote :

I am well on the way to fixing this bug for karmic/lucid, however, there appears to be 2 separate bugs:

1) pstops itself is ignoring the %%IncludeFeature directives. I am working on a patch for this and will co-ordinate upstream.
2) Ubuntu has switched to a "everything is a PDF" method of printing. Unfortunately, pstopdf, which is supplied by the packagers and NOT by cups itself strips absolutely ALL %% directives. No %%IncludeFeatures no nothing. It tries to set up defaults by grepping some info out of the PPD for the printer, and passing this along to ghostscript. This is totally unacceptable, as it means ANY printer directives added in by a program such as OpenOffice.org in the postscript stream are summarily ignored.
So, the "global redirect" in pstopdf simply isn't going to work. For OpenOffice.org, at least, the filter path will have to pass through "unmolested" to pstops, otherwise there's no hope of ever getting multi bin support to work.

I'll handle 1) first, and file the patch here. I'll open a second bug for 2) when I'm done with 1) and handle it there.

Scott Balneaves (sbalneav) wrote :

By way of a status update, I've submitted a patch again upstream, waiting for Mike's review of the patch. Then I'll post the dpatch for the pstops bug. Next, I need to figure out the right mime.convs to bypass the pstopdf filter for openoffice jobs.

Steve Langasek (vorlon) wrote :

Since there is still no confirmed fix in later releases, this unfortunately is going to miss 8.04.4. Still a candidate for fixing in SRU to hardy once a fix becomes available.

Changed in cupsys (Ubuntu Hardy):
milestone: ubuntu-8.04.4 → none
Phillip Susi (psusi) wrote :

Hardy has reached end of life, and this package is not present in later releases. Closing all related bugs.

Changed in cupsys (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers