Skip to main content
Version: 0.94

operators.pdf.checkbox.CheckboxSpanMapper

class operators.pdf.checkbox.CheckboxSpanMapper(px_distance=100, left_checkboxes=True, right_checkboxes=False, top_checkboxes=False, bottom_checkboxes=False)

An operator that assign checkbox-related features to the spans in the document.

Parameters:
  • px_distance (int, default: 100) – The distance in pixels to map checkboxes to spans. Defaults to 100px.

  • left_checkboxes (bool, default: True) – Whether to assign checkboxes to the left of the span. Defaults to True.

  • right_checkboxes (bool, default: False) – Whether to assign checkboxes to the right of the span. Defaults to False.

  • top_checkboxes (bool, default: False) – Whether to assign checkboxes to the top of the span. Defaults to False.

  • bottom_checkboxes (bool, default: False) – Whether to assign checkboxes to the bottom of the span. Defaults to False.

Returns:

  • {is_left_checkbox_checked} – A boolean value indicating whether the span contains a checkbox. If no checkboxes are found, the value is null.

  • {is_right_checkbox_checked} – A boolean value indicating whether the span contains a checkbox. If no checkboxes are found, the value is null.

  • {is_top_checkbox_checked} – A boolean value indicating whether the span contains a checkbox. If no checkboxes are found, the value is null.

  • {is_bottom_checkbox_checked} – A boolean value indicating whether the span contains a checkbox. If no checkboxes are found, the value is null.