Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
DynaPDF.SetSpaceWidthFactor
Sets space width factor.
Component |
Version |
macOS |
Windows |
Linux |
Server |
iOS SDK |
DynaPDF
|
12.1 |
✅ Yes |
✅ Yes |
✅ Yes |
✅ Yes |
✅ Yes |
MBS( "DynaPDF.SetSpaceWidthFactor"; PDF; Value )
More
MBS(
"DynaPDF.SetSpaceWidthFactor"; /* Sets space width factor. */
$PDF; /* The PDF reference returned from
DynaPDF.New. */
$Value) /* The new value to use.
Default is 0.7e.g. 0.75 */
Less
Parameters
Parameter |
Description |
Example |
PDF |
The PDF reference returned from DynaPDF.New. |
$pdf |
Value |
The new value to use.
Default is 0.7 |
0.75 |
Result
Returns OK or error.
Description
Sets space width factor.
Sets the space width factor that is used by DynaPDF.ExtractText to determine whether the distance between two text records or glyphs should be interpreted as space character.
PDF files do often not contain space characters. Depending on the font type, i.e. fixed pitch or proportional fonts, different default widths are used during text extraction. However, the full space width is mostly too large to find spaces. Therefore, the text extraction algorithm multiplies the default space width with the space width factor to find suitable values.
The default value is 0.7. Increase the value if too many spaces occur in extracted text and decrease the value if too few spaces were found.
The value must be large zero. Although the upper bound is not restricted, values larger than 2 are mostly not meaningful.
See also SetSpaceWidthFactor function in DynaPDF manual.
Examples
Set a slightly higher factor:
Set Variable [ $r; Value: MBS( "DynaPDF.SetSpaceWidthFactor"; $PDF; 0.75 ) ]
See also
Release notes
Blog Entries
This function checks for a license.
Created 15th February 2022, last changed 15th February 2022
DynaPDF.SetSeparationInfo
-
DynaPDF.SetStrokeColor