redraw_blocks: Inspect revised block bounding boxes

View source: R/process_output.R

redraw_blocksR Documentation

Inspect revised block bounding boxes

Description

Tool to visually check the order of block bounding boxes after manual processing (e.g. block reordering or splitting). Takes as its main input a token dataframe generated with build_token_df(), reassign_tokens(), or reassign_tokens2(). The function plots the block bounding boxes onto images of the submitted document. Generates an annotated .png file for each page in the original document.

Usage

redraw_blocks(json, token_df, dir = getwd())

Arguments

json

filepath of a JSON file obtained using dai_async()

token_df

a token data frame generated with build_token_df(), reassign_tokens(), or reassign_tokens2().

dir

path to the desired output directory.

Details

Not vectorized, but documents can be multi-page.

Value

no return value, called for side effects

Examples

## Not run: 
redraw_blocks("pdf_output.json", revised_token_df, dir = tempdir())

## End(Not run)

daiR documentation built on Sept. 8, 2023, 5:43 p.m.