# PDFViewer.toolBlockedReason()

```ts
toolBlockedReason(tool: ToolName): ToolBlockedReason | null
```

Why the open document forbids a tool — `{ reason, message }`: `reason` is `'permission'` (the document's permissions), `'certified'` (its certification) or `'downloading'` (it edits, and the document's bytes are still arriving), `message` the words in the viewer's language ("This document does not allow comments") — or `null` when it allows it. A tool it forbids is still offered, grayed out with the message. A host drawing its own chrome shows the same, and branches on `reason`.

- Kind: method
- Since: 1.0.0

| Parameter | Type | Description |
| --- | --- | --- |
| `tool` | `ToolName` | The tool to ask about. |

Returns `ToolBlockedReason | null`: `{ reason, message }`, or `null` when the document allows it (and on a destroyed viewer).

```ts
const blocked = viewer.toolBlockedReason('note');
noteButton.disabled = blocked !== null;
noteButton.title = blocked?.message ?? '';
```

Part of [PDFViewer](https://kernstra.com/docs/web-sdk/api/pdfviewer) in the Kernstra Web SDK 1.0.0 API reference.

Web page: https://kernstra.com/docs/web-sdk/api/pdfviewer/toolblockedreason
