API reference: @salmonui/pdf-viewer
PdfTextMarkupAnnotationinterface
import type { PdfTextMarkupAnnotation } from '@salmonui/pdf-viewer';interface PdfTextMarkupAnnotation {
readonly id: string;
readonly kind: PdfTextMarkupKind;
readonly page: number;
readonly rects: readonly PdfRect[];
readonly color: string;
readonly opacity?: number | undefined;
readonly author?: string | undefined;
readonly comment?: string | undefined;
readonly text?: string | undefined;
readonly createdAt?: string | undefined;
}
A text markup annotation. Coordinates are zoom independent.
| Name | Signature | Description |
|---|---|---|
id | readonly id: string; | |
kind | readonly kind: PdfTextMarkupKind; | |
page | readonly page: number; | 1-based page number. |
rects | readonly rects: readonly PdfRect[]; | One rectangle per marked line, PDF user space. |
color | readonly color: string; | CSS hex color |
opacityoptional | readonly opacity?: number | undefined; | 0..1; default 1 (highlights render with a multiply blend). |
authoroptional | readonly author?: string | undefined; | |
commentoptional | readonly comment?: string | undefined; | |
textoptional | readonly text?: string | undefined; | The marked text, when known. |
createdAtoptional | readonly createdAt?: string | undefined; | ISO 8601 creation time. |