JSONOutProcessor

class burdoc.processors.json_out_processor.JSONOutProcessor(include_bboxes: bool, log_level: int = 20)

Converts generated elements and images into a JSON-compatible structure

Requires: [“elements”, “images”] Optional: [] Generators: [“content”]

__init__(include_bboxes: bool, log_level: int = 20)

Creates a JSONOutProcessor instance.

Parameters:
  • include_bboxes (bool) – Include Bboxes of elements

  • log_level (int, optional) – _description_. Defaults to logging.INFO.

add_generated_items_to_fig(page_number: int, fig: Figure, data: Dict[str, Any])

Draw any items generated by this processor to a page image

generates() List[str]

Return list of fields added by this processor

requirements() Tuple[List[str], List[str]]

Return list of required data fields and list of optional data fields