Page 1 of 1

Problems with printer HP LaserJet 2420 - inputbin Tray 2

Posted: Wed Jun 25, 2014 7:35 am
by WalterJKR
On "HP LaserJet 2420" printer, user can select Tray 2 as input bin in printing dialog, but this input bin isn't used for printing anyway.
Even if this tray is selected as default input bin in the OS settings, PrintWithWpf sends report to the Tray 1.

The possible core of the problem is that PrintDialog returns PrintTicket.InputBin as InputBin.Unknown.

There are articles and blogs confirming that this is WPF problem (not Stimulsoft in origin) and that WPF propagates only standard input bins (based on this enumeration).

I just ask you, if it's possible to implement hack similar to one described here:
http://social.msdn.microsoft.com/Forums ... windowsxps
which would be able to replace InputBin.Unknown by Tray 2, or another tray proposed by StiOptions settings (to allow programmers decide which input bin they want to print from).

Option 2: Propose the solution how to implement it in our code (when to modify the PrintTicket). To point us to sample code, simple demo, etc. We would be grateful!

Option 3: Fix the problem entirely (which I guess isn't possible right now).

Whichever way, thank you for your response.

Re: Problems with printer HP LaserJet 2420 - inputbin Tray 2

Posted: Thu Jun 26, 2014 10:43 am
by HighAley
Hello.

We know about this problem. It was discussed earlier on this forum.
This problem has no universal solution.
The only way out is to create your own PrintTicket with necessary print settings.

Thank you.

Re: Problems with printer HP LaserJet 2420 - inputbin Tray 2

Posted: Fri Jun 27, 2014 9:55 pm
by WalterJKR
I was afraid of that :(
Never mind, thank you for your time and the answer!

Re: Problems with printer HP LaserJet 2420 - inputbin Tray 2

Posted: Mon Jun 30, 2014 4:02 am
by Andrew
Thank you for the reply.

Have a nice day!

Re: Problems with printer HP LaserJet 2420 - inputbin Tray 2

Posted: Fri Jul 25, 2014 9:53 am
by WalterJKR
Update: I've changed our code to modify the print ticket, so the xml representation looks like this:

Code: Select all

<psf:PrintTicket xmlns:psf="http://schemas.microsoft.com/windows/2003/08/printing/printschemaframework" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1" xmlns:ns0000="http://schemas.microsoft.com/windows/printing/oemdriverpt/Samsung_ML_2850_Series_PCL6_6_1_7601_17514_" xmlns:psk="http://schemas.microsoft.com/windows/2003/08/printing/printschemakeywords">
 ...
  <psf:Feature name="psk:JobInputBin">
    <psf:Option name="ns0000:LOWER" />
  </psf:Feature>
 ...
</psf:PrintTicket>
Then I called PrintWithWpf with this ticket:

Code: Select all

stiReport.PrintWithWpf(printTicket, false, 1, 1, 1, "Samsung ML-2850 Series PCL6");
But the printer always prints from its default printerbin, i.e. when Tray 1 (ns0000:UPPER) is open and loaded, it prints from it, otherwise it prints from Tray 2 (ns0000:LOWER).
Do you have any advice where I could make a mistake?

Edit: When I want to specify Manual feed, it works (obviously because it is recognized as System.Printing.InputBin.Manual)

Re: Problems with printer HP LaserJet 2420 - inputbin Tray 2

Posted: Mon Jul 28, 2014 5:35 am
by HighAley
Hello.

Printers could change tray if there is no paper in the specified tray.
Please, read the printer manual.

Thank you.

Re: Problems with printer HP LaserJet 2420 - inputbin Tray 2

Posted: Wed Jul 30, 2014 12:32 pm
by WalterJKR
The result: yes, the mentioned printer is working always this way = if there is paper in the lower tray, it uses this printerbin, no matter what application calls the print function (word, etc.). Even if both inputbins have the paper loaded.
- the mentioned solution is considered working, now!

(without the inputbin specification, the printer didn't print automatically and waited for press-button-to-confirm).

Re: Problems with printer HP LaserJet 2420 - inputbin Tray 2

Posted: Thu Jul 31, 2014 8:25 am
by Alex K.
Hello,

Let us know if you need any additional help.

Thank you.