Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.5   8.0   8.1   8.2   8.3   8.4   8.5   9.0   9.1   9.2    Statistic  

DynaPDF.SetOCGState

Changes the visibility state of an OCG or layer.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 9.1 Yes Yes Yes Yes Yes
MBS( "DynaPDF.SetOCGState"; PDF; Handle; On { ; SaveState } )   More

Parameters

Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
Handle The OCG handle.
Index from 0 to DynaPDF.GetOCGCount-1.
$OCG
On Wished state: 1 = visible, 0 = invisible 1
SaveState Optional
Whether to save the state in the PDF file?
Pass 1 to save or 0 to only switch temporarly.
Default 0.
1

Result

Returns OK or error.

Description

Changes the visibility state of an OCG or layer.
If the parameter SaveState is 1, the new state is also saved in the PDF file. Otherwise, the state is only changed temporarily so that the wished state can be rendered with DynaPDF.RenderPage or DynaPDF.RenderPDFFile for example.
Note that only the new state of the current OCG will be be saved. If the state of other OCGs were changed beforehand, while SaveState was set to 0, then these changes will not be considered.

See also SetOCGState function in DynaPDF manual.

See also

Blog Entries

Created 18th February 2019, last changed 18th February 2019


DynaPDF.SetNumberFormat   -   DynaPDF.SetOpacity

Feedback: Report problem or ask question.




Links
MBS Xojo Chart Plugins