Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

WebViewer Save PDF

All examples are included with download of MBS FileMaker Plugin.

WebViewer Save PDF.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 7
Value Lists 0
Custom Functions 0
Custom Menus 32
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Minimalist
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields Off
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Comments
Occurrences in Relationship Graph
Webviewer PDFKit
1 field defined, 2 records
Webviewer PDFKit

Fields

Table Name: Webviewer PDFKit - 1 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
data Normal, Binary Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1

      Layout Objects: Webviewer PDFKit

      Regular Fields

      Field Name: Webviewer PDFKit::data
      Field Properties Coordinates Field Format Field Behavior Quick Find
      • Top: 83 pt
      • Left: 565 pt
      • Bottom: 743 pt
      • Right: 1112 pt
      • Anchoring: Left and Right, Top and Bottom
      Field Format:
      • Edit Box
      Field Behavior:
      • Allow field to be entered: In Find mode, In Browse mode
      • Touch keyboard type: System Default
      • Go to next field using: Tab key
      No

      Buttons

      Button Properties Coordinates Script/Script Step
        Type:
      • Text: Render Image
        Additional Properties:
      • Change to hand cursor over button
      • Top: 12 pt
      • Left: 18 pt
      • Bottom: 42 pt
      • Right: 202 pt
      • Anchoring: Left, Top
      Perform Script [ “Render Image” ]

      Scripts:


      Button Properties Coordinates Script/Script Step
        Type:
      • Text: Print to PDF
        Additional Properties:
      • Change to hand cursor over button
      • Top: 12 pt
      • Left: 412 pt
      • Bottom: 42 pt
      • Right: 596 pt
      • Anchoring: Left, Top
      Perform Script [ “Print To PDF” ]

      Scripts:


      Button Properties Coordinates Script/Script Step
        Type:
      • Text: Render PDF (Mac)
        Additional Properties:
      • Change to hand cursor over button
      • Top: 12 pt
      • Left: 215 pt
      • Bottom: 42 pt
      • Right: 399 pt
      • Anchoring: Left, Top
      Perform Script [ “Render PDF” ]

      Scripts:


      Web Viewer Controls

      Web Viewer Control Properties Coordinates Web Address
        Object Name:
      • web
        Additional Properties:
      • Allow interaction with web viewer content
      • Display progress bar
      • Display status messages
      • Automatically encode URL
      • Top: 83 pt
      • Left: 6 pt
      • Bottom: 743 pt
      • Right: 553 pt
      • Anchoring: Left, Top and Bottom
      "about:blank"

      Script Hierarchy

      Save to PDF on macOS
      Print To PDF
      Print To PDF with options
      Render PDF
      Render Image
      Get Screenshot
      Clear

      Next Script: [Print To PDF]
      Script Name Save to PDF on macOS
      Run script with full access privileges Off
      Siri Shortcut Visible Off
      Include In Menu Yes
      Layouts that use this script
        Scripts that use this script
          Script Definition
          Script Steps
          • #if you load a PDF into the web viewer, you can extact it
          • Set Field [ Webviewer PDFKit::data; "" ]
          • #Load a PDF
          • Set Web Viewer [ Object Name: "web"; URL: "http://www.monkeybreadsoftware.de/filemaker/files/Installation.pdf" ]
          • Pause/Resume Script [ Duration (seconds): 2 ]
          • Set Field [ Webviewer PDFKit::data; MBS( "WebView.GetSourceData"; "web" ) ]
          Fields used in this script
          Scripts used in this script
            Layouts used in this script
              Tables used in this script
              Table occurrences used by this script
              Custom Functions used by this script
                Custom menu set used by this script

                  Previous Script: [Save to PDF on macOS] Next Script: [Print To PDF with options]
                  Script Name Print To PDF
                  Run script with full access privileges Off
                  Siri Shortcut Visible Off
                  Include In Menu Yes
                  Layouts that use this script
                  Scripts that use this script
                    Script Definition
                    Script Steps
                    • Set Field [ Webviewer PDFKit::data; "" ]
                    • Set Variable [ $filename; Value:Get(UUIDNumber) & ".pdf" ]
                    • Set Variable [ $path; Value:MBS( "Path.AddPathComponent"; MBS( "Folders.UserTemporary" ); $filename ) ]
                    • #delete if it exists
                    • If [ MBS("Files.FileExists"; $path) ]
                    • Set Variable [ $r; Value:MBS("Files.Delete"; $path) ]
                    • End If
                    • #Load a website
                    • If [ Position ( MBS("WebView.GetURL"; "web") ; "http"; 1; 1) = 0 ]
                    • Set Web Viewer [ Object Name: "web"; URL: "http://www.monkeybreadsoftware.com/filemaker/" ]
                    • Pause/Resume Script [ Duration (seconds): 2 ]
                    • End If
                    • #reset plugin settings and print with current settings
                    • Set Variable [ $r; Value:MBS( "WebView.ClearPrintParameters") ]
                    • #print to temp file
                    • Set Variable [ $r; Value:MBS( "WebView.PrintToFile"; "web"; $Path ) ]
                    • Pause/Resume Script [ Duration (seconds): 1 ]
                    • #load it
                    • Set Field [ Webviewer PDFKit::data; MBS("Container.ReadFile"; $path; "auto"; "print.pdf") ]
                    Fields used in this script
                    Scripts used in this script
                      Layouts used in this script
                        Tables used in this script
                        Table occurrences used by this script
                        Custom Functions used by this script
                          Custom menu set used by this script

                            Previous Script: [Print To PDF] Next Script: [Render PDF]
                            Script Name Print To PDF with options
                            Run script with full access privileges Off
                            Siri Shortcut Visible Off
                            Include In Menu Yes
                            Layouts that use this script
                              Scripts that use this script
                                Script Definition
                                Script Steps
                                Fields used in this script
                                Scripts used in this script
                                  Layouts used in this script
                                    Tables used in this script
                                    Table occurrences used by this script
                                    Custom Functions used by this script
                                      Custom menu set used by this script

                                        Previous Script: [Print To PDF with options] Next Script: [Render Image]
                                        Script Name Render PDF
                                        Run script with full access privileges Off
                                        Siri Shortcut Visible Off
                                        Include In Menu Yes
                                        Layouts that use this script
                                        Scripts that use this script
                                          Script Definition
                                          Script Steps
                                          • Set Field [ Webviewer PDFKit::data; "" ]
                                          • If [ Position ( MBS("WebView.GetURL"; "web") ; "http"; 1; 1) = 0 ]
                                          • #Load a website
                                          • Set Web Viewer [ Object Name: "web"; URL: "http://www.monkeybreadsoftware.com/filemaker/" ]
                                          • Pause/Resume Script [ Duration (seconds): 2 ]
                                          • End If
                                          • #Render PDF
                                          • Set Field [ Webviewer PDFKit::data; MBS("WebView.RenderPDF"; "web") ]
                                          Fields used in this script
                                          Scripts used in this script
                                            Layouts used in this script
                                              Tables used in this script
                                              Table occurrences used by this script
                                              Custom Functions used by this script
                                                Custom menu set used by this script

                                                  Previous Script: [Render PDF] Next Script: [Get Screenshot]
                                                  Script Name Render Image
                                                  Run script with full access privileges Off
                                                  Siri Shortcut Visible Off
                                                  Include In Menu Yes
                                                  Layouts that use this script
                                                  Scripts that use this script
                                                    Script Definition
                                                    Script Steps
                                                    • Set Field [ Webviewer PDFKit::data; "" ]
                                                    • If [ Position ( MBS("WebView.GetURL"; "web") ; "http"; 1; 1) = 0 ]
                                                    • #Load a website
                                                    • Set Web Viewer [ Object Name: "web"; URL: "http://www.monkeybreadsoftware.com/filemaker/" ]
                                                    • Pause/Resume Script [ Duration (seconds): 2 ]
                                                    • End If
                                                    • #Take a picture
                                                    • Set Field [ Webviewer PDFKit::data; MBS("WebView.RenderImage"; "web") ]
                                                    Fields used in this script
                                                    Scripts used in this script
                                                      Layouts used in this script
                                                        Tables used in this script
                                                        Table occurrences used by this script
                                                        Custom Functions used by this script
                                                          Custom menu set used by this script

                                                            Previous Script: [Render Image] Next Script: [Clear]
                                                            Script Name Get Screenshot
                                                            Run script with full access privileges Off
                                                            Siri Shortcut Visible Off
                                                            Include In Menu Yes
                                                            Layouts that use this script
                                                              Scripts that use this script
                                                                Script Definition
                                                                Script Steps
                                                                • Set Field [ Webviewer PDFKit::data; "" ]
                                                                • If [ Position ( MBS("WebView.GetURL"; "web") ; "http"; 1; 1) = 0 ]
                                                                • #Load a website
                                                                • Set Web Viewer [ Object Name: "web"; URL: "http://www.monkeybreadsoftware.com/filemaker/" ]
                                                                • Pause/Resume Script [ Duration (seconds): 2 ]
                                                                • End If
                                                                • #Take a picture
                                                                • Set Field [ Webviewer PDFKit::data; MBS("WebView.Screenshot"; "web") ]
                                                                Fields used in this script
                                                                Scripts used in this script
                                                                  Layouts used in this script
                                                                    Tables used in this script
                                                                    Table occurrences used by this script
                                                                    Custom Functions used by this script
                                                                      Custom menu set used by this script

                                                                        Previous Script: [Get Screenshot]
                                                                        Script Name Clear
                                                                        Run script with full access privileges Off
                                                                        Siri Shortcut Visible Off
                                                                        Include In Menu Yes
                                                                        Layouts that use this script
                                                                          Scripts that use this script
                                                                            Script Definition
                                                                            Script Steps
                                                                            • Set Field [ Webviewer PDFKit::data; "" ]
                                                                            Fields used in this script
                                                                            Scripts used in this script
                                                                              Layouts used in this script
                                                                                Tables used in this script
                                                                                Table occurrences used by this script
                                                                                Custom Functions used by this script
                                                                                  Custom menu set used by this script

                                                                                    Download example: WebViewer Save PDF

                                                                                    Used functions: