MBS FileMaker Plugin Example Databases

Encrypt PDF

All examples are included with download of MBS FileMaker Plugin.

Encrypt PDF.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts3
Value Lists0
Custom Functions0
Custom Menus0
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
Encrypt PDF
11 fields defined, 1 record
Encrypt PDF

Fields

Table Name: Encrypt PDF - 11 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
InputPDFNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
      OutputPDFNormal, BinaryAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
          TitleNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              AuthorNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  SubjectNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      KeywordsNormal, TextAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          CreatorNormal, TextAuto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              OwnerPasswordNormal, TextAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                  UserPasswordNormal, TextAuto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                      AllowsPrintingNormal, NumberAuto-Enter:
                                      • Allow editing
                                      Validation:
                                      • Only during data entry
                                      Storage:
                                      • Repetitions: 1
                                      • Indexing: None
                                      • Automatically create indexes as needed
                                      • Index Language: German
                                          AllowsCopyingNormal, NumberAuto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: None
                                          • Automatically create indexes as needed
                                          • Index Language: German

                                              Layout Objects: Encrypt PDF

                                              Regular Fields

                                              Field Name: Encrypt PDF::InputPDF
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 52 pt
                                              • Left: 138 pt
                                              • Bottom: 177 pt
                                              • Right: 391 pt
                                              • Anchoring: Left, Top
                                              Field Format:
                                              • Edit Box
                                              Field Behavior:
                                              • Allow field to be entered: In Find mode, In Browse mode
                                              • Touch keyboard type: Default for Data Type
                                              • Go to next field using: Tab key
                                              No

                                              Field Name: Encrypt PDF::OutputPDF
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 179 pt
                                              • Left: 138 pt
                                              • Bottom: 304 pt
                                              • Right: 391 pt
                                              • Anchoring: Left, Top
                                              Field Format:
                                              • Edit Box
                                              Field Behavior:
                                              • Allow field to be entered: In Find mode, In Browse mode
                                              • Touch keyboard type: Default for Data Type
                                              • Go to next field using: Tab key
                                              No

                                              Field Name: Encrypt PDF::Title
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 76 pt
                                              • Left: 546 pt
                                              • Bottom: 97 pt
                                              • Right: 799 pt
                                              • Anchoring: Left, Top
                                              Field Format:
                                              • Edit Box
                                              Field Behavior:
                                              • Allow field to be entered: In Find mode, In Browse mode
                                              • Touch keyboard type: Default for Data Type
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: Encrypt PDF::Author
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 99 pt
                                              • Left: 546 pt
                                              • Bottom: 120 pt
                                              • Right: 799 pt
                                              • Anchoring: Left, Top
                                              Field Format:
                                              • Edit Box
                                              Field Behavior:
                                              • Allow field to be entered: In Find mode, In Browse mode
                                              • Touch keyboard type: Default for Data Type
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: Encrypt PDF::Subject
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 122 pt
                                              • Left: 546 pt
                                              • Bottom: 143 pt
                                              • Right: 799 pt
                                              • Anchoring: Left, Top
                                              Field Format:
                                              • Edit Box
                                              Field Behavior:
                                              • Allow field to be entered: In Find mode, In Browse mode
                                              • Touch keyboard type: Default for Data Type
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: Encrypt PDF::Keywords
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 145 pt
                                              • Left: 546 pt
                                              • Bottom: 166 pt
                                              • Right: 799 pt
                                              • Anchoring: Left, Top
                                              Field Format:
                                              • Edit Box
                                              Field Behavior:
                                              • Allow field to be entered: In Find mode, In Browse mode
                                              • Touch keyboard type: Default for Data Type
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: Encrypt PDF::Creator
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 168 pt
                                              • Left: 546 pt
                                              • Bottom: 189 pt
                                              • Right: 799 pt
                                              • Anchoring: Left, Top
                                              Field Format:
                                              • Edit Box
                                              Field Behavior:
                                              • Allow field to be entered: In Find mode, In Browse mode
                                              • Touch keyboard type: Default for Data Type
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: Encrypt PDF::OwnerPassword
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 214 pt
                                              • Left: 546 pt
                                              • Bottom: 235 pt
                                              • Right: 799 pt
                                              • Anchoring: Left, Top
                                              Field Format:
                                              • Edit Box
                                              Field Behavior:
                                              • Allow field to be entered: In Find mode, In Browse mode
                                              • Touch keyboard type: Default for Data Type
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: Encrypt PDF::UserPassword
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 237 pt
                                              • Left: 546 pt
                                              • Bottom: 258 pt
                                              • Right: 799 pt
                                              • Anchoring: Left, Top
                                              Field Format:
                                              • Edit Box
                                              Field Behavior:
                                              • Allow field to be entered: In Find mode, In Browse mode
                                              • Touch keyboard type: Default for Data Type
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: Encrypt PDF::AllowsPrinting
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 260 pt
                                              • Left: 546 pt
                                              • Bottom: 281 pt
                                              • Right: 669 pt
                                              • Anchoring: Left, Top
                                              Field Format:
                                              • Edit Box
                                              Field Behavior:
                                              • Allow field to be entered: In Find mode, In Browse mode
                                              • Touch keyboard type: Default for Data Type
                                              • Go to next field using: Tab key
                                              Yes

                                              Field Name: Encrypt PDF::AllowsCopying
                                              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                              • Top: 283 pt
                                              • Left: 546 pt
                                              • Bottom: 304 pt
                                              • Right: 669 pt
                                              • Anchoring: Left, Top
                                              Field Format:
                                              • Edit Box
                                              Field Behavior:
                                              • Allow field to be entered: In Find mode, In Browse mode
                                              • Touch keyboard type: Default for Data Type
                                              • Go to next field using: Tab key
                                              Yes

                                              Buttons

                                              Button PropertiesCoordinatesScript/Script Step
                                                Type:
                                              • Text: Import
                                              • Top: 149 pt
                                              • Left: 38 pt
                                              • Bottom: 177 pt
                                              • Right: 127 pt
                                              • Anchoring: Left, Top
                                              Perform Script [ “Import PDF” ]

                                              Scripts:


                                              Button PropertiesCoordinatesScript/Script Step
                                                Type:
                                              • Text: Export
                                              • Top: 276 pt
                                              • Left: 38 pt
                                              • Bottom: 304 pt
                                              • Right: 127 pt
                                              • Anchoring: Left, Top
                                              Perform Script [ “Export PDF” ]

                                              Scripts:


                                              Button PropertiesCoordinatesScript/Script Step
                                                Type:
                                              • Text: Process
                                              • Top: 273 pt
                                              • Left: 809 pt
                                              • Bottom: 301 pt
                                              • Right: 922 pt
                                              • Anchoring: Left, Top
                                              Perform Script [ “Process” ]

                                              Scripts:


                                              Script Hierarchy

                                              Import PDF
                                              Export PDF
                                              Process

                                              Next Script: [Export PDF]
                                              Script NameImport PDF
                                              Run script with full access privilegesOff
                                              Include In MenuYes
                                              Layouts that use this script
                                              Scripts that use this script
                                                Script Definition
                                                Script Steps
                                                • Go to Field [ Encrypt PDF::InputPDF ]
                                                • Insert 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: [Import PDF]Next Script: [Process]
                                                        Script NameExport PDF
                                                        Run script with full access privilegesOff
                                                        Include In MenuYes
                                                        Layouts that use this script
                                                        Scripts that use this script
                                                          Script Definition
                                                          Script Steps
                                                          • Export Field Contents [ Encrypt PDF::OutputPDF ]
                                                          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: [Export PDF]
                                                                  Script NameProcess
                                                                  Run script with full access privilegesOff
                                                                  Include In MenuNo
                                                                  Layouts that use this script
                                                                  Scripts that use this script
                                                                    Script Definition
                                                                    Script Steps
                                                                    • #Check if we have a PDF
                                                                    • If [ IsEmpty ( Encrypt PDF::InputPDF ) ]
                                                                    • Show Custom Dialog [ Title: "No PDF document."; Message: "Please import a PDF first."; Default Button: “OK”, Commit: “Yes” ]
                                                                    • Exit Script [ ]
                                                                    • End If
                                                                    • Set Variable [ $pdf; Value:MBS( "PDFKit.OpenContainer"; Encrypt PDF::InputPDF ) ]
                                                                    • If [ MBS("IsError") ]
                                                                    • Show Custom Dialog [ Title: "Failed to open PDF"; Message: $pdf; Default Button: “OK”, Commit: “Yes” ]
                                                                    • Exit Script [ ]
                                                                    • End If
                                                                    • #set metadata, if we have a value, otherwise leave old one there
                                                                    • Set Variable [ $r; Value:If(Length(Encrypt PDF::Title) > 0; MBS( "PDFKit.SetPDFAttribute"; $PDF; "Title"; Encrypt PDF::Title ); "") ]
                                                                    • Set Variable [ $r; Value:If(Length(Encrypt PDF::Author) > 0; MBS( "PDFKit.SetPDFAttribute"; $PDF; "Author"; Encrypt PDF::Author ); "") ]
                                                                    • Set Variable [ $r; Value:If(Length(Encrypt PDF::Subject) > 0; MBS( "PDFKit.SetPDFAttribute"; $PDF; "Subject"; Encrypt PDF::Subject ); "") ]
                                                                    • Set Variable [ $r; Value:If(Length(Encrypt PDF::Keywords) > 0; MBS( "PDFKit.SetPDFAttribute"; $PDF; "Keywords"; Encrypt PDF::Keywords ); "") ]
                                                                    • Set Variable [ $r; Value:If(Length(Encrypt PDF::Creator) > 0; MBS( "PDFKit.SetPDFAttribute"; $PDF; "Creator"; Encrypt PDF::Creator ); "") ]
                                                                    • #add password if needed
                                                                    • Set Variable [ $r; Value:If(Length(Encrypt PDF::OwnerPassword) > 0; MBS( "PDFKit.SetPDFAttribute"; $PDF; "OwnerPassword"; Encrypt PDF::OwnerPassword ); "") ]
                                                                    • Set Variable [ $r; Value:If(Length(Encrypt PDF::UserPassword) > 0; MBS( "PDFKit.SetPDFAttribute"; $PDF; "UserPassword"; Encrypt PDF::UserPassword ); "") ]
                                                                    • Set Variable [ $r; Value:If(Length(Encrypt PDF::OwnerPassword) > 0; MBS( "PDFKit.SetPDFAttribute"; $PDF; "EncryptionKeyLength"; 128 ); "") ]
                                                                    • Set Variable [ $r; Value:If(Length(Encrypt PDF::AllowsPrinting) > 0; MBS( "PDFKit.SetPDFAttribute"; $PDF; "AllowsPrinting"; Encrypt PDF::AllowsPrinting ); "") ]
                                                                    • Set Variable [ $r; Value:If(Length(Encrypt PDF::AllowsCopying) > 0; MBS( "PDFKit.SetPDFAttribute"; $PDF; "AllowsCopying"; Encrypt PDF::AllowsCopying ); "") ]
                                                                    • Set Field [ Encrypt PDF::OutputPDF; MBS( "PDFKit.GetPDFDocument"; $PDF; GetAsText(Encrypt PDF::InputPDF) ) ]
                                                                    • Set Variable [ $r; Value:MBS( "PDFKit.Release"; $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

                                                                            Download example: Encrypt PDF

                                                                            Used functions:




                                                                            Links
                                                                            MBS FileMaker Plugins