Plots the token (i.e., word) 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_tokens(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_tokens("pdf_output.json", dir = tempdir()) }