Choose Tray

Per Lind's Avatar

Per Lind

18 Dec, 2019 07:43 PM

Dear Sirs,
I have problem with my HP LaserJet 402.
I have 3 Trays:
Tray 1 Manual
Tray 2 Red paper 250
Tray 3 White paper 500
When I use the Plugin it always run Tray 2.
How should I do to get the Plugin choose the Tray I want?

Best regards
-Per Lind

  1. Support Staff 1 Posted by Support on 19 Dec, 2019 09:38 AM

    Support's Avatar

    Hi Per,

    Thank you for contacting us.
    You need capture the setup for the tray first and then restore that setup before printing. If you only select the printer without restore a setup, you will print using the default tray.

    Please have a look at the capture/restore example file to see how the capture/restore method is used.

    Let me know if you have any questions about this.

    Kind regards,

  2. 2 Posted by per.lind on 19 Dec, 2019 09:22 PM

    per.lind's Avatar

    Dear Jasper,

    I’m confused!

    When I open your example and import my printers to the fields and mark Tray its work when I press the Print symbol after each printer name.

    I don’t understand how I should get it to work from my applications.

    I have around 25 different applications using print options with a lot of print scripts and using 2-3 different printers in each script.


    Do I have to import your example in each application?

    Do I have to do the hugh work telling each Example application which printers I should use?
    Do I have to use the large printer script you show me in the Example?


    If not, How should I do?


    In one of my applications I have fields with printer names, for example:

    Printer 1 HP 402 White

    Printer 2 HP 402 Red

    Printer 3: Dymo label printer


    If I change printer its only change printer name in the printer field.

    Then all printer scripts automaticly use the new printers name.


    Hope you can help.


    Best regards




    Från: Support <[email blocked]>
    Skickat: den 19 december 2019 10:38
    Till: [email blocked]
    Ämne: Re: Choose Tray [PrinterSwitch #959]

  3. Support Staff 3 Posted by Support on 20 Dec, 2019 08:17 AM

    Support's Avatar

    Hi Per,

    In the capture and restore example file, you capture the specific printer settings first and they get stored in the database. The specific printer setup is a string of text that gets stored in a field or global that you can use later on.
    When you press the print button, the settings are loaded from that field or global before you print, so you print with the right settings that you choose earlier.

    If you only choose a printer by name, then you select printer, but you don't set any specific printer settings such as the tray. So it's important to capture the printer setup in your own application and then restore that setup when the users need to print.

    You can import our scripts in your application, but if you just use the necessary script steps in your own scripts, it will also work. But it's important that you understand how our example script works. I suggest you to go through the example script with the script debugger on and analyse what happens in the scripts.

    You can find what every script step does in our documentation on this page:

    I hope this sets you in the right direction. Please let me know if you have any other questions.

    Kind regards,

  4. 4 Posted by per on 20 Dec, 2019 10:20 AM

    per's Avatar

    Dear Jasper,

    Thanks for your fast answer.

    When I click on the link below I got a messeage:
    There is currently no text in this page. You can search for this page title <> in other pages, or search the related logs <> , but you do not have permission to create this page.




    Från: Support <[email blocked]>
    Skickat: den 20 december 2019 09:17
    Till: [email blocked]
    Ämne: Re: Choose Tray [PrinterSwitch #959]

  5. Support Staff 5 Posted by Support on 20 Dec, 2019 10:34 AM

    Support's Avatar

    Hi Per,

    I'm sorry, it seems that the link is broken after pasting. I think this link will work:

    Kind regards,

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac