Skip to main content

Insert Spaces Node (Document)

What it does

This node automatically inserts missing spaces between words in your document. You can customize its behavior through various settings.

Use it for

Use this node when words appear without spaces in a screen reader preview, such as in axesPDF or PAC. It helps improve text readability and accessibility by restoring proper word spacing.

How to use it

  1. Drag and drop the node from the Node Library into your template:
    Node Library > Folder Tagging
  2. Connect the node with other nodes in the Execution Flow of your template.
  3. Connect a node from the Data Flow that contains all the text shapes with missing spaces to the input port.
  4. Use the default settings in the Node Properties task pane. Then select the arrow next to the Preview in PDF Viewer button in the menu and choose a PDF Viewer that provides a screen reader preview, such as axesPDF.
  5. Open the screen reader preview in your PDF Viewer, such as the Preview panel in axesPDF to visually verify that spaces have been correctly inserted.
  6. If some spaces are still missing, return to the Node Properties in axesFlip and fine-tune the settings.
    You may need to experiment with different configurations to achieve the best results.

Node Input

Connect the node from the Data Flow that contains all the text shapes with missing spaces to the Input Shapes input port. 

It’s fine if the node also includes other types of shapes—not just text. For example, you can use the same node that you already use as input for the Add Logical Structure node.

Node Properties

Illustration: Definitions are explained on a letter example. Space width: a large horizontal gap between two characters. Height: The distance between the upper edge of a font and the lower edge. For example, the distance between the upper edge of a small f and the lower edge of a small g of a font. Base line displacement: when a character is moved up or down, so the characters don't stand on the same base line.

Node Name

You can assign a custom name to the node to help identify its purpose within your template.


Missing Space Width Percentage

If a font in the document does not include a space character, the node estimates the space width by multiplying the height of the font by this percentage.

Expected return type: double

Default:  0.25
The space width is set to 25% of the height of the font.


Space Truncation Percentage

Spaces may be visually compressed (e.g., when text is justified). This setting defines the minimum gap (as a percentage of the space character's width) that still qualifies as a space.

Expected return type: double

Default: 0.7
A gap must be at least 70% of the space character’s width to be recognized as a space.


Vertical Maximum Overflow Percentage

This setting applies only to characters with a baseline displacement (e.g., superscript or subscript). It determines how much one character can vertically overlap another before a space is inserted. The percentage is based on the height of the smaller character.

Expected return type: double

Default: 0.5
If a character overlaps more than 50% of its own height relative to the adjacent character, a space will be inserted.


Maximum Size Ratio

This defines the maximum allowed height ratio between two adjacent characters for them to still be considered connected.

Expected return type: double

Default: 2.0
If one character is more than twice as tall as the other, they are treated as separate, and a space is inserted.


Process Inside Text Shape

Specifies whether spaces should be inserted only between text shapes or also within them. Set this to true if your documents are missing spaces inside individual text shapes.

Expected return type: boolean

Default: false
Spaces are inserted only between text shapes.