Problems with printer HP LaserJet 2420 - inputbin Tray 2

Stimulsoft Reports.WPF discussion
Post Reply
WalterJKR
Posts: 22
Joined: Tue Mar 18, 2014 6:41 am

Problems with printer HP LaserJet 2420 - inputbin Tray 2

Post 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.
Attachments
PrinterCapabilities.xml
(78.59 KiB) Downloaded 379 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

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

Post 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.
WalterJKR
Posts: 22
Joined: Tue Mar 18, 2014 6:41 am

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

Post by WalterJKR »

I was afraid of that :(
Never mind, thank you for your time and the answer!
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

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

Post by Andrew »

Thank you for the reply.

Have a nice day!
WalterJKR
Posts: 22
Joined: Tue Mar 18, 2014 6:41 am

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

Post 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)
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

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

Post by HighAley »

Hello.

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

Thank you.
WalterJKR
Posts: 22
Joined: Tue Mar 18, 2014 6:41 am

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

Post 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).
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

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

Post by Alex K. »

Hello,

Let us know if you need any additional help.

Thank you.
Post Reply