Bug 136904 - paper tray selection doesn´t work
Summary: paper tray selection doesn´t work
Status: CLOSED WORKSFORME
Alias: None
Product: kdeprint
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KDEPrint Devel Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-05 18:46 UTC by J
Modified: 2008-12-31 20:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Configuration and Logfiles (14.97 KB, text/plain)
2006-11-06 18:14 UTC, J
Details

Note You need to log in before you can comment on or make changes to this bug.
Description J 2006-11-05 18:46:42 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    SuSE RPMs
Compiler:          gcc-4.1.0 
OS:                Linux

I´ve a Laserjet 1320 printer connected to the network via a wireless jetdirect printserver. I´m using the hplip module to print. The printer is connected via DeviceURI hp:/net/hp_LaserJet_1320_series?ip=192.168.9.244&port=2. PPD used is the ppd from the hplip package. The printer has two trays (tray1 manual, tray2 with a paper sheeder). Printing from all gnome applications is working (tray2 is preselected), also printing via commandline with lpr and an appropiate PaperTray Selection option. However printing from all KDE application using the kde printing dialog isn´t working. Paper tray2 is preselected, but nevertheless the printer is trying to print from the manual tray (tray1).
Comment 1 Cristian Tibirna 2006-11-05 23:46:39 UTC
I never had problems selecting trays with the 4 printer models (from 4 different manufacturers) up to now. But unfortunately I have no experience with HP printers, hplip and their PPD. I guess there has to be something wrong in the ppd or perhaps in the way kdeprint handles down to cups the selected options, for your particular printer model.

Go to kprinter, select Tray 2 for your printer, "Save" the configuration then send me the ~/.lpoptions file from your account.

Also, try to print something and then send me the log from your cups server (theoretically found in /var/log/cups/error_log).

Thanks.
Comment 2 J 2006-11-06 18:14:32 UTC
Created attachment 18439 [details]
Configuration and Logfiles

All the information you requested. I can´t see any differences in the logfile
output of both tests.
Comment 3 Cristian Tibirna 2006-11-07 01:02:56 UTC
There's something wrong with your system (you know already...) but I doubt it comes from kdeprint. If you look in the .lpoptions you attached, there is no InputSlot specification in the line corresponding to your hp printer (nor any other line).

I installed the ppd from my SuSE-9.3 as a fake hp printer and the simple act of marking Tray2 as installed during install then configuring it as paper source and saving this configuration gives me, in ~/.lpoptions:

Dest hp1320testfortray InputSlot=Tray2 _kde-filters

As you see, for me it works and I don't doubt that, if I had such a hp printer, it would look for paper in the right tray.

I recommend you to make sure you configure kdeprint correctly when you attempt to print.

For now I leave this bug open (although I should close it as "worksforme", which means I can't reproduce the report thus I can't begin to fix it).

Please try to make sure that you have the right packages installed. There has to me a minute detail, since you can correctly print from the commandline.
Comment 4 Michael Goffioul 2006-11-07 09:06:56 UTC
If you print with lpr and adding the options: "multiple-document-handling=separate-documents-collated-copies orientation-requested=3" (look into lpr documentation to see how to specify print options on the command line). Do you have the problem?
Comment 5 J 2006-11-07 16:30:12 UTC
Can you try if you can reproduce the following.

1) delete .lpoptions
2) call kprinter, select Tray1, save, exit kprinter. .lpoptions should contain InputSlot=Tray1
3) call kprinter, select Tray2, save, exit kprinter. .lpoptions contains no InputSlot option
4 call kprinter as many times as you want and change the tray and save, exit, nothing is reflected into .lpoptions.

that´s what´s happening on my system.
Comment 6 Cristian Tibirna 2006-11-08 21:17:57 UTC
I can't reproduce the comment #5. I activated both optional trays available in the PPD. Then I proceeded at repeatedly changing the paper source in kprinter.

When I select the default slot (tray1), .lpoptions doesn't contain the InputSlot option. When I select any of the other two slots (tray2 or tray3), the InputSlot option appears in the .loptions file, as expected.  This is exactly the intended and programmed behavior. Thus, I can't reproduce point 4) in comment #5.

