API referenceCore SDK

pdfComputeBBox

Compute the current page's bounding box (its MediaBox, per

C
int32_t __stdcall pdfComputeBBox(PPDF IPDF, TPDFRect* BBox, TCompBBoxFlags Flags);
Delphi
function pdfComputeBBox(const IPDF: PPDF; var BBox: TPDFRect; Flags: TCompBBoxFlags): Integer; stdcall;

Purpose. Compute the current page's bounding box (its MediaBox, per the underlying GetCurrentPageBBox).

Description. Flags (TCompBBoxFlags) is accepted by the ABI but never passed through to GetCurrentPageBBox — whatever computation-mode selection the flag set implies (e.g. "compute from visible content" vs. "return the declared box") has no effect; the same fixed computation always runs regardless of Flags.

Parameters.

ParameterDescription
IPDFDocument handle.
BBoxOutput box.
FlagsAccepted but silently dropped.

Return value. 1 on success; 0 if IPDF invalid or no page open.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfComputeBBox(IntPtr IPDF, ref TPDFRect BBox, uint Flags);
Area
Core SDK
Category

Core

Exported names

pdfComputeBBox

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.