API referencePDF/X & Prepress

pdfGetInIsTrapped

The In-prefixed import-source counterpart to

C
int32_t __stdcall pdfGetInIsTrapped(PPDF IPDF);
Delphi
function pdfGetInIsTrapped(const IPDF: PPDF): Integer; stdcall;

Purpose. The In-prefixed import-source counterpart to pdfGetTrapped — reports whether the currently open import file (not the live document) declares itself already trapped.

Description. Guarded by HasImportFile, returning NO_IMPORT_ERR (-1073742011) if none is open — following the standard pdfGetIn* sentinel convention (though, per this manual's repeatedly-documented finding that this convention is inconsistently applied across the pdfGetIn* family, this particular function does apply it correctly, unlike e.g. pdfGetInIsEncrypted, V11). Reads the import source's own trailer /Info /Trapped name value directly, checking for the literal string 'True' (a /Trapped value of /Unknown — the PDF spec's third valid state alongside /True//False — is treated identically to /False/absent, since only an exact 'True' match sets the result).

Parameters.

ParameterDescription
IPDFDocument handle (whose *import source* is inspected).

Return value. 1 if the import source's /Info /Trapped is exactly /True; 0 if /False, /Unknown, or absent; NO_IMPORT_ERR if no import file is open.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetInIsTrapped(IntPtr IPDF);
Area
PDF/X & Prepress
Category

Getters

Exported names

pdfGetInIsTrapped

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.