# Coverage matrix

Every tool, and exactly how much of it is reachable without the interface.

## Tools

| Tool | Writes | SDK API | Coverage | Shortfall |
| --- | --- | --- | --- | --- |
| `managePages` | document structure | `doc.pages` | Full | — |
| `security` | encryption settings | `doc.security` | Full | — |
| `search` | nothing (read) | `doc.text.search` | Full | — |
| `note` | note annotation | `doc.annotations` type `note` | Full | — |
| `freeText` | free-text annotation | `doc.annotations` type `freeText` | Partial | Listed, moved, resized, its words rewritten and deleted. Not recolored: its color is its words', set when written. `create()` cannot make one — type it in the viewer |
| `link` | link annotation | `doc.annotations` type `link` | Full | — |
| `highlight` | square annotation | `doc.annotations` type `square` | Partial | Placed from code as a filled `square`, which other readers' comment lists name a Rectangle rather than a Highlight |
| `textHighlight` | highlight annotation | `doc.annotations` type `highlight` | Partial | Placed from quads or a rectangle — rectangles from `doc.text.search()` work — but not by character range; no way to say "mark characters 10–25" |
| `stamp` | stamp annotation + image | `doc.annotations` type `stamp` | Partial | Listed, moved, resized and deleted. `create()` refuses one (`INVALID_ARGUMENT`): its picture is its appearance, which only the tool draws |
| `editText` | existing text objects | `viewer.tools.editText` | Partial | Text only — `setText(id, '')` deletes a block. No styling, move or resize. Requires a viewer |
| `erase` | removes page objects | `doc.annotations.delete` | Partial | Deletes annotations only. Cannot remove page objects, which is most of what the tool erases |
| `selectText` | underline / squiggly / strikeout annotation; black-out: a filled page object | `doc.annotations` types `underline`, `squiggly`, `strikeout` | Partial | The three marks are created from quads or a rectangle — not by character range — and listed by their own type; black-out has no API |
| `addText` | text page object | — | None | — |
| `draw` | ink annotation | `doc.annotations` type `ink` | Full | — |
| `line` | line annotation | `doc.annotations` type `line` | Full | — |
| `arrow` | line annotation | `doc.annotations` type `line` | Full | `lineEndings: { end: 'openArrow' }` |
| `rectangle` | square annotation | `doc.annotations` type `square` | Full | — |
| `ellipse` | circle annotation | `doc.annotations` type `circle` | Full | — |
| `polygon` | polygon annotation | `doc.annotations` type `polygon` | Full | — |
| `polyline` | polyline annotation | `doc.annotations` type `polyline` | Full | — |
| `check`, `cross`, `dot` | stamp annotation (a mark) | `doc.annotations` type `stamp` | Partial | The Marks menu's one-click tick, cross and dot; listed, moved, resized and deleted like any stamp. `create()` refuses a stamp |
| `sign` | image page object | — | None | — |
| `image` | image page object | — | None | — |
| `pan` | nothing (view) | — | n/a | View state, not document state |

**Legend** — **Full**: everything the on-screen tool does is callable. **Partial**: the API reaches some of it; the shortfall is stated. **None**: interface only; there is no supported programmatic path. Every tool is available in the viewer via `viewer.activateTool(name)`, where the mode offers it and `tools` has not turned it off (see [SDKMode](https://kernstra.com/docs/web-sdk/api/enums#s-sdkmode)); the SDK API column is what you can do _without_ the interface.

**What is left.** The SDK writes to a PDF three ways — document structure, annotations, and page objects — and the API covers the first two. Add Text, Sign, Image and the selection bar's Black out write page objects on purpose (they put something _in_ the document, as Acrobat does). What remains on the annotation side is stamps and text boxes; on the page-object side, `erase`'s page-object half.

## Document

| Capability | API | Coverage |
| --- | --- | --- |
| Page structure | `doc.pages` | Full |
| Annotations | `doc.annotations` | Partial — see the tools table |
| Comments | `doc.annotations.comments`, `get`, `reply`, `setStatus` | Full |
| Text read and search | `doc.text` | Full |
| Encryption and permissions | `doc.security` | Full |
| Save to bytes | `doc.save()` | Full |
| Metadata | `doc.metadata` | Read only |
| Outline and bookmarks | `doc.outline.get`, `add`, `delete`, `setTitle`, `set` | Full |
| Attachments | `doc.attachments.list`, `add`, `delete`, `data` | Full |
| Form fields | `doc.forms.fields`, `type`, `getValues`, `setValues` | Partial — read and set values; no reset to defaults, no field creation |
| Digital signatures | `doc.signatures.list` | Read only — no signing, no validation |
| Page boxes | `doc.pages.boxes` | Read only |

## Viewer

| Capability | API | Coverage |
| --- | --- | --- |
| Tool activation | `viewer.activateTool`, `deactivateTool`, `activeTool` | Full |
| Running tool handles | `viewer.tools` | Partial — only `editText` |
| Navigation and zoom | `viewer.goToPage`, `nextPage`, `prevPage`, `currentPageIndex`, `setScale`, `fitToWidth`, `fitToPage` | Full |
| Undo and redo | `viewer.undo`, `redo`, `canUndo`, `canRedo`, `snapshot` | Full |
| Form filling | `doc.forms.getValues`, `doc.forms.setValues`, `viewer.focusField` | Partial — every field type but signatures; a signature field is signed on screen (or through `callbacks.onSignatureRequest` when the user taps it) |
| Search UI | `viewer.search`, `viewer.clearSearch` | Full — drives the on-screen panel; use `doc.text.search` for data |
| Comments panel and sidebar | `viewer.showComment`, `commentPermissions`, `openPanel`, `activePanel` | Full |
| Export | `viewer.createExporter()` | Full |
| Page rotation | `doc.pages.rotate(pageIndex, by)` — a viewer on the document follows it | Full |
| Print | `viewer.print` | Full |
