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,
    Jasper

  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

    -Per

     

     

    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: https://wiki.myfmbutler.com/index.php?title=PrinterSwitch_3:External_Functions#PrSw_PrintSetup.28_.E2.80.9Ccapture.E2.80.9D_.29

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

    Kind regards,
    Jasper

  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 <https://wiki.myfmbutler.com/index.php?title=Special:Search/PrinterSwitch_3_:External_Functions> in other pages, or search the related logs <https://wiki.myfmbutler.com/index.php?title=Special:Log&page=PrinterSwitch_3_:External_Functions> , but you do not have permission to create this page.

     

    -Per

     

    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:
    https://wiki.myfmbutler.com/index.php?title=PrinterSwitch_3:_Extern...

    Kind regards,
    Jasper

  6. 6 Posted by per on 20 Dec, 2019 12:30 PM

    per's Avatar

    Hi Jasper,

    Sorry to disturb you again.

     

    I have read the Function website and think it should be like this:

     

    1. Store the Capture-Restore fmp12 app in my Filemaker folder.
    2. Register all my printers with info about Trays etc. in that app.
    3. I suppose the ”Print_Setup” tells the printer what to do, which Tray etc.
    4. Then I go to my invoice app and to the script I should use for printing 1 white paper in Tray 3 and 1 red paper in Tray 2.

     

    Is it OK so far?

     

    Could you please write a complete script för printing as above, with as few as possible script steps?

     

    Thanks in advance.

    -Per

     

     

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

  7. Support Staff 7 Posted by Support on 28 Jan, 2020 02:58 PM

    Support's Avatar

    Hi Per,

    Thank you for you message.

    The capture-restore example shows you the scripts to record a specific printer settings and then how to load it and make a print.
    You will need to integrate these script step in your own solution to capture a specific print setup and store it in your database. Then you can load these printer settings at a later time when you want to print something specific in your app.

    So you start by creating your own capture script in your application. And maybe a table to save your captured setups in. And then a separate one from printing.
    Then once this is in place, you capture the setup for a specific print job and save it in the table that you created. For example white A4 papersize in tray 3 and red A5 papersize in tray 2.
    And when executing the print job, you load the setting that you saved earlier and do the print. For example, the print button on an invoice will load the white A4 paper in tray 3 setting. While the print button on the contacts layout will load the red A5 paper in tray 2 setting.

    The scripts needed to achieve these this, are basically the scripts from the capture-restore example. You can write your own script that contain all the script steps from the example script or copy/paste the existing scripts into your solution and modify where needed.

    We also provide a custom integration service if you want us to integrate PrinterSwitch into your solution. This price for custom integration is 160euro/h. Please let me know if you're interested in this and we'll make you a quote for this.

    Kind regards,
    Jasper

  8. Support Staff 8 Posted by Support on 28 Jan, 2020 03:00 PM

    Support's Avatar

    Hi Per,

    I forgot to excuse us for the late answer, but you last reply was caught by our spam filter. I found your message today when I was cleaning out or spam box.

    Kind regards,
    Jasper

  9. 9 Posted by per on 28 Jan, 2020 03:33 PM

    per's Avatar

    Dear Jasper,

    I got it to work.

    Thanks.

     

    Best regards

    -Per

     

    Från: Support <[email blocked]>
    Skickat: den 28 januari 2020 16:00
    Till: [email blocked]
    Ämne: Re: Choose Tray [PrinterSwitch #959]

  10. Support Staff 10 Posted by Support on 28 Jan, 2020 03:34 PM

    Support's Avatar

    Hi Per,

    I'm glad to hear that everything is ok!
    I will close this ticket.

    Kind regards,
    Jasper

  11. Support closed this discussion on 28 Jan, 2020 03:34 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? 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