MBS FileMaker Plugin Example Databases

DynaPDF Barcode

All examples are included with download of MBS FileMaker Plugin.

DynaPDF Barcode.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts3
Value Lists0
Custom Functions0
Custom Menus33
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
DynaPDF Barcode
10 fields defined, 4 records
DynaPDF Barcode

Fields

Table Name: DynaPDF Barcode - 10 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
PDFFileNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Global
  • Repetitions: 1
      BarcodeNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          TypeNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              XNormal, NumberAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  YNormal, NumberAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      WNormal, NumberAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: None
                      • Automatically create indexes as needed
                      • Index Language: German
                          HNormal, NumberAuto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: None
                          • Automatically create indexes as needed
                          • Index Language: German
                              BarcodeWithChecksumNormal, TextAuto-Enter: Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                  FontSizeNormal, NumberAuto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                      AngleNormal, NumberAuto-Enter:
                                      • Allow editing
                                      Validation:
                                      • Only during data entry
                                      Storage:
                                      • Repetitions: 1
                                      • Indexing: None
                                      • Automatically create indexes as needed
                                      • Index Language: German

                                          Layout Objects: DynaPDF Barcode

                                          Regular Fields

                                          Field Name: DynaPDF Barcode::PDFFile
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 6 pt
                                          • Left: 66 pt
                                          • Bottom: 413 pt
                                          • Right: 553 pt
                                          • Anchoring: Left, Top
                                          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

                                          Field Name: DynaPDF Barcode::Barcode
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 426 pt
                                          • Left: 138 pt
                                          • Bottom: 440 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: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: DynaPDF Barcode::Type
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 444 pt
                                          • Left: 138 pt
                                          • Bottom: 458 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: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: DynaPDF Barcode::X
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 462 pt
                                          • Left: 138 pt
                                          • Bottom: 476 pt
                                          • Right: 217 pt
                                          • Anchoring: Left, Top
                                          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
                                          Yes

                                          Field Name: DynaPDF Barcode::Y
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 480 pt
                                          • Left: 138 pt
                                          • Bottom: 494 pt
                                          • Right: 217 pt
                                          • Anchoring: Left, Top
                                          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
                                          Yes

                                          Field Name: DynaPDF Barcode::W
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 498 pt
                                          • Left: 138 pt
                                          • Bottom: 512 pt
                                          • Right: 217 pt
                                          • Anchoring: Left, Top
                                          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
                                          Yes

                                          Field Name: DynaPDF Barcode::H
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 516 pt
                                          • Left: 138 pt
                                          • Bottom: 530 pt
                                          • Right: 217 pt
                                          • Anchoring: Left, Top
                                          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
                                          Yes

                                          Field Name: DynaPDF Barcode::BarcodeWithChecksum
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 534 pt
                                          • Left: 138 pt
                                          • Bottom: 548 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: System Default
                                          • Go to next field using: Tab key
                                          Yes

                                          Field Name: DynaPDF Barcode::FontSize
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 552 pt
                                          • Left: 138 pt
                                          • Bottom: 566 pt
                                          • Right: 217 pt
                                          • Anchoring: Left, Top
                                          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
                                          Yes

                                          Field Name: DynaPDF Barcode::Angle
                                          Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                          • Top: 570 pt
                                          • Left: 138 pt
                                          • Bottom: 584 pt
                                          • Right: 217 pt
                                          • Anchoring: Left, Top
                                          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
                                          Yes

                                          Group Buttons

                                          Button PropertiesCoordinatesScript/Script Step
                                            Type:
                                          • Text: Run
                                            Additional Properties:
                                          • Change to hand cursor over button
                                          • Rectangular
                                          • Top: 12 pt
                                          • Left: 564 pt
                                          • Bottom: 37 pt
                                          • Right: 661 pt
                                          • Anchoring: Left, Top
                                          Perform Script [ “Run BottomUp” ]

                                          Scripts:


                                          Script Hierarchy

                                          InitDynaPDF
                                          Run BottomUp
                                          Run TopDown

                                          Next Script: [Run BottomUp]
                                          Script NameInitDynaPDF
                                          Run script with full access privilegesOff
                                          Include In MenuNo
                                          Layouts that use this script
                                            Scripts that use this script
                                            Script Definition
                                            Script Steps
                                            • #Locate DynaPDF library
                                            • Set Variable [ $databasePath; Value:Get(FilePath) ]
                                            • Set Variable [ $databasePath; Value:MBS("Path.FilemakerPathToNativePath"; $databasePath) ]
                                            • Set Variable [ $databasePath; Value:Substitute ( $databasePath ; ".fp7" ; ".fmp12") ]
                                            • Set Variable [ $databasePath; Value:Substitute ( $databasePath ; "/Barcode/" ; "/DynaPDF/") ]
                                            • Set Variable [ $databasePath; Value:Substitute ( $databasePath ; "\Barcode\\" ; "\DynaPDF\\") ]
                                            • Set Variable [ $databaseName; Value:Get(FileName) & ".fmp12" ]
                                            • If [ Get(SystemPlatform) = -2 ]
                                            • Set Variable [ $path; Value:Substitute ( $databasePath ; $databaseName ; "dynapdf.dll" ) ]
                                            • Else
                                            • Set Variable [ $path; Value:Substitute ( $databasePath ; $databaseName ; "dynapdf.dylib" ) ]
                                            • End If
                                            • #Initialize DynaPDF
                                            • Set Variable [ $r; Value:MBS( "DynaPDF.Initialize"; $path) ]
                                            • If [ $r ≠ "OK" ]
                                            • Show Custom Dialog [ Title: "DynaPDF failed to initialize"; Message: $r; Default Button: “OK”, Commit: “No”; Button 2: “Abbrechen”, Commit: “No” ]
                                            • Else
                                            • Set Variable [ $$DynaPDFInited; Value:1 ]
                                            • End If
                                            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: [InitDynaPDF]Next Script: [Run TopDown]
                                                          Script NameRun BottomUp
                                                          Run script with full access privilegesOff
                                                          Include In MenuYes
                                                          Layouts that use this script
                                                          Scripts that use this script
                                                            Script Definition
                                                            Script Steps
                                                            • Set Variable [ $r; Value:MBS("Trace") ]
                                                            • #Initialize DynaPDF if needed
                                                            • If [ $$DynaPDFInited ≠ 1 ]
                                                            • Perform Script [ “InitDynaPDF” ]
                                                            • End If
                                                            • #Clear current PDF document
                                                            • Set Variable [ $pdf; Value:MBS("DynaPDF.New") ]
                                                            • #Add page
                                                            • Set Variable [ $r; Value:MBS("DynaPDF.AppendPage"; $pdf) ]
                                                            • Set Variable [ $r; Value:MBS("DynaPDF.SetFont"; $pdf; "Helvetica"; 0; 12) ]
                                                            • #Write barcode
                                                            • Go to Record/Request/Page [ First ]
                                                            • Loop
                                                            • If [ DynaPDF Barcode::Angle ≠ 0 ]
                                                            • Set Variable [ $r; Value:MBS("DynaPDF.SaveGraphicState"; $pdf) ]
                                                            • Set Variable [ $r; Value:MBS("DynaPDF.TranslateCoords"; $pdf; DynaPDF Barcode::X; DynaPDF Barcode::Y) ]
                                                            • Set Variable [ $r; Value:MBS("DynaPDF.RotateCoords"; $pdf; DynaPDF Barcode::Angle) ]
                                                            • Set Variable [ $r; Value:MBS("DynaPDF.TranslateCoords"; $pdf; -DynaPDF Barcode::X; -DynaPDF Barcode::Y) ]
                                                            • End If
                                                            • // Set Variable [ $r; Value:MBS("DynaPDF.SetFillColor"; $pdf; 0; 255; 255) ]
                                                            • // Set Variable [ $r; Value:MBS("DynaPDF.Rectangle"; $pdf; DynaPDF Barcode::X; DynaPDF Barcode::Y; DynaPDF Barcode::W; DynaPDF Barcode::H; "fill") ]
                                                            • Set Variable [ $r; Value:MBS("DynaPDF.SetFillColor"; $pdf; 0; 0; 0) ]
                                                            • Set Variable [ $r; Value:MBS("Barcode.DrawBarcode"; $pdf; DynaPDF Barcode::Type; DynaPDF Barcode::BarcodeWithChecksum; DynaPDF Barcode::X; DynaPDF Barcode::Y; DynaPDF Barcode::W; DynaPDF Barcode::H) ]
                                                            • If [ DynaPDF Barcode::FontSize>0 ]
                                                            • Set Variable [ $r; Value:MBS("DynaPDF.SetFont"; $pdf; "Courier"; 0; DynaPDF Barcode::FontSize) ]
                                                            • // Set Variable [ $r; Value:MBS("DynaPDF.WriteFTextEx"; $pdf; DynaPDF Barcode::X; DynaPDF Barcode::Y - DynaPDF Barcode::FontSize *,2; DynaPDF Barcode::W; 30; "center"; DynaPDF Barcode::Barcode) ]
                                                            • Set Variable [ $r; Value:MBS("DynaPDF.WriteFTextEx"; $pdf; DynaPDF Barcode::X; DynaPDF Barcode::Y - DynaPDF Barcode::FontSize *,2; DynaPDF Barcode::W; 30; "center"; DynaPDF Barcode::Barcode) ]
                                                            • End If
                                                            • If [ DynaPDF Barcode::Angle ≠ 0 ]
                                                            • Set Variable [ $r; Value:MBS("DynaPDF.RestoreGraphicState"; $pdf) ]
                                                            • End If
                                                            • Go to Record/Request/Page [ Next; Exit after last ]
                                                            • End Loop
                                                            • #End page
                                                            • Set Variable [ $r; Value:MBS("DynaPDF.EndPage"; $pdf) ]
                                                            • #Set title
                                                            • Set Variable [ $r; Value:MBS("DynaPDF.SetDocInfo"; $pdf; "Title"; "Test PDF") ]
                                                            • #Render one page as Picture
                                                            • Set Variable [ $PDFData; Value:MBS("DynaPDF.Save"; $pdf; "hello.pdf") ]
                                                            • Set Variable [ $r; Value:MBS("DynaPDF.Release"; $pdf) ]
                                                            • #Put in Container
                                                            • Set Field [ DynaPDF Barcode::PDFFile; $PDFData ]
                                                            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: [Run BottomUp]
                                                                  Script NameRun TopDown
                                                                  Run script with full access privilegesOff
                                                                  Include In MenuYes
                                                                  Layouts that use this script
                                                                    Scripts that use this script
                                                                      Script Definition
                                                                      Script Steps
                                                                      • Set Variable [ $r; Value:MBS("Trace") ]
                                                                      • #Initialize DynaPDF if needed
                                                                      • If [ $$DynaPDFInited ≠ 1 ]
                                                                      • Perform Script [ “InitDynaPDF” ]
                                                                      • End If
                                                                      • #Clear current PDF document
                                                                      • Set Variable [ $pdf; Value:MBS("DynaPDF.New") ]
                                                                      • #Add page
                                                                      • Set Variable [ $r; Value:MBS("DynaPDF.AppendPage"; $pdf) ]
                                                                      • Set Variable [ $r; Value:MBS("DynaPDF.SetPageCoords"; $pdf; "TopDown") ]
                                                                      • Set Variable [ $r; Value:MBS("DynaPDF.SetFont"; $pdf; "Helvetica"; 0; 12) ]
                                                                      • #Write barcode
                                                                      • Go to Record/Request/Page [ First ]
                                                                      • Loop
                                                                      • // Set Variable [ $r; Value:MBS("DynaPDF.SetFillColor"; $pdf; 0; 255; 255) ]
                                                                      • // Set Variable [ $r; Value:MBS("DynaPDF.Rectangle"; $pdf; DynaPDF Barcode::X; DynaPDF Barcode::Y; DynaPDF Barcode::W; DynaPDF Barcode::H; "fill") ]
                                                                      • Set Variable [ $r; Value:MBS("DynaPDF.SetFillColor"; $pdf; 0; 0; 0) ]
                                                                      • Set Variable [ $r; Value:MBS("Barcode.DrawBarcode"; $pdf; DynaPDF Barcode::Type; DynaPDF Barcode::BarcodeWithChecksum; DynaPDF Barcode::X; DynaPDF Barcode::Y; DynaPDF Barcode::W; DynaPDF Barcode::H) ]
                                                                      • If [ DynaPDF Barcode::FontSize>0 ]
                                                                      • Set Variable [ $r; Value:MBS("DynaPDF.SetFont"; $pdf; "Courier"; 0; DynaPDF Barcode::FontSize) ]
                                                                      • // Set Variable [ $r; Value:MBS("DynaPDF.WriteFTextEx"; $pdf; DynaPDF Barcode::X; DynaPDF Barcode::Y - DynaPDF Barcode::FontSize *,2; DynaPDF Barcode::W; 30; "center"; DynaPDF Barcode::Barcode) ]
                                                                      • Set Variable [ $r; Value:MBS("DynaPDF.WriteFTextEx"; $pdf; DynaPDF Barcode::X; DynaPDF Barcode::Y + DynaPDF Barcode::H+ DynaPDF Barcode::FontSize *,2; DynaPDF Barcode::W; 30; "center"; DynaPDF Barcode::Barcode) ]
                                                                      • End If
                                                                      • Go to Record/Request/Page [ Next; Exit after last ]
                                                                      • End Loop
                                                                      • #End page
                                                                      • Set Variable [ $r; Value:MBS("DynaPDF.EndPage"; $pdf) ]
                                                                      • #Set title
                                                                      • Set Variable [ $r; Value:MBS("DynaPDF.SetDocInfo"; $pdf; "Title"; "Test PDF") ]
                                                                      • #Render one page as Picture
                                                                      • Set Variable [ $PDFData; Value:MBS("DynaPDF.Save"; $pdf; "hello.pdf") ]
                                                                      • Set Variable [ $r; Value:MBS("DynaPDF.Release"; $pdf) ]
                                                                      • #Put in Container
                                                                      • Set Field [ DynaPDF Barcode::PDFFile; $PDFData ]
                                                                      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: DynaPDF Barcode

                                                                            Used functions:




                                                                            Links
                                                                            MBS Xojo blog