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

NameTypeDefaultInfo
px_distanceint100The distance in pixels to map checkboxes to spans. Defaults to 100px.
left_checkboxesboolTrueWhether to assign checkboxes to the left of the span. Defaults to True.
right_checkboxesboolFalseWhether to assign checkboxes to the right of the span. Defaults to False.
top_checkboxesboolFalseWhether to assign checkboxes to the top of the span. Defaults to False.
bottom_checkboxesboolFalseWhether 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.