| Category | Text state / flowed text |
|---|
Purpose — Read back the current flow-text rectangle set by pdfSetTextRect.
Declarations
BOOL32 __stdcall pdfGetTextRect(PPDF IPDF, double* PosX, double* PosY, double* Width, double* Height);
function pdfGetTextRect(const IPDF: PPDF; var PosX, PosY, Width, Height: Double): LongBool; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
PosX, PosY, Width, Height | Double* | Receive the last-set rectangle, regardless of the return value (see Return value). |
Return value — TRUE if a rectangle with positive Width and Height has been set (FHasTextRect); FALSE otherwise. The out-parameters are still written even when the return value is FALSE — they carry whatever values were last passed to pdfSetTextRect (possibly a degenerate 0×0 rect if never set), so check the return value, not just the out-parameters, to know whether a valid rectangle is active.
See also — pdfSetTextRect, pdfWriteFText
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Getters
pdfGetTextRect
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.