API referencePDF/X & Prepress

pdfSetTrapped

Get/set the document /Info /Trapped flag (True/False,

C
BOOL32 __stdcall pdfGetTrapped(PPDF IPDF);
void __stdcall pdfSetTrapped(PPDF IPDF, BOOL32 Value);
Delphi
function pdfGetTrapped(const IPDF: PPDF): LongBool; stdcall;
procedure pdfSetTrapped(const IPDF: PPDF; Value: LongBool); stdcall;

Purpose. Get/set the document /Info /Trapped flag (True/False, serialized as the PDF name /True//False) — signals to downstream prepress tooling and PDF/X validators whether color trapping has already been applied to this file.

Description. A plain boolean field (FIsTrapped); this SDK does not itself perform any trapping operation (no automatic trap-generation feature exists in this API surface) — this flag is purely a metadata declaration for external tooling to trust or verify, matching the PDF spec's own definition of /Trapped as an informational flag, not an instruction.

Parameters.

ParameterDescription
IPDFDocument handle.
Value*(Set only)* New trapped-state flag.

Return value. pdfGetTrapped: the current flag state (False by default).

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern void pdfSetTrapped(IntPtr IPDF, [MarshalAs(UnmanagedType.Bool)] bool Value);
Area
PDF/X & Prepress
Category

Setters

Exported names

pdfSetTrapped

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.