pdfSetTextExtractionScaling
Apply a coordinate scale factor to extracted-text run positions
| Category | Text extraction tuning |
|---|---|
| Note | Options is stored but not consumed — see Remarks |
Purpose — Apply a coordinate scale factor to extracted-text run positions (used by the text-extraction APIs, e.g. pdfExtractText/pdfGetPageText).
Description — Multiplies every extracted run's X/EndX by Horizontal and Y/Height by Vertical before returning extracted text geometry. Values <= 0 are ignored (the corresponding axis keeps its prior scale, default 1.0).
Declarations
int32_t __stdcall pdfSetTextExtractionScaling(PPDF IPDF, int32_t Options, double Horizontal, double Vertical);
function pdfSetTextExtractionScaling(const IPDF: PPDF; Options: Integer; Horizontal, Vertical: Double): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Options | Integer | Accepted and stored (TextExtractScaleOpts); not read anywhere else in the codebase in this build — has no observable effect. |
Horizontal, Vertical | Double | Scale factors applied to extracted run X/Y and width/height respectively; <= 0 leaves the corresponding axis unchanged. |
Return value — 1 on a valid handle; 0 on an invalid handle.
Remarks — Only Horizontal/Vertical have a verified effect; Options is a currently-inert parameter reserved for future use.
See also — pdfSetTextExtractionWordGap
C# (P/Invoke)
public static extern int pdfSetTextExtractionScaling(IntPtr IPDF, int Options, double Horizontal, double Vertical);
Setters
pdfSetTextExtractionScaling
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.