3 Replies Latest reply on Jul 28, 2012 9:29 AM by LyndsayHowarth

    student report cards as pdf in IWP

    ptrl

      I would like to set up a means that allows me to store (as references?) each students report cards and other documents as pdf's in a container field(s) and have them accessible from an IWP site that I have set up.

      Is this possible? If yes what would be the best approach?

      Do the pdf files need to be stored in the web folder of FM Server? (Version 11)

      How would I go about automating the process? For example, when the report cards are printed a script loops thru and conversts each card to pdf and appends the file name to id the student and the report. eg; "090999_John Smith_Semester1_2012"

      Thank you if you can assist.

        • 1. Re: student report cards as pdf in IWP
          LyndsayHowarth

          Use RemoteScripter from 360works.com

          Works well.

           

          My-iPhone 0423 831 897

          Lyndsay Howarth

          www.11hrg.com.au

          lyndsay@11hrg.com.au

          • 2. Re: student report cards as pdf in IWP
            vmeyers

            We do something similar at our school with a FM generated form saved as a PDF and then imported into our IWP website. Start simple and give some thought to security and privacy of the student's information. Here is what works for us:

            1) On our local server, create the form for each family (in this case a contract) using a specific FM layout.

            2) Using the following script, save the form as a PDF in the system Temporary folder and then insert it back (as an image) in a container field on another layout.

            3) Export as a FM file all of the forms from the second layout, which contains only the contract container field and a primary key (family ID)

            4) Import these into an identical layout (use matching names) in a FM file on a separate IWP website (hosted by FM Webschool)

            5) Using a password we provide, a family can access the "public" website and log in to view only their own records.

            There are a number of moving parts that all have to come together, but once you have it working, it is easy to add as many different types of PDF documents as you desire.

            Script:

            Working: PDF_Contract_NextYear

            # purpose: generate a PDF and then insert it into record

            # starting/ending context: start on the form layout (Contract_NextYear); end on the container layout (PDF_Contract_Current).

            # dependencies: Requirements for script to operate properly:

            # history: VMeyers 2011/5/6 2012/5/15

            #

            #Use a generic looping script to generate all at once.

            #Next 2 are loop steps. Disable to generate only 1 PDF for test.

            Go to Record/Request/Page

            [ First ]

            // Loop

            #--------------------------------------------------------------

            #Comments: First create the PDF

            #Go to the layout for contract for Next year, formatted for this OS (Contract_NextYear)

            Go to Layout [ “Contract_NextYear” (Family) ]

            #

            #

            #Set a variable for the outbound path of the PDF when created, using the Temporary folder

            Set Variable [ $ContractPathTEMP; Value:Get ( TemporaryPath ) & Right ( Utility::g_SchoolYear ; 4 ) &

            "Contract_" & family_ADULT_priGuar::Name_Last &

            ".pdf" ]

            #

            #Set a variable for the inbound path of the PDF from the Temporary folder, using the "imagemac:" preference.

            Set Variable [ $PDFname; Value:"imagemac:" &

            Get ( TemporaryPath )& Right ( Utility::g_SchoolYear ; 4 ) &

            "Contract_" & family_ADULT_priGuar::Name_Last &

            ".pdf" ]

            #

            #Save as a PDF with Family last name in system Temporary folder.

            Save Records as PDF [ File Name: “$ContractPathTEMP”; Current record ]

            [ Document - Compatibility: Acrobat 7 and later ]

            [ Pages - Number Pages From: 1; Include: All pages ]

            [ Security - Printing: High Resolution; Editing: Any except extracting pages; Enable copying; Enable Screen Reader ]

            [ Initial View - Show: Pages Panel and Page; Page Layout: Single Page; Magnification: 100% ]

            [ Restore; No dialog ]

            #

            #Navigate to the layout (PDF_Contract_CurrentYear) that stores the pdf as an image.

            Go to Layout [ “PDF_Contract_CurrentYear” (Family) ]

            #

            #Navigate to the container field.

            Go to Field [ Family::ContractNextYear_PDF ]

            #

            #Use Insert Picture to insert the pdf as an image in the container field. Format field to reduce or enlarge.

            Insert Picture [ “$PDFname” ]

            #

            #--------------------------------------------------------------

            #2 Loop steps. Disable to generate only 1 PDF for test.

            Go to Record/Request/Page

            [ Next; Exit after last ]

            // End Loop

            #

            • 3. Re: student report cards as pdf in IWP
              LyndsayHowarth

               

              vmeyers wrote:

               

              We do something similar at our school with a FM generated form saved as a PDF and then imported into our IWP website.

               

              <snip>

               

              4) Import these into an identical layout (use matching names) in a FM file on a separate IWP website (hosted by FM Webschool)

              5) Using a password we provide, a family can access the "public" website and log in to view only their own records.

               

              Ultimately, you have to trigger the script on the server as opposed to the client side. Just clicking a button which performs VMeyers' script will result in errors.

              RemoteScripter allows a script to be triggered which runs on the server to save a PDF then import it into a field or generate a link to it.

              There is a sample in the RemoteScripter demo of precisely what you want.

               

              As far as hosting part of your solution at FM Webschool... I simply do not understand how that aids security.

               

              I have a solution using IWP to perform corporate financial reports which allows an admin user to log on and generate PDF and Excel reports and a standard user to view and download the reports. Their usernames and passwords and privileges are also managed via IWP as is every feature of the system. It is entirely secure because FileMaker is secure. External files and images then need to be protected at the OS level. If they are instead stored in FileMaker then there should be a high level of protection.

               

              - Lyndsay