| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
DynaPDF.IsInitialized
Checks if DynaPDF library has been initialized.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| DynaPDF | 4.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "DynaPDF.IsInitialized" )
Parameters
none
Result
Returns 1 or 0.
Description
Checks if DynaPDF library has been initialized.If value is 1, everything is okay.
If value is zero, the library is not initialized and you need to call DynaPDF.Initialize function.
On a hosted database this function is better than using a global variable, as the variable can't see if initialization was made on server or client side.
Examples
Initialize when needed:
#Initialize DynaPDF
If [MBS( "DynaPDF.IsInitialized" ) ≠ 1]
If [Get ( SystemPlatform ) = -3]
# iOS
Exit Script []
Else If [Get ( SystemPlatform ) = -2]
# Windows
Set Variable [$path; Value: "dynapdf.dll"]
Else
# Mac
Set Variable [$path; Value: "dynapdf.dylib"]
End If
Set Variable [$r; Value: MBS( "DynaPDF.Initialize"; $path; "12345..." )]
If [$r ≠ "OK"]
Show Custom Dialog [ "DynaPDF failed to initialize"; $r]
End If
End If
If [MBS( "DynaPDF.IsInitialized" ) ≠ 1]
If [Get ( SystemPlatform ) = -3]
# iOS
Exit Script []
Else If [Get ( SystemPlatform ) = -2]
# Windows
Set Variable [$path; Value: "dynapdf.dll"]
Else
# Mac
Set Variable [$path; Value: "dynapdf.dylib"]
End If
Set Variable [$r; Value: MBS( "DynaPDF.Initialize"; $path; "12345..." )]
If [$r ≠ "OK"]
Show Custom Dialog [ "DynaPDF failed to initialize"; $r]
End If
End If
See also
- DynaPDF.Optimize
- DynaPDF.RenderPage
- DynaPDF.ReplaceImage
- DynaPDF.SaveAndSignFileExt
- DynaPDF.Table.Create
- DynaPDF.Table.Draw
- DynaPDF.Uninitialize
- DynaPDF.WriteFTextEx
- IsRegistered
- PDFKit.GeneratePreview
Example Databases
- Barcode/Barcodes from Invoices
- DynaPDF/Apply Letter Paper to PDF
- DynaPDF/Catalog with tables
- DynaPDF/Change Separation Colorant
- DynaPDF/Create Form
- DynaPDF/Find and Replace Text
- DynaPDF/Form/Form
- DynaPDF/Place Template
- DynaPDF/System Font Info
- Registration/Registration
Blog Entries
- Using DynaPDF with Data API for PDF generation
- Make PDF certificates in calculation with DynaPDF
- Retract text from a PDF with DynaPDF
- Use complex text rendering with DynaPDF in FileMaker
- How the Script Merges PDFs and Inserts an Image: A Detailed Breakdown
- MBS FileMaker Advent calendar - Door 10 - Reading The Wish List
- MBS FileMaker Advent calendar - Door 6 - Sending Out Wishlist Forms
- MBS FileMaker Advent calendar - Door 4 - Add GTC with DynaPDF
- DynaPDF Parser for FileMaker
- MBS Plugin Advent calendar: 15 - DynaPDF
FileMaker Magazin
This function is free to use.
Created 18th August 2014, last changed 18th December 2015
MarkDown version: DynaPDFIsInitialized.md