pdfSetTextRect
Set the rectangle [pdfWriteFText](E01_CoreTextOutput.md#api-pdfwriteftext)
| Category | Text state / flowed text |
|---|
Purpose — Set the rectangle pdfWriteFText (the non-Ex form) and pdfGetFTextHeight (the non-Ex form) draw/measure into.
Description — This call cannot itself fail — it always returns TRUE (there is no document/page precondition, since it only stores four doubles). A rectangle is considered "active" (FHasTextRect) only when both Width and Height are > 0; passing 0 or a negative size for either deactivates flow text until reset.
Declarations
BOOL32 __stdcall pdfSetTextRect(PPDF IPDF, double PosX, double PosY, double Width, double Height);
function pdfSetTextRect(const IPDF: PPDF; PosX, PosY, Width, Height: Double): LongBool; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
PosX, PosY | Double | Top-left of the rectangle. |
Width, Height | Double | Size; both must be > 0 to activate the rectangle. |
Return value — Always TRUE on a valid handle.
See also — pdfGetTextRect, pdfWriteFText
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSetTextRect
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.