Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
DynaPDF.SetOCGState
Changes the visibility state of an OCG or layer.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 9.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "DynaPDF.SetOCGState"; PDF; Handle; On { ; SaveState } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
The PDF reference returned from DynaPDF.New. | |||
Handle | The OCG handle. Index from 0 to DynaPDF.GetOCGCount-1. |
$OCG | |
On | Wished state: 1 = visible, 0 = invisible | 1 | |
SaveState | Whether to save the state in the PDF file? Pass 1 to save or 0 to only switch temporarly. Default 0. |
1 | Optional |
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
- DynaPDF.CreateOCG
- DynaPDF.GetOCG
- DynaPDF.GetOCGCount
- DynaPDF.LockLayer
- DynaPDF.New
- DynaPDF.RenderPage
- DynaPDF.RenderPDFFile
- DynaPDF.SetAnnotDate
- DynaPDF.SetExtGState
Release notes
- Version 9.1
- Added DynaPDF.GetOCG, DynaPDF.GetOCGContUsage, DynaPDF.GetOCGCount, DynaPDF.GetOCGUsageUserName and DynaPDF.SetOCGState functions for PDF layers.
Blog Entries
- Unlocking the Power of PDFs in FileMaker with DynaPDF and the MBS FileMaker Plugin
- MBS FileMaker Plugin, version 9.1pr4
This function checks for a license.
Created 18th February 2019, last changed 18th February 2019