Examples
Notes
Parameters
Note: For the full list of parameters available for this method, see Global parameters for methods. The following table shows parameters most relevant to or specific to this method.Examples
Paragraphs and lists
The following example extracts a list of four sworn statements from a W-9 form. ConfigJSON
Output
JSON
Images
The following example shows extracting two images’ coordinates. ConfigJSON
The following image shows the example document used with this example config:
Output
JSON
Offset Y parameter
Config The following example shows using an Offset Y parameter to extract content that precedes the anchor. This example also shows:- using the Document Range as an alternative to the Row method to extract multiline rows.
- using the Type Filter parameter to remove unwanted matched lines, in this example, the claims dates.
JSON
The following image shows the example document used with this example config:
Output
JSON
Notes
Extracting images
The Document Range supports extracting non-text images that you can then render. For example, extract photos of buildings embedded in an inspection report and save them to a backend. It doesn’t support extracting structured data from the images. Note: To extract structured data from an image, use the Query Group method with the Multimodal Engine parameter configured. For example, extract facts about the building, such as whether it’s multistory-story or single-story. To extract images, set"includeImages":true for the Document Range method. Sensible returns the image region coordinates rather than the actual encoded bytes of images. If you want to extract the images themselves, you can use a PDF library in your chosen programming language to follow these general steps:
- Render the page containing the image to a bitmap. Page numbers are zero-indexed in the Sensible output.
- Convert Sensible’s coordinates for the image region to pixel per inch (PPI) coordinates. Sensible’s region coordinates follow these conventions:
- they’re in reference to a 0.0 origin at the top left corner of the page (not the bottom left origin, as is for example the convention with the popular PDF.js library)
- they’re in inches (to convert inches to pixels, multiply the inches coordinates by your PPI setting. For example, an x-coordinate of 3.156 inches is ~227 pixels for a PPI setting of 72 (72 PPI * 3.156 inches)).
- they’re ordered clockwise from top left: (top left), (top right), (bottom right), (bottom left)
- Extract a partial bitmap defined by the PPI coordinates of the image from the rendered page.
- Encode the bitmap to bytes in the image format of your choice.

