API reference › Import & Output APIs
pdfContentStreamSafe
Test whether the current page's q/Q operators are balanced.
Purpose — Test whether the current page's q/Q operators are balanced.
C
int32_t __stdcall pdfContentStreamSafe(PPDF IPDF);
Return value — 1 when balanced or when no page/content exists (vacuously safe); 0 when the counts differ or the instance handle is invalid.
C# (P/Invoke)
wrappers/dotnet/LumasPdf.cs
public static extern int pdfContentStreamSafe(IntPtr IPDF);
Area
Import & Output APIs
Category
Core
Exported names
pdfContentStreamSafe
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.