API referenceCore SDK

pdfSetCapturedPageOptional

Retroactively wrap a captured (imported/replayed) page's

C
int32_t __stdcall pdfSetCapturedPageOptional(PPDF IPDF, int32_t CaptureID, int32_t OptionalContentGroupID);
int32_t __stdcall pdfSetCapturedPageTransparencyGroup(PPDF IPDF, int32_t CaptureID, int32_t CS, int32_t Isolate, int32_t Knockout);
Delphi
function pdfSetCapturedPageOptional(const IPDF: PPDF; CaptureID, OptionalContentGroupID: Integer): Integer; stdcall;
function pdfSetCapturedPageTransparencyGroup(const IPDF: PPDF; CaptureID, CS, Isolate, Knockout: Integer): Integer; stdcall;

Purpose. Retroactively wrap a captured (imported/replayed) page's content in an optional-content-group scope or a transparency-group /Group dict — for content that was brought in via a capture/import mechanism rather than authored directly, where the OCG/transparency wrapping needs to be applied after the fact.

Description. Both are real (SetCapturedPageOC/SetCapturedPageGroup), addressed by CaptureID (the identifier of a specific captured-page session, distinct from a page number or template handle).

Parameters.

ParameterDescription
IPDFDocument handle.
CaptureIDThe captured-page session identifier.
OptionalContentGroupID*(Optional only)* The OCG to scope the captured content under.
CS, Isolate, Knockout*(TransparencyGroup only)* Group color space and blending flags.

Return value. 1 on success; 0 if CaptureID doesn't resolve or IPDF is invalid.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfSetCapturedPageOptional(IntPtr IPDF, int CaptureID, int OptionalContentGroupID);
Area
Core SDK
Category

Setters

Exported names

pdfSetCapturedPageOptional

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.