API reference › Import & Output APIs
pdfOpenTagBBox
The same open-tag primitive as pdfOpenTag, additionally
BOOL32 __stdcall pdfOpenTagBBoxA(void* IPDF, TPDFBaseTag Tag, const char* Lang, const char* AltText, const char* Expansion, PBBox BBox);
function pdfOpenTagBBoxA(const IPDF: Pointer; Tag: TPDFBaseTag; const Lang, AltText, Expansion: PAnsiChar; BBox: PBBox): LongBool; stdcall;
Purpose. The same open-tag primitive as pdfOpenTag, additionally recording a layout bounding box (/A /Layout /BBox) for the element — used for structure elements whose accessible bounds need to be explicit (e.g. a Figure or Table that doesn't tightly correspond to its content-stream drawing extent).
Description. Genuinely real, and — per an explicit inline comment — a confirmed past-bug-fix: "G-33: honour the layout bounding box (was dropped) -> /A /Layout /BBox." Calls the identical OpenStructTagEx(Tag, AltText, Lang, Expansion, '') as pdfOpenTag (so it inherits the exact same Attributes-less limitation implicitly — there is no Attributes parameter on this variant at all, only BBox), and — only if the open succeeded and BBox <> nil — calls SetLastTagBBox, which stores the four coordinates against the just-registered structure element (FStructCount - 1, i.e. always the element this exact call just opened, not any other open tag on the stack). **IPDF is declared void*/Pointer in the ABI** (unlike the other three functions' PPDF), cast internally via GetDoc(PPDF(IPDF)) — the same "opaque pointer, cast internally" pattern documented for other functions elsewhere in this manual (e.g. V10's pdfGetSigDict).
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle, declared as an opaque Pointer in the ABI (cast to PPDF internally). |
Tag, Lang, AltText, Expansion | Same as pdfOpenTag. |
BBox | Layout bounding box for this specific element; genuinely stored (a real, verified fix — was previously dropped) if non-nil and the open succeeded. |
Return value. True under the same conditions as pdfOpenTag (the BBox step cannot itself cause a failure — a nil BBox is simply skipped, not an error).
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Core
pdfOpenTagBBoxA
pdfOpenTagBBoxW
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.