3 Replies Latest reply on Apr 29, 2014 11:04 AM by philmodjunk

    Web Direct Export to PDF Workaround



      Web Direct Export to PDF Workaround


           I'm trying to come up with a workaround to the printing and pdf limitations in web direct.  My solution is working great in web direct but I MUST send reports out as pdf files - thats most of what my solution does.  I can work around it simply by logging in with an ipad and converting the report to pdf which gave me an idea.

           Could I have an instance of Pro running on the server (or another computer) that constantly scans through records and whenever a certain field changes (like an "Export record to Pdf" check box) it would automatically run the export script and upload the new pdf into a container thus giving me access to the pdf from the browser where I checked the export box?

           Is this a viable workaround or is there a simpler way?  I'm new to scripting so any help with the steps would be much appreciated.


        • 1. Re: Web Direct Export to PDF Workaround

               When I read the title to your posted question, the method that you describe is nearly what I was going to suggest having helped several other users do the same thing with IWP back before Web Direct. The only difference was that you also have the option of this script emailing the PDF as an attachment instead of inserting it in a container field--though I see no reason for not using the container field as it seems a better option than emailing it.

               But if you are new to scripting, you will find this a challenge to set up as it's not the simplest bit of scripting you might take on.

               And you may find that you can't run this using FileMaker Pro to open the file on the server computer. That is not recommended (though many developers have managed to do that with older versions of server) and may slow down server response times for everyone. You may need to run this from another workstation on the network.

               Either way, you can set up either a script that continually loops to check a table for a new record requesting the PDF or Install OnTimerScript can be used to run a script to do this check every so many seconds (or minutes). If you use a continuous loop, you get maximum speed in your response times, but it locks down that FileMaker Pro session so that your database cannot be accessed from that workstation while this script is running. The install OnTimerScript approach allows you to access the database to do other tasks, with momentary interruptions when the timer runs down and the system checks for PDF requests. (this can be done in a different window to keep it from interfering with other tasks.)

               You'll need  a table where a Web client can create a "request record" by performing a script. The record will need fields to hold all the details needed--such as any user specified search criteria (I want all Sales Records for the Month of January 2014...) and some way to identify the recipient.

               Your script will need to save a PDF to the temporary folder: Found Sets to PDF with unique file names

          • 2. Re: Web Direct Export to PDF Workaround

                 Thank you very much for the detailed reply. I'm going to start working out the script steps but I fear that it will be over my head. WHY couldn't export to PDF be supported on the server?  It seems ridiculous that I can use a $300 iPad running GO to do this but can't do it on the server. 

            • 3. Re: Web Direct Export to PDF Workaround

                   I agree that more script steps need to be server compatible. http://www.filemaker.com/company/contact/feature_request.html