What I suspect is that you configured your printer -- at the printer panel not in CUPS, or it came default with such configuration -- to use Tray 1 as default paper source. But then you configured kprinter (when you installed the printer) to use Tray 2 as default paper source.

Thus, when you select Tray 2 in kprinter, no InputSlot option is added in the command sent to the printer through CUPS, thus the printer will try to use the material default instead of the software default.

You can try to add InputSlot=Tray2 as an additional option in kprinter (click on "Options>>" and then on "Additional Tags") as a workaround.

You can see which slot is default in CUPS by looking in kprinter->Properties->DriverSettings->General for the "InputSlot" option or look for the line starting with "*DefaultInputSlot" in /etc/cups/ppd/your_hp_ppd_file.ppd

You can change the default InputSlot in kprinter using the Print Manager.
Comment 7 J 2006-11-12 06:37:20 UTC
Well, the HP manufacturer PPPD for the printers seems to be not correct. After installing the printer for the first time, i called the cups setup pages and recognized that Tray2 option was set to "not installed". I changed this to "installed" and changed also the DefaultTray to Tray2. 

This is now how my hplaserjet.ppd looks like:

*%=================================================
*%               Paper Sources
*%=================================================
*OpenUI *InputSlot: PickOne
*OrderDependency: 20 AnySetup *InputSlot
*DefaultInputSlot: Tray2
*InputSlot Tray1/Tray 1: "<</ManualFeed false /MediaPosition 3>> setpagedevice"
*InputSlot Tray2/Tray 2: "<</ManualFeed false /MediaPosition 0>> setpagedevice"
*InputSlot Tray3/Tray 3: "<</ManualFeed false /MediaPosition 1>> setpagedevice"
*?InputSlot: "
   save
     [(Tray2) (None) (Tray1) (Tray2)]
     statusdict /papertray get exec
     {get exec} stopped { pop pop (unknown) } if = flush
   restore
"
*End
*CloseUI: *InputSlot

*% Enable/Disable Manual Feed
*OpenUI *ManualFeed/Tray 1 (Manual): Boolean
*OrderDependency: 20 AnySetup *ManualFeed
*DefaultManualFeed: True
*ManualFeed True/True: "
        <</ManualFeed true>> setpagedevice"
*End
*ManualFeed False/False: "
        <</ManualFeed false>> setpagedevice"
*End
*?ManualFeed: "
        save
                currentpagedevice /ManualFeed get
                {(True)}{(False)}ifelse = flush
        restore
"
*End
*CloseUI: *ManualFeed

Shouldn´t cups output to Tray2 if there is no Tray options specified.
Comment 8 Cristian Tibirna 2006-11-12 18:20:33 UTC
As you discovered yourself, the PPD informs CUPS about what your printer has or has not. You had to add the Tray2 and you decided to indicate it at default. Is it actually physically the default on the printer too? You have to go on the printer, visit its configuration menu to find out.

KDEPrinter prefers not to put default configurations explicit, this is why, once you selected Tray2 as default in CUPS, when you say to KDEPrint you want to print to Tray2, it simply overlooks the InputSlot parameter and sends to CUPS a command without such a parameter, since CUPS was already informed that Tray2 is the default, thus this is what CUPS should use.

Now, if CUPS also doesn't explicitely send an InputSlot parameter (and I believe it doesn't, if you choose the default tray), the printing command is sent to the printer without such a parameter too, thus the printer will try to print to its internally established default tray.

Hope this helps.
Comment 9 Michael Goffioul 2006-11-13 09:26:33 UTC
I also see that the ManualFeed option is set to true by default. So depending in the order in which CUPS puts the associated PS code into the print file, they will overwrite each other.
Comment 10 J 2006-11-15 14:31:02 UTC
Thank you for your explanations. I should check know the physical default tray of the printer (which seems to be Tray1/manual). Problem solved.
Comment 11 John Layt 2008-12-31 20:31:20 UTC
Closing old Resolved status bug.