Skip to main content
The kdx document print and kdx document select commands help you understand and navigate the hierarchical structure of KDDB documents. Pretty print the document structure as an ASCII tree.

Flags

Basic Usage

Limit Depth

Control how deep into the tree to display:
Focus on a single page:

Show Features

Display node features like bounding boxes and tags:

Select Command

Query nodes by type using selector syntax.

Selector Syntax

Currently supports type-based selectors:

Examples

Output Columns

Output Formats

Both commands support the global -o flag:
JSON select output:

Common Node Types

Documents typically contain these node types:

Use Cases

Document Analysis

Understand document structure before processing:

Debugging Extraction

Investigate why extraction isn’t finding expected content:

Content Location

Find where specific content appears:

Structure Validation

Verify document structure is as expected:

Batch Analysis

Analyze structure across multiple documents:

Tips

Use --depth 2 or --depth 3 for a quick overview without overwhelming output on large documents.
Pipe JSON output to jq for powerful filtering and transformation of results.
Content shown in the tree view is truncated to 60 characters. Use select with JSON output for full content.

Query Commands

Search and retrieve with grep and lines

SDK: Content Nodes

Work with content nodes programmatically

SDK: Selectors

Advanced selector syntax

Document Overview

Back to document commands overview