12 Replies Latest reply on Jan 28, 2010 10:25 PM by RickWhitelaw

    Printing/Printing Preferences

    deltatango

      Title

      Printing/Printing Preferences

      Post

      Has anyone found a good solution for multi-user, terminal server, multi-printer environments?

       

      I have a layout I designed to be printed but it prints with different margins depending on the printer printed from. setting printing prefs doesn't work well because I have to set whether to print records being browsed or current record and that script step tends to overwrite the printing prefs step.

       

      Thanks

        • 1. Re: Printing/Printing Preferences
          TSGal

          deltatango:

           

          Thank you for your post.

           

          One user had difficulty printing to six different printers with different margins, and ended up creating 24 separate scripts (six printers with either landscape or portrait and current record or records being browsed).  If I recall correctly, that user had a client table that matched up the client with a preferred printer, and then depending on what the person wanted to print, there were separate layouts for each of the printers.  If the customer wanted another printer, it was changed in the client table.  This did work for the user, even if it was a bit cumbersome to set up.

           

          Does any one else have solutions to multi-printer setups?  If so, how did you program it?

           

          TSGal

          FileMaker, Inc. 

           

           

          • 2. Re: Printing/Printing Preferences
            philmodjunk
               Usually, you can just set margins in Layout Setup... | printing and get pretty consistent results. Usually the "margins are different for every printer I select" issue is due to not specifying any margin in layout setup... Then filemaker prints as close to the left edge as the current printer/driver combination permits. Change printers and this changes. Select a left margin of at least 0.5" or 1.3 cm and you should get pretty standard results for just about any printer.
            • 3. Re: Printing/Printing Preferences
              deltatango
                 Thanks Phil. What about the top?
              • 4. Re: Printing/Printing Preferences
                philmodjunk
                  

                Yep, same thing, specify a top margin in the layout setup and you should get consistent results.

                 

                Basically, if you don't specify and top and left margin, filemaker prints as "high and to the left" as your printer's max printable area will permit. Specifying a large enough margin keeps the results consistent.

                • 5. Re: Printing/Printing Preferences
                  deltatango
                     Your avatar suits you.
                  • 6. Re: Printing/Printing Preferences
                    RickWhitelaw
                      

                    I tend to get the best results by setting, in the Print Setup step, Format "for any printer". Of course this doesn't mean to say a person shouldn't deal with margins etc.

                     

                    RW 

                    • 7. Re: Printing/Printing Preferences
                      RickWhitelaw
                        

                      I posted some code for dynamic printer selection and scripting a day or so ago, but removed it because CUPS was failing when I used a particular printer. When I work it out I'll repost. With proper use of relationships and variables it's possible to avoid having a large number of print scripts . . . certainly no more than one script per "print job". The system I'm building uses a table of "tasks" that are related to certain printers, all set up in a preferences file. The best way I've found to deal with the multiple printers issue, including margins, is to script on the OS level. What I'm discovering is that the scripting may have to "poll" or assess each printer's configuration or driver to effectively send the correct commands. Otherwise the routine is just guessing what a particular printer or driver can do. I can see how all this is possible with a huge time investment. One of the clumsiest parts of the process (for me . . . I'm no expert) is having to use Applescript to communicate between FM and the Mac OS. Applescript by calculation becomes necessary if variables are to be used (doh!) and every space and " must be somehow quoted. If there's a better way I'd love to hear. If there's not, there should be!

                       

                      RW 

                      • 8. Re: Printing/Printing Preferences
                        deltatango
                           I'm now using a combination of both.
                        • 9. Re: Printing/Printing Preferences
                          deltatango
                             Rick, now when doing a scripting of each printer it would be necessary to create the script in the user's environment for each printer correct?
                          • 10. Re: Printing/Printing Preferences
                            RickWhitelaw
                              

                            If I understand the question, then the answer is "yes". What I'm looking for is a way to assign printers dynamically so all print scripts are "portable" and need no tweaking regardless of the workstation. I'm getting closer. I've been checking out the possibility of running "lpoptions" to view the response of the printer/driver and somehow evaluating this data to determine which commands a given driver will "hear". I'm new at this OS scripting so I'll likely be "barking up several wrong trees" before getting anything right. From the FM point of view I have the issue sorted out and it's a convenient way of doing things. However, although the method selects and assigns printers properly, all printers are NOT the same. An example would be how printers need different instructions to toggle between "portrait" and "landscape"; this even though two printers are CUPS supported. Some printers respond better to the "lp" protocol than to the "lpr" set of instructions and several commands are exclusive to one or the other. Like I said, I'm just beginning to see the challenges. In the end I believe the best approach is to replace BOTH the PrintSetup and Print script steps with OS level scripting in a printing script.

                             

                            RW 

                            • 11. Re: Printing/Printing Preferences
                              deltatango
                                 In other words, I was asking if you are going to create a script for each printing preference, if you don't have the printer available, you would need to go to the user's computer and create the script on THAT computer?
                              • 12. Re: Printing/Printing Preferences
                                RickWhitelaw
                                  

                                This is exactly what I am trying to make unnecessary. More to follow . . . I believe this is quite possible and I've been testing my plan nightly albeit with a limited (3) selection of printers.

                                 

                                RW