View as Markdown

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.

PdfTextMarkupAnnotation members (10)
NameSignatureDescription
idreadonly id: string;
kindreadonly kind: PdfTextMarkupKind;
pagereadonly page: number;

1-based page number.

rectsreadonly rects: readonly PdfRect[];

One rectangle per marked line, PDF user space.

colorreadonly color: string;

CSS hex color #rrggbb.

opacityoptionalreadonly opacity?: number | undefined;

0..1; default 1 (highlights render with a multiply blend).

authoroptionalreadonly author?: string | undefined;
commentoptionalreadonly comment?: string | undefined;
textoptionalreadonly text?: string | undefined;

The marked text, when known.

createdAtoptionalreadonly createdAt?: string | undefined;

ISO 8601 creation time.