2 Replies Latest reply on Mar 7, 2014 3:01 PM by wimdecorte

    Save as PDF from Server???

    smac11shl

      Hi,

       

      I am looking to run a script on my server at night that will allow me to print records to a pdf (or save them) and then save the pdf on a Windows server.

       

      Here is my setup:

       

      Windows Server 2008

      Filemaker Server 13

       

       

      Develping on either:

      Windows 7 w/ Filemaker 13

       

      or

       

      Mac Mavrick w/ Filemaker 13 Advanced

       

      I would ideally like to save the pdf to a folder on a networked the Windows Server 2012, I would also like the option to save it as a pdf in the folder (or Temporary Path) and then email it.

       

      I have read that this is not done easily but there is a way - any help would be greatly appreciated!

       

      Thank you!

        • 1. Re: Save as PDF from Server???
          dobunzli

          Hello,

          To my knowledge, you have to create a filemaker file that will connect as a client to your hosted solution and launch the desired script.

           

          See answer 5 in post here

           

          We do this kind of thing by installing FileMaker Client on the server hosting the databases (this works well and runs fast due to no network bottlenecks).

           

          We create an empty database (we call it FMBot.fmp12) and create a user account in it using the same credentials as an account in the target hosted DB (we use FMBot as the account and give it [Full Access] privileges).  We then set the FMBot db to login automatically with that account and give it a script trigger (OnFirstWindowOpen) to launch a script.

           

          That script then just calls a script in the hosted DB to run our FMServer-incompatible-tasks.  Finally, once the script in the hosted DB completes, control returns to the FMBot DB which quits FMP Client.

           

          We trigger this hourly or daily as required using TaskScheduler on PC or a LaunchDaemon job on MacOS, it doesn't require a user to be logged in and will run as a background task.

          • 2. Re: Save as PDF from Server???
            wimdecorte

            dobunzli wrote:

             

            Hello,

            To my knowledge, you have to create a filemaker file ...

             

            You don't have to.  It's just the way that is easiest to grasp for most FM developers.

             

            There are other ways of doing the same thing from AppleScript on Mac and VBscript/PowerShell on Windows (using the FM ActiveX interface).

            These methods are somewhat harder for the average FM developers but they offer more rrore error reporting capabilities for example if the business process is critical.

            1 of 1 people found this helpful