API referenceText

pdfSetExtGState

Apply a previously-created /ExtGState resource to the

CategoryExtended graphics state

Purpose — Apply a previously-created /ExtGState resource to the current content stream.

Description — Emits a /GSn gs operator referencing the resource created by pdfCreateExtGState(Handle). This is the step that actually puts the graphics state (alpha, blend mode, etc.) into effect from this point in the content stream forward — creating the resource alone (pdfCreateExtGState) does not apply it.

Declarations

C
BOOL32 __stdcall pdfSetExtGState(PPDF IPDF, uint32_t Handle);
Delphi
function pdfSetExtGState(const IPDF: PPDF; Handle: Cardinal): LongBool; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle with an open page/content stream.
HandleCardinalHandle from pdfCreateExtGState.

Return valueTRUE on success; FALSE if Handle doesn't resolve to a registered ExtGState, or no content stream is open.

See alsopdfCreateExtGState (V03), pdfSetExtGStatePrepress

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Text
Category

Setters

Exported names

pdfSetExtGState

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.