Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1    Statistic  

DynaPDF.IsInitialized

Checks if DynaPDF library has been initialized.

Component: DynaPDF
Version: 4.2
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: 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

See also


DynaPDF.IsEmptyPage   -   DynaPDF.LineAnnot

Feedback: Report problem or ask question.




Links
MBS Realbasic Plugins - Besuchen Sie die JUZ Nickenich Webseite