Plots the block bounding boxes identified by Document AI (DAI) onto images of the submitted document. Generates an annotated .png file for each page in the original document.

draw_blocks(json, dir = getwd())

Arguments

json

filepath of a JSON file obtained using dai_async()

dir

path to the desired output directory

Value

no return value, called for side effects

Details

Not vectorized, but documents can be multi-page.

Examples

if (FALSE) { draw_blocks("pdf_output.json", dir = tempdir()) }