PrinterSwitch V3, 64 bits, does not print correctly.

JF's Avatar

JF

19 Mar, 2019 07:29 PM

Hi,
We just went from FM 16, 32 bits, to FM 17, 64 bits, and thus from printerSwitch 2.2 to printerSwitch 3.0.9. The windows version, 8.1, did not change.
We have a label roll printer and all worked fine in the FM16 environement.
After the migration to FM17, only the first record was printing and a trail of blank labels came out after.
Nothing in the scripts changed. Other printers are still working fine.
We did a capture/restore for that printer but the problem remains.
Is there a difference between the two versions of printerSwitch that could explain this ?
Can it be a FM 17 problem ?
Thanks in advance for your time !

  1. Support Staff 1 Posted by Support on 20 Mar, 2019 11:11 AM

    Support's Avatar

    Hi JF,

    Thank you for contacting us.
    It's a bit hard to pinpoint the problem since a few factors changed in your setup (32 to 64 bit, FMP 17, new version of PrinterSwitch).
    PrinterSwitch 3 was updated to support 64 bit versions of FileMaker Pro and a newer version of the PDF driver, so it should still work.

    Here a few things that you can try to find the cause of the problem:
    - Try our capture and restore example with your label printer since it's a stand alone and doesn't rely on the other solution. - Try your solution in FileMaker Pro 16 64-bit with PrinterSwitch 3.0.9 64-bit - Try your solution in FileMaker Pro 17 32-bit with PrinterSwitch 3.0.9 32-bit

    Could you let me know the outcome of these tests? This will give us a better view on the cause of the problem.

    Please let me know if you have any other questions.

    Kind regards,
    Jasper

  2. 2 Posted by Jean-François L... on 20 Mar, 2019 04:17 PM

    Jean-François Lefebvre's Avatar

    Thank you for your prompt response.

    We did try our solution in FileMaker Pro 17 32-bit with PrinterSwitch 3.0.9
    32-bit, and it works fine.
    Unfortunately, we don't have access to your capture and restore example. We
    had a consultant that took care of our database and he can't find them.
    Would it be possible to send it to me so I can try it ?

    Thanks a lot !
    J-F Lefebvre

  3. 3 Posted by Jean-François L... on 21 Mar, 2019 01:38 PM

    Jean-François Lefebvre's Avatar

    Hi again Jasper,
    I just want to give you an update on what we tried yesterday.

    We first set the label printer as the default :

    Procedure 1:
    $list = PrSw_GetPrinterNames ;
    $target = Occurrences ( Debut ( $list ; Position ( $list ; "Citizen" ; 1 ;
    1) ) ; "¶" ) + 1;
    PrSw_SelectPrinter( $target )
    PrSw_SetPrintRange( 1; 99999 )
    PrSw_PrintSetup( "capture" )

    We then set the printer with the good width and height.
    We print a sample and define "All" pages and the "all records in use".
    (it works great)
    We then recapture the settings using the same procedure 1 (above), and copy
    the result into a variable.

    We then insert this result into this procedure 2 that we use each time we
    print :

    Procedure 2:
    $$StartupSettings = PrSw_PrintSetup( "capture" )
    $$Startup = PrSw_GetStartupPrinter
    $$Target = Occurrences(Debut($$list;Position($$list;"Citizen";1;1));"¶")+1
    $$TargetSettings = "Z0000003353GhVOd6$C ..." <- the incomprehensible
    result HERE
    PrSw_SelectPrinter($$Target ) ;
    PrSw_PrintSetup("restore|" & $$TargetSettings )
    PrSw_PrintDialog("disable" )
    Print(with dialog = yes)
    PrSw_PrintDialog("enable" )
    PrSw_SelectPrinter($$Startup ) ;
    PrSw_PrintSetup("restore|" & $$StartupSettings )

    The weird part is that as long as we stay logged to the Filemaker db, the
    procedure 2 works fine.
    The problems start if we log out and log again.
    Using the procedure 2 again, the first record is printed and blank labels
    keep on coming out until we press "stop" on the printer.
    By looking at the jobs in progress of the printer, the job is to print from
    1 to 9999 pages.

    We are very confused by this situation.
    I don't understand how logging out and logging in again would change the
    printer settings ...
    Thanks again for your help !
    J-F Lefebvre

  4. Support Staff 4 Posted by Support on 21 Mar, 2019 04:27 PM

    Support's Avatar

    Hi JF,

    Thank you for the additional information. It seems that the issue only occurs when using the 64-bit version of the plugin, right?

    I see you have PrSw_SetPrintRange( 1; 99999 ) in the script. Could you disable this step and try the procedure again? The default setup is All for the print range, so you don't need a big number. That could be the reason why the printer queue is seeing 9999 prints.

    Attached you find the example files. The capture/restore example file is the one that would be great to test in your environment.

    Please let me know the outcome of the tests.

    Kind regards,
    Jasper

  5. 5 Posted by Jean-François L... on 21 Mar, 2019 08:27 PM

    Jean-François Lefebvre's Avatar

    Hi Jasper and thanks for the example files !

    Yes, the issue is only for the 64-bit version.
    I disabled the PrSw_SetPrintRange( 1; 99999 ) line in the script and it
    still didn't work for the 64-bit.
    BUT, when I did a capture/restore in the 32-bit without that line, it also
    didn't work ... I put it back and it worked again.
    So the PrSw_SetPrintRange( 1; 99999 ) line seems to be essential in the
    script for the 32-bit version.
    I also tried for the 64-bit, changing PrSw_SetPrintRange( 1; 99999 ) to
    PrSw_SetPrintRange( 0; 0 ) (which I think is equal to"All"), but without
    success.

    Concerning the example file, I capture/restore the printer by setting a
    user-defined size in the printer configuration (which is what we need) and
    nothing came out. No error, no print.
    I then used a printer's predefined size ( 2 x 4 ) and it worked. It printed
    the test. Unfortunately, the size that we need is not in the predefined
    choices ...

    Hope I made it clear enough ... I'm getting lost myself !

    Thanks again for your time.
    J-F

  6. Support Staff 6 Posted by Support on 22 Mar, 2019 04:15 PM

    Support's Avatar

    Hi JF,

    Could you tell me where you exactly specified the user defined size for the paper? In the printer driver, PrinterSwitch or somewhere else?

    Kind regards,
    Jasper

  7. 7 Posted by Jean-François L... on 22 Mar, 2019 05:30 PM

    Jean-François Lefebvre's Avatar

    Hi Jasper,
    For our script, we use the configure printer of Filemaker (from the File
    tab).
    It's the same in your example but we do it manually.

    Thanks
    J-F

  8. 8 Posted by Jean-François L... on 27 Mar, 2019 03:37 PM

    Jean-François Lefebvre's Avatar

    Hi Jasper,
    do you have any development concerning our printing problem ?
    Should we try something else or do you need more information on anything ?

    For our part, since we need that printer to be operationnal, we got back to
    using Filemaker 16 32-bit on the machines that use the printers (Citizen
    and Zebra printers).
    But we are going to move on 64-bit at some point, so we need to solve this
    problem...

    Thanks again for your help.
    J-F

  9. Support Staff 9 Posted by Support on 27 Mar, 2019 04:48 PM

    Support's Avatar

    Hi Jean-François,

    Sorry for our late answer. Jasper is currently on holiday and I’m taking care of your support ticket.

    Before we go further, if you disable the PrinterSwitch plug-in in FileMaker and you restart FileMaker, are you able to print manually to your printers with the 64-bit drivers?
    Does it take the correct settings?
    Where are your drivers installed? Locally on the clients or shared ob a server? If the last is the case, can you try to install the printer locally?

    Best regards,

    Koen Van Hulle

  10. 10 Posted by Jean-François L... on 28 Mar, 2019 03:02 PM

    Jean-François Lefebvre's Avatar

    Hi Koen,
    no we did not disable the printerswitch plug-in to test if the printer
    works correctly in 64-bit.
    As I mentionned in a previous mail, we did make it work correctly in 64-bit
    by:
    1 - we set the label printer as default.
    2 - we go into printer options and set the printer's height and width
    correctly (user defined, not printer's pre-defined)
    3 - we capture the printer settings and save it in a variable.
    4 - the default printer is reset again and the script is ready to print.

    ( One odd thing is that we need to set the label printer as default in
    order to set the sizes. Otherwise, in the 'print configuration' window, we
    can see and select the printer but if we click on the 'properties' of the
    printer, it's the default printer's properties that are shown. )

    If we do the steps mentionned above, we are able to print correctly in the
    64-bit environment... as long as we don't log out.
    If we log out and log in again, the printer only prints the first record.

    As for the drivers, the printers are installed locally.

    Thank you for your time, Koen.
    J-F

  11. Support Staff 11 Posted by Support on 28 Mar, 2019 04:36 PM

    Support's Avatar

    Hi Jean-François,

    Sorry that I was unclear.

    I mean can you as a test disable the PrinterSwitch plug-in in FileMaker (and restart the FileMaker client), and do a manual print.
    Do you have the same behaviour as with PrinterSwitch?
    This is to exclude an issue with the driver in combination with FileMaker.

    If you say "If we log out and log in again, the printer only prints the first record.", do you mean the current record, or the first record of the found set.

    The option to print only the "current record" or the "found set" is an option in the Print dialog of FileMaker Pro. Depending of the script, or the place you call this (menu), it could remember the last chosen option and use is for the next print.

    The PrinterSwitch plug-in only interferes with the "Print Setup" script step and dialog.
    On Windows it only can change the options PrSw_SetPrintCopies (default =1), PrSw_SetPrintCollate (default = no), PrSw_SetPrintRange (default = all),PrSw_SetPrintToFile (default = no) of the Print Dialog. But never with the other options.

    Best regards,

    Koen Van Hulle

  12. Support closed this discussion on 28 Mar, 2019 04:36 PM.

  13. Support re-opened this discussion on 28 Mar, 2019 04:38 PM

  14. 12 Posted by Jean-François L... on 29 Mar, 2019 12:49 PM

    Jean-François Lefebvre's Avatar

    Hi Koen,

    it seems we just solved the problem. In the procedure 1 explain in one of
    my previous mail:
    Procedure 1:
    $list = PrSw_GetPrinterNames ;
    $target = Occurrences ( Debut ( $list ; Position ( $list ; "Citizen" ; 1 ;
    1) ) ; "¶" ) + 1;
    PrSw_SelectPrinter( $target )
    PrSw_SetPrintRange( 1; 99999 )
    PrSw_PrintSetup( "capture" )

    we simply changed
    PrSw_SetPrintRange( 1; 99999 )
    to:
    PrSw_SetPrintRange( 1; 120 ) # 120, because we'll never have to print more
    than this at a time.
    And in the printer configuration, we also chose 1 to 120 before capturing
    the settings.

    And it now works, even after logging out and in !

    Thanks for your help !
    J-F

  15. Support Staff 13 Posted by Support on 29 Mar, 2019 03:10 PM

    Support's Avatar

    Hi Jean-François,

    I’m glad your problem is solved!

    Best regards,

    Koen Van Hulle | Unit Manager | myFMbutler <https://www.fmconnection.com/>
    Twitter <https://twitter.com/myfmbutler> | Support <https://support.myfmbutler.com/>

    IMPORTANT NOTE:
    In order to streamline our support activities, we are using a web application called Tender Support at https://support.myfmbutler.com <http://support.myfmbutler.com/>
    We would like to encourage you to use this system for all future support questions. You'll be able to access FAQs about our products, and after a simple registration you can send both private and public support questions.
                 <http://www.myfmbutler.com/>

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

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