Skip to main content

Overview

Use this script to visualize parsed chunks by drawing color-coded bounding boxes on your document. Each chunk type uses a distinct color, making it easy to see how the document was parsed. The script identifies chunk types and table cells. For PDFs, the script creates a separate annotated PNG for each page (page_1_annotated.png, page_2_annotated.png). For image files, the script creates a single page_annotated.png. The image below shows an example output with bounding boxes drawn on the first page of a PDF (Python library): Annotated PDF Page
These examples require the Python or TypeScript client library. Before running a script, set your API key and install the library and any required dependencies.

Scripts