API referenceCore SDK

pdfDeleteAppEvents

Clear a specific application-event bit (Event) from

C
int32_t __stdcall pdfDeleteAppEvents(PPDF IPDF, BOOL32 ApplyEvent, TOCAppEvent Event);
Delphi
function pdfDeleteAppEvents(const IPDF: PPDF; ApplyEvent: LongBool; Event: TOCAppEvent): Integer; stdcall;

Purpose. Clear a specific application-event bit (Event) from every registered OCG's usage dictionary in the document (the document-wide bulk counterpart of the single-OCG pdfDeleteOCGFromAppEvent, Optional Content (OCG) Layers) — per an inline comment, "clear an application-event bit from every OCG; returns the count modified."

Description. ApplyEvent is accepted by the ABI but never passed through to ClearAppEventH — whatever conditional behavior it implies has no effect; the bit is always cleared from every OCG that has it set, regardless of ApplyEvent's value.

Parameters.

ParameterDescription
IPDFDocument handle.
ApplyEventAccepted but silently dropped.
EventWhich application-event bit (View/Print/Export) to clear from every OCG.

Return value. The number of OCGs actually modified (had the bit set and cleared); 0 if IPDF is invalid or no OCG had that bit set.

See also. pdfDeleteOCGFromAppEvent.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfDeleteAppEvents(IntPtr IPDF, [MarshalAs(UnmanagedType.Bool)] bool ApplyEvent, uint @Event);
Area
Core SDK
Category

Core

Exported names

pdfDeleteAppEvents

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.