int32_t __stdcall pdfGetInIsTrapped(PPDF IPDF);
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.
| Parameter | Description |
|---|---|
IPDF | Document 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)
public static extern int pdfGetInIsTrapped(IntPtr IPDF);
Getters
pdfGetInIsTrapped
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.