> For the complete documentation index, see [llms.txt](https://docs.unitlab.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unitlab.ai/documentation/annotations/document-and-pdf-annotation.md).

# Document & PDF Annotation

Unitlab keeps a multipage document as one reviewable item. Annotators can work with native selectable PDF content, visual regions, tables, figures, page-aware history, structured OCR outputs, and document-level ontology values for Document AI datasets.

{% hint style="info" %}
**Use this guide when:** you are building invoice, receipt, form, contract, report, technical-document, OCR, or document-understanding datasets.
{% endhint %}

## See document annotation in action

The demo shows native document annotation inside the current multipage Workbench.

{% embed url="<https://homepage-files.s3.us-east-2.amazonaws.com/hero-videos/hero/document-annotation-1.mp4>" %}

[Open the demo in a new tab](https://homepage-files.s3.us-east-2.amazonaws.com/hero-videos/hero/document-annotation-1.mp4).

## Before you begin

1. Create or select a project whose data and ontology match this modality.
2. Confirm the project instructions define the unit of annotation, boundary or timing policy, required properties, and review route.
3. Open the project and enter the assigned item from the project data view or queue. The Workbench loads the modality-native editor inside the shared Unitlab shell.

See [Annotation Workbench](/documentation/annotations/annotation-workbench.md) for navigation, saving, item state, comments, issues, and workflow actions.

## Understand the document work surface

The document Workbench combines a native PDF viewer, page controls, text selection, region geometry, ontology values, annotation history, comments, and workflow actions. Page navigation changes the view inside the same work item; it must not be confused with project-item navigation.

![Three native PDF pages with structured text, table, and figure annotations](/files/yKGnTKQPl4erg0XDR7XP)

*Pages remain part of one document while annotations preserve page identity and source context.*

## Supported annotation model

| Annotation type            | Use it for                                                                               |
| -------------------------- | ---------------------------------------------------------------------------------------- |
| **Native text span**       | Selectable source text such as a clause, title, field, or table value.                   |
| **Bounding box or region** | Visual content, scanned text, signatures, stamps, figures, or layout regions.            |
| **Table structure**        | Rows, columns, cells, headers, and relationships defined by the project ontology.        |
| **Classification**         | Document type, clause type, status, or another page- or item-level category.             |
| **Relation**               | A connection such as field-to-value, key-to-cell, clause-to-party, or figure-to-caption. |
| **Property**               | Structured information attached to one annotation.                                       |
| **Item Property**          | A value that describes the complete document.                                            |

Use native text selection when the PDF exposes reliable text. Use geometry when the signal is visual, scanned, or layout-dependent. Do not convert a selectable PDF into a flattened image workflow unless the project requires it.

## Selectable PDF text, images, and tables

Select native text directly and assign the ontology class when exact textual content is the target. For embedded images, tables, signatures, stamps, or non-selectable content, draw the required region geometry. Keep the visual position and textual value connected through class structure or relations rather than duplicating meaning in free text.

![Selected PDF text, embedded chart, and table cells](/files/ARZgLGZp28NXdhcfRyZH)

*Native selection and visual regions can coexist in the same document task.*

## Page-aware history and review

Use page controls to move within the document and annotation history to understand what changed. Reviewers should inspect both the active page and any related pages before approving document-level classifications or relations. Comments and issues should identify the relevant page and annotation so rework is unambiguous.

![Invoice page with text selection, review, approval, and history lanes](/files/vuDBYCh8tYSoTBCDobtb)

*Page identity stays explicit throughout annotation, review, and history.*

## Long documents and structured extraction

Navigate large PDFs without breaking them into unrelated tasks. Use the ontology to define fields, clauses, line items, properties, and relations. For OCR-oriented projects, distinguish source text, extracted value, visual region, and normalized value so downstream systems can reproduce how the label was derived.

## Annotate one production item

{% stepper %}
{% step %}

#### 1. Open the document item

Confirm the file, page count, project instruction, ontology, and current workflow stage. Use within-document page controls to reach the target page.
{% endstep %}

{% step %}

#### 2. Choose native text or region geometry

Select exact PDF text when available. Draw a box or other supported region when the target is visual, scanned, or layout-dependent.
{% endstep %}

{% step %}

#### 3. Assign the ontology class

Choose the field, clause, table, figure, or document class and complete required annotation properties.
{% endstep %}

{% step %}

#### 4. Connect document structure

Create relations between keys and values, clauses and parties, figures and captions, or other ontology-defined pairs. Add Item Properties for whole-document facts.
{% endstep %}

{% step %}

#### 5. Review across pages

Check repeated fields, cross-page references, table continuation, page boundaries, and document-level values. Use history and comments when a correction needs context.
{% endstep %}

{% step %}

#### 6. Save and route

Resolve validation, save the document state, then submit, approve, reject, or escalate using the active workflow action.
{% endstep %}
{% endstepper %}

## Quality review

| Review focus        | What to check                                                                            |
| ------------------- | ---------------------------------------------------------------------------------------- |
| **Page identity**   | Every region and text span must resolve to the correct source page.                      |
| **Text boundary**   | Preserve exact source characters and avoid accidental whitespace or punctuation changes. |
| **Layout geometry** | Boxes and regions should cover the intended visual object without unrelated content.     |
| **Structure**       | Check table, field-value, clause, and cross-page relations.                              |
| **Document values** | Validate Item Properties against the complete document, not one visible page.            |

{% hint style="warning" %}
A saved annotation is not automatically a production-ready annotation. Required values, boundary or timing policy, cross-item consistency, and the configured review stage still apply.
{% endhint %}

## Move from labels to governed data

Document outputs should preserve the original file identity, page number, native text or character offsets, region coordinates, table or relation structure, properties, and whole-document labels. Publish reviewed membership through a dataset version or release so downstream extraction experiments remain reproducible.

![Integrated Unitlab workflow connecting model assistance, annotation, review, and quality assurance](/files/yPoYNby78Kd9mxWTVqxy)

*Use workflows to keep model output, human correction, review, and approval in one traceable operating path.*

## Next steps

* Use [Detect Anything (SAM 1–SAM 3)](/documentation/auto-labeling/detect-anything-sam-1-sam-3.md) to calibrate interactive and batch assistance.
* Use [Multimodal overview](/documentation/multimodal-annotations/multimodal-overview.md) when related files or views must stay in one task.
* Curate difficult cases and review cohorts in [Data curation](/documentation/data/data-curation.md).
* Read the current [document annotation product overview](https://unitlab.ai/en/document-annotation) for the feature overview and current media.
