# @birchui/pdf API reference

> Birch UI PDF: PDF viewer and annotation editor with forms, page tools and incremental save

```bash
npm install @birchui/pdf
```

## @birchui/pdf

### addDocumentTimestamp

Kind: function. Import from `@birchui/pdf`.

```ts
function addDocumentTimestamp(data: Uint8Array | ArrayBuffer, options: AddDocumentTimestampOptions): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options` | `AddDocumentTimestampOptions` |  |

### addValidationData

Kind: function. Import from `@birchui/pdf`.

```ts
function addValidationData(data: Uint8Array | ArrayBuffer, options: AddValidationDataOptions = {}): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `AddValidationDataOptions` |  |

### analyzeLayout

Kind: function. Import from `@birchui/pdf`.

```ts
function analyzeLayout(source: OfficeExportSource, options: OfficeExportOptions = {}): OfficeBlock[]
```

Reads the text of the pages as headings, paragraphs, list items and tables. Every line of the page text ends up in
exactly one block, in reading order, so the text of the blocks equals the page text apart from white space.

| Parameter | Type | Description |
| --- | --- | --- |
| `source` | `OfficeExportSource` |  |
| `options?` | `OfficeExportOptions` |  |

### angleBetween

Kind: function. Import from `@birchui/pdf`.

```ts
function angleBetween(a: PdfPoint, vertex: PdfPoint, b: PdfPoint): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `a` | `PdfPoint` |  |
| `vertex` | `PdfPoint` |  |
| `b` | `PdfPoint` |  |

### annotationBounds

Kind: function. Import from `@birchui/pdf`.

```ts
function annotationBounds(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>): PdfRect
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'rect' \| 'rotation'>` |  |

### annotationCorners

Kind: function. Import from `@birchui/pdf`.

```ts
function annotationCorners(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>): PdfPoint[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'rect' \| 'rotation'>` |  |

### annotationFlags

Kind: function. Import from `@birchui/pdf`.

```ts
function annotationFlags(annotation: Pick< PdfAnnotation, 'isHidden' | 'isLocked' | 'isReadOnly' | 'isContentsLocked' | 'isNoView' | 'isPrintable' >, extra = 0): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick< PdfAnnotation, 'isHidden' \| 'isLocked' \| 'isReadOnly' \| 'isContentsLocked' \| 'isNoView' \| 'isPrintable' >` |  |
| `extra?` | `unknown` |  |

### annotationInputFromPreset

Kind: function. Import from `@birchui/pdf`.

```ts
function annotationInputFromPreset(preset: AnnotationPreset, placement: Partial<Omit<AnnotationInput, 'type'>> & { pageIndex: number }): AnnotationInput
```

| Parameter | Type | Description |
| --- | --- | --- |
| `preset` | `AnnotationPreset` |  |
| `placement` | `Partial<Omit<AnnotationInput, 'type'>> & { pageIndex: number }` |  |

### annotationPermissions

Kind: function. Import from `@birchui/pdf`.

```ts
function annotationPermissions(annotation: PdfAnnotation, user: AnnotationUser | string, options: AnnotationPermissionOptions = {}): AnnotationPermissions
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `PdfAnnotation` |  |
| `user` | `AnnotationUser \| string` |  |
| `options?` | `AnnotationPermissionOptions` |  |

### annotationPresetsFromJson

Kind: function. Import from `@birchui/pdf`.

```ts
function annotationPresetsFromJson(value: unknown): AnnotationPreset[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `unknown` |  |

### annotationPresetsToJson

Kind: function. Import from `@birchui/pdf`.

```ts
function annotationPresetsToJson(presets: readonly AnnotationPreset[]): AnnotationPresetsJson
```

| Parameter | Type | Description |
| --- | --- | --- |
| `presets` | `readonly AnnotationPreset[]` |  |

### annotationRichDefaults

Kind: function. Import from `@birchui/pdf`.

```ts
function annotationRichDefaults(annotation: Pick<PdfAnnotation, 'fontSize' | 'fontColor' | 'color' | 'fontFamily' | 'textAlign'>): RichTextDefaults
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'fontSize' \| 'fontColor' \| 'color' \| 'fontFamily' \| 'textAlign'>` |  |

### annotationsFromJson

Kind: function. Import from `@birchui/pdf`.

```ts
function annotationsFromJson(value: unknown): AnnotationInput[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `unknown` |  |

### annotationsToFdf

Kind: function. Import from `@birchui/pdf`.

```ts
function annotationsToFdf(annotations: readonly PdfAnnotation[], options: AnnotationsFdfOptions = {}): Uint8Array
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotations` | `readonly PdfAnnotation[]` |  |
| `options?` | `AnnotationsFdfOptions` |  |

### annotationsToJson

Kind: function. Import from `@birchui/pdf`.

```ts
function annotationsToJson(annotations: readonly PdfAnnotation[]): AnnotationsJson
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotations` | `readonly PdfAnnotation[]` |  |

### annotationsToXfdf

Kind: function. Import from `@birchui/pdf`.

```ts
function annotationsToXfdf(annotations: readonly PdfAnnotation[], fields: readonly PdfFormField[] = [], fileName?: string): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotations` | `readonly PdfAnnotation[]` |  |
| `fields?` | `readonly PdfFormField[]` |  |
| `fileName?` | `string` |  |

### arcPoints

Kind: function. Import from `@birchui/pdf`.

```ts
function arcPoints(points: readonly PdfPoint[], segments = 48): PdfPoint[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `points` | `readonly PdfPoint[]` |  |
| `segments?` | `unknown` |  |

### arcThrough

Kind: function. Import from `@birchui/pdf`.

```ts
function arcThrough(start: PdfPoint, through: PdfPoint, end: PdfPoint): ArcGeometry | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `start` | `PdfPoint` |  |
| `through` | `PdfPoint` |  |
| `end` | `PdfPoint` |  |

### blocksText

Kind: function. Import from `@birchui/pdf`.

```ts
function blocksText(blocks: readonly OfficeBlock[]): string
```

The text of the blocks, one block per line; cells of a table row are separated by tabs.

| Parameter | Type | Description |
| --- | --- | --- |
| `blocks` | `readonly OfficeBlock[]` |  |

### blocksToDocx

Kind: function. Import from `@birchui/pdf`.

```ts
function blocksToDocx(blocks: readonly OfficeBlock[], options: { title?: string } = {}): PdfBytes
```

Writes the blocks as a Word document: heading styles, bulleted and numbered lists, and bordered tables.

| Parameter | Type | Description |
| --- | --- | --- |
| `blocks` | `readonly OfficeBlock[]` |  |
| `options?` | `{ title?: string }` |  |

### bookletOrder

Kind: function. Import from `@birchui/pdf`.

```ts
function bookletOrder(pageCount: number, isRightToLeft = false): number[][]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `pageCount` | `number` |  |
| `isRightToLeft?` | `unknown` |  |

### buildCompareReport

Kind: function. Import from `@birchui/pdf`.

```ts
function buildCompareReport(comparison: PdfComparison, options: CompareReportOptions = {}): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `comparison` | `PdfComparison` |  |
| `options?` | `CompareReportOptions` |  |

### buildSrgbProfile

Kind: function. Import from `@birchui/pdf`.

```ts
function buildSrgbProfile(): Uint8Array
```

### canonicalFontName

Kind: function. Import from `@birchui/pdf`.

```ts
function canonicalFontName(baseFont: string): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `baseFont` | `string` |  |

### certificateToDer

Kind: function. Import from `@birchui/pdf`.

```ts
function certificateToDer(input: Uint8Array | string): Uint8Array
```

| Parameter | Type | Description |
| --- | --- | --- |
| `input` | `Uint8Array \| string` |  |

### checkArchiveReadiness

Kind: function. Import from `@birchui/pdf`.

```ts
function checkArchiveReadiness(input: Uint8Array | ArrayBuffer | ArchiveSource): ArchiveReport
```

| Parameter | Type | Description |
| --- | --- | --- |
| `input` | `Uint8Array \| ArrayBuffer \| ArchiveSource` |  |

### checkChainConstraints

Kind: function. Import from `@birchui/pdf`.

```ts
function checkChainConstraints(chain: readonly ParsedCertificate[], at: Date): ChainProblem[]
```

Checks what a path builder must check beyond signatures, RFC 5280 section 6: every issuer is a CA that may sign
certificates and was valid at the given time, path-length limits hold, the names of the certificates below a CA
satisfy its name constraints, and the signer's key may be used for signing.

| Parameter | Type | Description |
| --- | --- | --- |
| `chain` | `readonly ParsedCertificate[]` |  |
| `at` | `Date` |  |

### checkFieldValue

Kind: function. Import from `@birchui/pdf`.

```ts
function checkFieldValue(field: ValidatedField, value: FormValue, resolve?: FieldValueResolver): FieldIssue | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `field` | `ValidatedField` |  |
| `value` | `FormValue` |  |
| `resolve?` | `FieldValueResolver` |  |

### circleThrough

Kind: function. Import from `@birchui/pdf`.

```ts
function circleThrough(a: PdfPoint, b: PdfPoint, c: PdfPoint): { center: PdfPoint; radius: number } | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `a` | `PdfPoint` |  |
| `b` | `PdfPoint` |  |
| `c` | `PdfPoint` |  |

### classifyScript

Kind: function. Import from `@birchui/pdf`.

```ts
function classifyScript(trigger: FieldScriptTrigger, source: string | undefined): FieldScriptInfo
```

| Parameter | Type | Description |
| --- | --- | --- |
| `trigger` | `FieldScriptTrigger` |  |
| `source` | `string \| undefined` |  |

### comparePageTexts

Kind: function. Import from `@birchui/pdf`.

```ts
function comparePageTexts(textsA: readonly ComparablePageText[], textsB: readonly ComparablePageText[], options: ComparePdfOptions = {}): PdfComparison
```

| Parameter | Type | Description |
| --- | --- | --- |
| `textsA` | `readonly ComparablePageText[]` |  |
| `textsB` | `readonly ComparablePageText[]` |  |
| `options?` | `ComparePdfOptions` |  |

### comparePdf

Kind: function. Import from `@birchui/pdf`.

```ts
function comparePdf(a: CompareInput, b: CompareInput, options: ComparePdfOptions = {}): PdfComparison
```

| Parameter | Type | Description |
| --- | --- | --- |
| `a` | `CompareInput` |  |
| `b` | `CompareInput` |  |
| `options?` | `ComparePdfOptions` |  |

### comparePdfAsync

Kind: function. Import from `@birchui/pdf`.

```ts
function comparePdfAsync(a: CompareInput, b: CompareInput, options: ComparePdfAsyncOptions = {}): Promise<PdfComparison>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `a` | `CompareInput` |  |
| `b` | `CompareInput` |  |
| `options?` | `ComparePdfAsyncOptions` |  |

### compareSyncClocks

Kind: function. Import from `@birchui/pdf`.

```ts
function compareSyncClocks(a: SyncClock, b: SyncClock): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `a` | `SyncClock` |  |
| `b` | `SyncClock` |  |

### comparisonAnnotations

Kind: function. Import from `@birchui/pdf`.

```ts
function comparisonAnnotations(changes: readonly PdfTextChange[], options: Pick<ComparePdfOptions, 'colors' | 'author'> = {}): { a: AnnotationInput[]; b: AnnotationInput[] }
```

| Parameter | Type | Description |
| --- | --- | --- |
| `changes` | `readonly PdfTextChange[]` |  |
| `options?` | `Pick<ComparePdfOptions, 'colors' \| 'author'>` |  |

### convertMailFile

Kind: function. Import from `@birchui/pdf`.

```ts
function convertMailFile(bytes: Uint8Array, hint: MailFileHint = {}, options: MailToPdfOptions = {}): Promise<MailConversion>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |
| `hint?` | `MailFileHint` |  |
| `options?` | `MailToPdfOptions` |  |

### convertToPdfA

Kind: function. Import from `@birchui/pdf`.

```ts
function convertToPdfA(data: Uint8Array | ArrayBuffer, options: PdfAConversionOptions = {}): Promise<PdfAConversionResult>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `PdfAConversionOptions` |  |

### createAnnotationSync

Kind: function. Import from `@birchui/pdf`.

```ts
function createAnnotationSync(host: AnnotationSyncHost, options: AnnotationSyncOptions): AnnotationSync
```

| Parameter | Type | Description |
| --- | --- | --- |
| `host` | `AnnotationSyncHost` |  |
| `options` | `AnnotationSyncOptions` |  |

### createFontRegistry

Kind: function. Import from `@birchui/pdf`.

```ts
function createFontRegistry(fonts: readonly PdfFontSource[] = []): FontRegistry
```

| Parameter | Type | Description |
| --- | --- | --- |
| `fonts?` | `readonly PdfFontSource[]` |  |

### createFormSync

Kind: function. Import from `@birchui/pdf`.

```ts
function createFormSync(host: FormSyncHost, options: FormSyncOptions): FormSync
```

| Parameter | Type | Description |
| --- | --- | --- |
| `host` | `FormSyncHost` |  |
| `options` | `FormSyncOptions` |  |

### createPageSync

Kind: function. Import from `@birchui/pdf`.

```ts
function createPageSync(host: PageSyncHost, options: PageSyncOptions): PageSync
```

| Parameter | Type | Description |
| --- | --- | --- |
| `host` | `PageSyncHost` |  |
| `options` | `PageSyncOptions` |  |

### createPdfViewer

Kind: function. Import from `@birchui/pdf`.

```ts
function createPdfViewer(container: HTMLElement, options: PdfViewerOptions = {}): PdfViewerApi
```

| Parameter | Type | Description |
| --- | --- | --- |
| `container` | `HTMLElement` |  |
| `options?` | `PdfViewerOptions` |  |

### createPresenceTracker

Kind: function. Import from `@birchui/pdf`.

```ts
function createPresenceTracker(options: { actorId?: string; timeout?: number; onChange?: (states: PresenceState[]) => void; now?: () => number; } = {}): PresenceTracker
```

| Parameter | Type | Description |
| --- | --- | --- |
| `options?` | `{ actorId?: string; timeout?: number; onChange?: (states: PresenceState[]) => void; now?: () => number; }` |  |

### createSyncChannel

Kind: function. Import from `@birchui/pdf`.

```ts
function createSyncChannel(transport: SyncTransport, options: SyncChannelOptions = {}): AnnotationSyncChannel
```

| Parameter | Type | Description |
| --- | --- | --- |
| `transport` | `SyncTransport` |  |
| `options?` | `SyncChannelOptions` |  |

### createZip

Kind: function. Import from `@birchui/pdf`.

```ts
function createZip(entries: readonly ZipEntry[]): PdfBytes
```

| Parameter | Type | Description |
| --- | --- | --- |
| `entries` | `readonly ZipEntry[]` |  |

### decodeImageFile

Kind: function. Import from `@birchui/pdf`.

```ts
function decodeImageFile(bytes: Uint8Array, options: PrepareImageOptions = {}): Promise<DecodedImage>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |
| `options?` | `PrepareImageOptions` |  |

### decodeJpeg

Kind: function. Import from `@birchui/pdf`.

```ts
function decodeJpeg(bytes: Uint8Array, options: JpegDecodeOptions = {}): JpegImage
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |
| `options?` | `JpegDecodeOptions` |  |

### decompressRtf

Kind: function. Import from `@birchui/pdf`.

```ts
function decompressRtf(data: Uint8Array, options: DecompressRtfOptions = {}): Uint8Array
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `options?` | `DecompressRtfOptions` |  |

### decryptPdf

Kind: function. Import from `@birchui/pdf`.

```ts
function decryptPdf(data: Uint8Array | ArrayBuffer, password?: string): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `password?` | `string` |  |

### derToPem

Kind: function. Import from `@birchui/pdf`.

```ts
function derToPem(der: Uint8Array, label: string): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `der` | `Uint8Array` |  |
| `label` | `string` |  |

### describeLinkAction

Kind: function. Import from `@birchui/pdf`.

```ts
function describeLinkAction(action: LinkAction | undefined): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `action` | `LinkAction \| undefined` |  |

### describeScripts

Kind: function. Import from `@birchui/pdf`.

```ts
function describeScripts(field: Pick<PdfFormField, 'format' | 'calculation' | 'range' | 'scripts'>): FieldScriptReport
```

| Parameter | Type | Description |
| --- | --- | --- |
| `field` | `Pick<PdfFormField, 'format' \| 'calculation' \| 'range' \| 'scripts'>` |  |

### detectFields

Kind: function. Import from `@birchui/pdf`.

```ts
function detectFields(shapes: readonly DetectionShape[], text: PageTextStructure, pageIndex: number, options: DetectFieldsOptions = {}): DetectedField[]
```

Proposes form fields for a flat page: a text field on every blank line and in every empty box, and a check box in
every small empty square, each named after the text beside or above it.

| Parameter | Type | Description |
| --- | --- | --- |
| `shapes` | `readonly DetectionShape[]` |  |
| `text` | `PageTextStructure` |  |
| `pageIndex` | `number` |  |
| `options?` | `DetectFieldsOptions` |  |

### detectImageFormat

Kind: function. Import from `@birchui/pdf`.

```ts
function detectImageFormat(bytes: Uint8Array): ImageFileFormat | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |

### detectMailFormat

Kind: function. Import from `@birchui/pdf`.

```ts
function detectMailFormat(bytes: Uint8Array, hint: MailFileHint = {}): MailFormat | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |
| `hint?` | `MailFileHint` |  |

### diffPixels

Kind: function. Import from `@birchui/pdf`.

```ts
function diffPixels(a: PixelBuffer, b: PixelBuffer, options: PixelDiffOptions = {}): PixelDiffResult
```

| Parameter | Type | Description |
| --- | --- | --- |
| `a` | `PixelBuffer` |  |
| `b` | `PixelBuffer` |  |
| `options?` | `PixelDiffOptions` |  |

### embedMissingFonts

Kind: function. Import from `@birchui/pdf`.

```ts
function embedMissingFonts(editor: PdfEditor, fonts: Readonly<Record<string, Uint8Array>> = {}): PdfAFontReplacement[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `editor` | `PdfEditor` |  |
| `fonts?` | `Readonly<Record<string, Uint8Array>>` |  |

### encryptPdf

Kind: function. Import from `@birchui/pdf`.

```ts
function encryptPdf(data: Uint8Array | ArrayBuffer, options: EncryptOptions & { password?: string }): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options` | `EncryptOptions & { password?: string }` |  |

### fieldKind

Kind: function. Import from `@birchui/pdf`.

```ts
function fieldKind(field: Pick<PdfFormField, 'type' | 'barcode'>): PdfFieldType
```

| Parameter | Type | Description |
| --- | --- | --- |
| `field` | `Pick<PdfFormField, 'type' \| 'barcode'>` |  |

### filterFieldKeystroke

Kind: function. Import from `@birchui/pdf`.

```ts
function filterFieldKeystroke(field: KeystrokeField, currentValue: string, change: string, selStart: number, selEnd: number = selStart): KeystrokeResult
```

| Parameter | Type | Description |
| --- | --- | --- |
| `field` | `KeystrokeField` |  |
| `currentValue` | `string` |  |
| `change` | `string` |  |
| `selStart` | `number` |  |
| `selEnd?` | `number` |  |

### formatBatesNumber

Kind: function. Import from `@birchui/pdf`.

```ts
function formatBatesNumber(index: number, options: BatesOptions = {}): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `index` | `number` |  |
| `options?` | `BatesOptions` |  |

### formatFieldValue

Kind: function. Import from `@birchui/pdf`.

```ts
function formatFieldValue(field: Pick<PdfFormField, 'format' | 'value'> & { scripts?: FieldScripts }, value: FormValue = field.value): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `field` | `Pick<PdfFormField, 'format' \| 'value'> & { scripts?: FieldScripts }` |  |
| `value?` | `FormValue` |  |

### formatFormMessage

Kind: function. Import from `@birchui/pdf`.

```ts
function formatFormMessage(key: FormMessageKey, params: FormMessageParams = {}, messages: Partial<Record<FormMessageKey, string>> = {}): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `key` | `FormMessageKey` |  |
| `params?` | `FormMessageParams` |  |
| `messages?` | `Partial<Record<FormMessageKey, string>>` |  |

### formatMeasurement

Kind: function. Import from `@birchui/pdf`.

```ts
function formatMeasurement(annotation: Measurable): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Measurable` |  |

### formSyncHost

Kind: function. Import from `@birchui/pdf`.

```ts
function formSyncHost(document: SyncableDocument): FormSyncHost
```

| Parameter | Type | Description |
| --- | --- | --- |
| `document` | `SyncableDocument` |  |

### fromSyncJson

Kind: function. Import from `@birchui/pdf`.

```ts
function fromSyncJson(value: SyncJson): unknown
```

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `SyncJson` |  |

### getDefaultPdfLimits

Kind: function. Import from `@birchui/pdf`.

```ts
function getDefaultPdfLimits(): PdfLimits
```

### hitTestAnnotation

Kind: function. Import from `@birchui/pdf`.

```ts
function hitTestAnnotation(annotation: PdfAnnotation, point: PdfPoint, tolerance = 4): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `PdfAnnotation` |  |
| `point` | `PdfPoint` |  |
| `tolerance?` | `unknown` |  |

### hitTestRotated

Kind: function. Import from `@birchui/pdf`.

```ts
function hitTestRotated(annotation: PdfAnnotation, p: PdfPoint, tolerance = 4): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `PdfAnnotation` |  |
| `p` | `PdfPoint` |  |
| `tolerance?` | `unknown` |  |

### imageMimeType

Kind: function. Import from `@birchui/pdf`.

```ts
function imageMimeType(format: ImageFileFormat): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `format` | `ImageFileFormat` |  |

### imagesToPdf

Kind: function. Import from `@birchui/pdf`.

```ts
function imagesToPdf(images: readonly (Uint8Array | ImagePageInput)[], options: ImagesToPdfOptions = {}): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `images` | `readonly (Uint8Array \| ImagePageInput)[]` |  |
| `options?` | `ImagesToPdfOptions` |  |

### importPkcs12PrivateKey

Kind: function. Import from `@birchui/pdf`.

```ts
function importPkcs12PrivateKey(contents: Pkcs12Contents, hash: 'SHA-256' | 'SHA-384' | 'SHA-512' = 'SHA-256'): Promise<CryptoKey>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `contents` | `Pkcs12Contents` |  |
| `hash?` | `'SHA-256' \| 'SHA-384' \| 'SHA-512'` |  |

### imposePdf

Kind: function. Import from `@birchui/pdf`.

```ts
function imposePdf(data: Uint8Array | ArrayBuffer, options: ImposeOptions): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options` | `ImposeOptions` |  |

### isAnnotationOwner

Kind: function. Import from `@birchui/pdf`.

```ts
function isAnnotationOwner(annotation: Pick<PdfAnnotation, 'author' | 'customData'>, user: AnnotationUser | string): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'author' \| 'customData'>` |  |
| `user` | `AnnotationUser \| string` |  |

### isMediaType

Kind: function. Import from `@birchui/pdf`.

```ts
function isMediaType(type: AnnotationType): type is MediaAnnotationType
```

| Parameter | Type | Description |
| --- | --- | --- |
| `type` | `AnnotationType` |  |

### isReadOnlyType

Kind: function. Import from `@birchui/pdf`.

```ts
function isReadOnlyType(type: AnnotationType): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `type` | `AnnotationType` |  |

### isSafeLinkUri

Kind: function. Import from `@birchui/pdf`.

```ts
function isSafeLinkUri(uri: string | undefined | null): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `uri` | `string \| undefined \| null` |  |

### isTrustListExpired

Kind: function. Import from `@birchui/pdf`.

```ts
function isTrustListExpired(list: PdfTrustList, now: Date = new Date()): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `list` | `PdfTrustList` |  |
| `now?` | `Date` |  |

### isUniformRichText

Kind: function. Import from `@birchui/pdf`.

```ts
function isUniformRichText(paragraphs: readonly RichTextParagraph[]): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `paragraphs` | `readonly RichTextParagraph[]` |  |

### layoutRichText

Kind: function. Import from `@birchui/pdf`.

```ts
function layoutRichText(paragraphs: readonly RichTextParagraph[], maxWidth: number, defaults: RichTextDefaults = RICH_TEXT_DEFAULTS, registry?: FontRegistry): RichTextLine[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `paragraphs` | `readonly RichTextParagraph[]` |  |
| `maxWidth` | `number` |  |
| `defaults?` | `RichTextDefaults` |  |
| `registry?` | `FontRegistry` |  |

### leaveMessage

Kind: function. Import from `@birchui/pdf`.

```ts
function leaveMessage(actorId: string, sentAt: number = Date.now()): PresenceMessage
```

| Parameter | Type | Description |
| --- | --- | --- |
| `actorId` | `string` |  |
| `sentAt?` | `number` |  |

### linearizePdf

Kind: function. Import from `@birchui/pdf`.

```ts
function linearizePdf(data: Uint8Array | ArrayBuffer, options: LinearizeOptions = {}): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `LinearizeOptions` |  |

### linkUriScheme

Kind: function. Import from `@birchui/pdf`.

```ts
function linkUriScheme(uri: string): string | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `uri` | `string` |  |

### loadPdfDocument

Kind: function. Import from `@birchui/pdf`.

```ts
function loadPdfDocument(data: Uint8Array | ArrayBuffer, options: OpenPdfOptions = {}): Promise<PdfDocument>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `OpenPdfOptions` |  |

### loadTrustList

Kind: function. Import from `@birchui/pdf`.

```ts
function loadTrustList(input: PdfTrustListInput | string): PdfTrustList
```

Reads a trust list given as an object or as JSON text. Certificates that cannot be parsed are counted, not kept.

| Parameter | Type | Description |
| --- | --- | --- |
| `input` | `PdfTrustListInput \| string` |  |

### mailToPdf

Kind: function. Import from `@birchui/pdf`.

```ts
function mailToPdf(message: MailMessage, options: MailToPdfOptions = {}): Promise<MailPdfResult>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `message` | `MailMessage` |  |
| `options?` | `MailToPdfOptions` |  |

### measureDetails

Kind: function. Import from `@birchui/pdf`.

```ts
function measureDetails(annotation: Measurable): MeasureDetails
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Measurable` |  |

### measureValue

Kind: function. Import from `@birchui/pdf`.

```ts
function measureValue(annotation: Measurable): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Measurable` |  |

### mergeLineRects

Kind: function. Import from `@birchui/pdf`.

```ts
function mergeLineRects(rects: readonly PdfRect[], gap = 3): PdfRect[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rects` | `readonly PdfRect[]` |  |
| `gap?` | `unknown` |  |

### mergePdfs

Kind: function. Import from `@birchui/pdf`.

```ts
function mergePdfs(inputs: readonly MergeFileInput[], options: MergePdfsOptions = {}): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `inputs` | `readonly MergeFileInput[]` |  |
| `options?` | `MergePdfsOptions` |  |

### mimeTypeForFileName

Kind: function. Import from `@birchui/pdf`.

```ts
function mimeTypeForFileName(fileName: string): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `fileName` | `string` |  |

### normalizeDegrees

Kind: function. Import from `@birchui/pdf`.

```ts
function normalizeDegrees(degrees: number): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `degrees` | `number` |  |

### normalizeRichText

Kind: function. Import from `@birchui/pdf`.

```ts
function normalizeRichText(paragraphs: readonly RichTextParagraph[]): RichTextParagraph[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `paragraphs` | `readonly RichTextParagraph[]` |  |

### openPdfDocument

Kind: function. Import from `@birchui/pdf`.

```ts
function openPdfDocument(data: Uint8Array | ArrayBuffer, options: OpenPdfOptions = {}): PdfDocument
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `OpenPdfOptions` |  |

### optimizePdf

Kind: function. Import from `@birchui/pdf`.

```ts
function optimizePdf(data: Uint8Array | ArrayBuffer, options: OptimizeOptions = {}): Promise<OptimizeResult>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `OptimizeOptions` |  |

### originalPageId

Kind: function. Import from `@birchui/pdf`.

```ts
function originalPageId(sourceIndex: number): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `sourceIndex` | `number` |  |

### pageSyncHost

Kind: function. Import from `@birchui/pdf`.

```ts
function pageSyncHost(document: SyncableDocument): PageSyncHost
```

| Parameter | Type | Description |
| --- | --- | --- |
| `document` | `SyncableDocument` |  |

### parseAnnotationsFdf

Kind: function. Import from `@birchui/pdf`.

```ts
function parseAnnotationsFdf(data: Uint8Array | ArrayBuffer, fallbackAuthor = 'Unknown'): AnnotationsFdfImport
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `fallbackAuthor?` | `unknown` |  |

### parseCalculateScript

Kind: function. Import from `@birchui/pdf`.

```ts
function parseCalculateScript(script: string | undefined): FieldCalculation | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `script` | `string \| undefined` |  |

### parseEml

Kind: function. Import from `@birchui/pdf`.

```ts
function parseEml(bytes: Uint8Array | ArrayBuffer): MailMessage
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array \| ArrayBuffer` |  |

### parseFormatScript

Kind: function. Import from `@birchui/pdf`.

```ts
function parseFormatScript(script: string | undefined): FieldFormat | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `script` | `string \| undefined` |  |

### parseMail

Kind: function. Import from `@birchui/pdf`.

```ts
function parseMail(bytes: Uint8Array, hint: MailFileHint = {}): MailMessage
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |
| `hint?` | `MailFileHint` |  |

### parseMsg

Kind: function. Import from `@birchui/pdf`.

```ts
function parseMsg(bytes: Uint8Array | ArrayBuffer): MailMessage
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array \| ArrayBuffer` |  |

### parsePageRanges

Kind: function. Import from `@birchui/pdf`.

```ts
function parsePageRanges(text: string, pageCount: number): [number, number][]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `pageCount` | `number` |  |

### parsePkcs12

Kind: function. Import from `@birchui/pdf`.

```ts
function parsePkcs12(data: Uint8Array | ArrayBuffer, password = ''): Promise<Pkcs12Contents>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `password?` | `unknown` |  |

### parseRichText

Kind: function. Import from `@birchui/pdf`.

```ts
function parseRichText(xhtml: string, defaults: Partial<RichTextDefaults> = {}): RichTextParagraph[] | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `xhtml` | `string` |  |
| `defaults?` | `Partial<RichTextDefaults>` |  |

### parseValidateScript

Kind: function. Import from `@birchui/pdf`.

```ts
function parseValidateScript(script: string | undefined): FieldRange | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `script` | `string \| undefined` |  |

### parseXfdf

Kind: function. Import from `@birchui/pdf`.

```ts
function parseXfdf(xml: string): XfdfImport
```

| Parameter | Type | Description |
| --- | --- | --- |
| `xml` | `string` |  |

### pemBlocks

Kind: function. Import from `@birchui/pdf`.

```ts
function pemBlocks(pem: string, label: string): Uint8Array[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `pem` | `string` |  |
| `label` | `string` |  |

### pemToDer

Kind: function. Import from `@birchui/pdf`.

```ts
function pemToDer(pem: string, label?: string): Uint8Array
```

| Parameter | Type | Description |
| --- | --- | --- |
| `pem` | `string` |  |
| `label?` | `string` |  |

### permissionsFromFlags

Kind: function. Import from `@birchui/pdf`.

```ts
function permissionsFromFlags(flags: number): PdfPermissions
```

| Parameter | Type | Description |
| --- | --- | --- |
| `flags` | `number` |  |

### permissionsToFlags

Kind: function. Import from `@birchui/pdf`.

```ts
function permissionsToFlags(permissions: Partial<PdfPermissions> = {}): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `permissions?` | `Partial<PdfPermissions>` |  |

### plainToRichText

Kind: function. Import from `@birchui/pdf`.

```ts
function plainToRichText(text: string, style: Omit<RichTextRun, 'text'> = {}): RichTextParagraph[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `style?` | `Omit<RichTextRun, 'text'>` |  |

### polygonArea

Kind: function. Import from `@birchui/pdf`.

```ts
function polygonArea(points: readonly PdfPoint[]): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `points` | `readonly PdfPoint[]` |  |

### polylineLength

Kind: function. Import from `@birchui/pdf`.

```ts
function polylineLength(points: readonly PdfPoint[], isClosed = false): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `points` | `readonly PdfPoint[]` |  |
| `isClosed?` | `unknown` |  |

### positionBetween

Kind: function. Import from `@birchui/pdf`.

```ts
function positionBetween(before: string | undefined, after: string | undefined, actor = ''): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `before` | `string \| undefined` |  |
| `after` | `string \| undefined` |  |
| `actor?` | `unknown` |  |

### prepareImage

Kind: function. Import from `@birchui/pdf`.

```ts
function prepareImage(bytes: Uint8Array, options: PrepareImageOptions = {}): Promise<AnnotationImage>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |
| `options?` | `PrepareImageOptions` |  |

### presenceMessage

Kind: function. Import from `@birchui/pdf`.

```ts
function presenceMessage(state: PresenceState, sentAt: number = Date.now()): PresenceMessage
```

| Parameter | Type | Description |
| --- | --- | --- |
| `state` | `PresenceState` |  |
| `sentAt?` | `number` |  |

### presetFromAnnotation

Kind: function. Import from `@birchui/pdf`.

```ts
function presetFromAnnotation(annotation: PdfAnnotation, identity: { id: string; name: string }, options: { keepText?: boolean; keepSize?: boolean } = {}): AnnotationPreset
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `PdfAnnotation` |  |
| `identity` | `{ id: string; name: string }` |  |
| `options?` | `{ keepText?: boolean; keepSize?: boolean }` |  |

### presetStyle

Kind: function. Import from `@birchui/pdf`.

```ts
function presetStyle(preset: AnnotationPreset): AnnotationPresetStyle
```

| Parameter | Type | Description |
| --- | --- | --- |
| `preset` | `AnnotationPreset` |  |

### quadPointsFromQuads

Kind: function. Import from `@birchui/pdf`.

```ts
function quadPointsFromQuads(quads: readonly PdfQuad[]): number[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `quads` | `readonly PdfQuad[]` |  |

### quadPointsFromRects

Kind: function. Import from `@birchui/pdf`.

```ts
function quadPointsFromRects(rects: readonly PdfRect[]): number[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rects` | `readonly PdfRect[]` |  |

### quadsFromQuadPoints

Kind: function. Import from `@birchui/pdf`.

```ts
function quadsFromQuadPoints(quadPoints: readonly number[]): [PdfPoint, PdfPoint, PdfPoint, PdfPoint][]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `quadPoints` | `readonly number[]` |  |

### readImageInfo

Kind: function. Import from `@birchui/pdf`.

```ts
function readImageInfo(bytes: Uint8Array): AnnotationImage
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |

### rectsFromQuadPoints

Kind: function. Import from `@birchui/pdf`.

```ts
function rectsFromQuadPoints(quadPoints: readonly number[]): PdfRect[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `quadPoints` | `readonly number[]` |  |

### resizeRotated

Kind: function. Import from `@birchui/pdf`.

```ts
function resizeRotated(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>, handle: 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw', pointer: PdfPoint, minSize = 4): PdfRect
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'rect' \| 'rotation'>` |  |
| `handle` | `'n' \| 's' \| 'e' \| 'w' \| 'ne' \| 'nw' \| 'se' \| 'sw'` |  |
| `pointer` | `PdfPoint` |  |
| `minSize?` | `unknown` |  |

### resolveShortcuts

Kind: function. Import from `@birchui/pdf`.

```ts
function resolveShortcuts(overrides: ShortcutOverrides | undefined, warn: (message: string) => void = () => undefined): readonly Shortcut[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `overrides` | `ShortcutOverrides \| undefined` |  |
| `warn?` | `(message: string) => void` |  |

### richTextDefaultStyle

Kind: function. Import from `@birchui/pdf`.

```ts
function richTextDefaultStyle(defaults: RichTextDefaults = RICH_TEXT_DEFAULTS): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `defaults?` | `RichTextDefaults` |  |

### richTextToPlain

Kind: function. Import from `@birchui/pdf`.

```ts
function richTextToPlain(paragraphs: readonly RichTextParagraph[]): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `paragraphs` | `readonly RichTextParagraph[]` |  |

### richTextToXhtml

Kind: function. Import from `@birchui/pdf`.

```ts
function richTextToXhtml(paragraphs: readonly RichTextParagraph[], defaults: RichTextDefaults = RICH_TEXT_DEFAULTS): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `paragraphs` | `readonly RichTextParagraph[]` |  |
| `defaults?` | `RichTextDefaults` |  |

### rotateAnnotation

Kind: function. Import from `@birchui/pdf`.

```ts
function rotateAnnotation(annotation: PdfAnnotation, degrees: number): AnnotationPatch
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `PdfAnnotation` |  |
| `degrees` | `number` |  |

### rotatedBounds

Kind: function. Import from `@birchui/pdf`.

```ts
function rotatedBounds(rect: PdfRect, degrees: number): PdfRect
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rect` | `PdfRect` |  |
| `degrees` | `number` |  |

### rotatedCorners

Kind: function. Import from `@birchui/pdf`.

```ts
function rotatedCorners(rect: PdfRect, degrees: number): [PdfPoint, PdfPoint, PdfPoint, PdfPoint]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rect` | `PdfRect` |  |
| `degrees` | `number` |  |

### rotationFromPointer

Kind: function. Import from `@birchui/pdf`.

```ts
function rotationFromPointer(annotation: Pick<PdfAnnotation, 'rect'>, pointer: PdfPoint, snap = 0): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'rect'>` |  |
| `pointer` | `PdfPoint` |  |
| `snap?` | `unknown` |  |

### rotationHandlePoint

Kind: function. Import from `@birchui/pdf`.

```ts
function rotationHandlePoint(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>, offset = 20): PdfPoint
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'rect' \| 'rotation'>` |  |
| `offset?` | `unknown` |  |

### rtfToHtml

Kind: function. Import from `@birchui/pdf`.

```ts
function rtfToHtml(rtf: Uint8Array | string): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rtf` | `Uint8Array \| string` |  |

### rtfToText

Kind: function. Import from `@birchui/pdf`.

```ts
function rtfToText(rtf: Uint8Array | string): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rtf` | `Uint8Array \| string` |  |

### sanitizePdf

Kind: function. Import from `@birchui/pdf`.

```ts
function sanitizePdf(data: Uint8Array | ArrayBuffer, options: SanitizeOptions = {}): Promise<SanitizeResult>
```

Removes hidden information and rewrites the whole file, so nothing that was removed stays in it.
Content of hidden layers is taken out of page content, form XObjects and annotation appearances.

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `SanitizeOptions` |  |

### selectPages

Kind: function. Import from `@birchui/pdf`.

```ts
function selectPages(pageCount: number, selector: PageSelector): number[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `pageCount` | `number` |  |
| `selector` | `PageSelector` |  |

### setAnnotationRotation

Kind: function. Import from `@birchui/pdf`.

```ts
function setAnnotationRotation(annotation: PdfAnnotation, degrees: number): AnnotationPatch
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `PdfAnnotation` |  |
| `degrees` | `number` |  |

### setDefaultPdfLimits

Kind: function. Import from `@birchui/pdf`.

```ts
function setDefaultPdfLimits(limits?: Partial<PdfLimits>): PdfLimits
```

| Parameter | Type | Description |
| --- | --- | --- |
| `limits?` | `Partial<PdfLimits>` |  |

### shortcutFor

Kind: function. Import from `@birchui/pdf`.

```ts
function shortcutFor(event: KeyLike, isPresenting = false, shortcuts: readonly Shortcut[] = KEYBOARD_SHORTCUTS): ViewerCommand | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `event` | `KeyLike` |  |
| `isPresenting?` | `unknown` |  |
| `shortcuts?` | `readonly Shortcut[]` |  |

### signPdf

Kind: function. Import from `@birchui/pdf`.

```ts
function signPdf(data: Uint8Array | ArrayBuffer, input: SignPdfOptions): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `input` | `SignPdfOptions` |  |

### simplifyPath

Kind: function. Import from `@birchui/pdf`.

```ts
function simplifyPath(points: readonly PdfPoint[], tolerance = 0.6): PdfPoint[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `points` | `readonly PdfPoint[]` |  |
| `tolerance?` | `unknown` |  |

### smoothStroke

Kind: function. Import from `@birchui/pdf`.

```ts
function smoothStroke(points: readonly PdfPoint[]): PdfPoint[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `points` | `readonly PdfPoint[]` |  |

### splitPdf

Kind: function. Import from `@birchui/pdf`.

```ts
function splitPdf(data: Uint8Array | ArrayBuffer, options: SplitOptions, naming: SplitNaming = {}): Promise<SplitPart[]>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options` | `SplitOptions` |  |
| `naming?` | `SplitNaming` |  |

### tablesToXlsx

Kind: function. Import from `@birchui/pdf`.

```ts
function tablesToXlsx(tables: readonly (readonly string[][])[]): PdfBytes
```

Writes one worksheet per table. A cell that is a plain number becomes a number; everything else stays text.

| Parameter | Type | Description |
| --- | --- | --- |
| `tables` | `readonly (readonly string[][])[]` |  |

### toolbarPresetOptions

Kind: function. Import from `@birchui/pdf`.

```ts
function toolbarPresetOptions(preset: ToolbarPreset, allTools: readonly ViewerTool[]): Partial<PdfViewerOptions>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `preset` | `ToolbarPreset` |  |
| `allTools` | `readonly ViewerTool[]` |  |

### toPdfBytes

Kind: function. Import from `@birchui/pdf`.

```ts
function toPdfBytes(bytes: Uint8Array): PdfBytes
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |

### toRotatedPoint

Kind: function. Import from `@birchui/pdf`.

```ts
function toRotatedPoint(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>, p: PdfPoint): PdfPoint
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'rect' \| 'rotation'>` |  |
| `p` | `PdfPoint` |  |

### toSyncJson

Kind: function. Import from `@birchui/pdf`.

```ts
function toSyncJson(value: unknown): SyncJson
```

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `unknown` |  |

### toUnrotatedPoint

Kind: function. Import from `@birchui/pdf`.

```ts
function toUnrotatedPoint(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>, p: PdfPoint): PdfPoint
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'rect' \| 'rotation'>` |  |
| `p` | `PdfPoint` |  |

### unrotatedRectFromBounds

Kind: function. Import from `@birchui/pdf`.

```ts
function unrotatedRectFromBounds(bounds: PdfRect, degrees: number, aspect?: number): PdfRect | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bounds` | `PdfRect` |  |
| `degrees` | `number` |  |
| `aspect?` | `number` |  |

### uprightPlacement

Kind: function. Import from `@birchui/pdf`.

```ts
function uprightPlacement(rect: PdfRect, pageRotation: number): { rect: PdfRect; rotation: number | undefined }
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rect` | `PdfRect` |  |
| `pageRotation` | `number` |  |

### uprightRotation

Kind: function. Import from `@birchui/pdf`.

```ts
function uprightRotation(pageRotation: number): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `pageRotation` | `number` |  |

### validateFieldValue

Kind: function. Import from `@birchui/pdf`.

```ts
function validateFieldValue(field: ValidatedField, value: FormValue, resolve?: FieldValueResolver): string | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `field` | `ValidatedField` |  |
| `value` | `FormValue` |  |
| `resolve?` | `FieldValueResolver` |  |

### validatePdfA

Kind: function. Import from `@birchui/pdf`.

```ts
function validatePdfA(input: Uint8Array | ArrayBuffer | PdfFile): PdfAValidation
```

| Parameter | Type | Description |
| --- | --- | --- |
| `input` | `Uint8Array \| ArrayBuffer \| PdfFile` |  |

### verifyPdfSignatures

Kind: function. Import from `@birchui/pdf`.

```ts
function verifyPdfSignatures(data: Uint8Array | ArrayBuffer, options: VerifySignaturesOptions = {}): Promise<PdfSignatureVerification[]>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `VerifySignaturesOptions` |  |

### viewportTransform

Kind: function. Import from `@birchui/pdf`.

```ts
function viewportTransform(box: PdfRect, rotation: number, scale: number): Matrix
```

| Parameter | Type | Description |
| --- | --- | --- |
| `box` | `PdfRect` |  |
| `rotation` | `number` |  |
| `scale` | `number` |  |

### zipSplitParts

Kind: function. Import from `@birchui/pdf`.

```ts
function zipSplitParts(parts: readonly SplitPart[]): PdfBytes
```

| Parameter | Type | Description |
| --- | --- | --- |
| `parts` | `readonly SplitPart[]` |  |

### FontFormatError

Kind: class. Import from `@birchui/pdf`.

```ts
class FontFormatError extends Error
new FontFormatError(message: string)
```

### ImageDecoderRequiredError

Kind: class. Import from `@birchui/pdf`.

```ts
class ImageDecoderRequiredError extends ImageFormatError
new ImageDecoderRequiredError(readonly mimeType: string)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly mimeType` | `string` |  |

### ImageFormatError

Kind: class. Import from `@birchui/pdf`.

```ts
class ImageFormatError extends Error
new ImageFormatError(message: string)
```

### InflateError

Kind: class. Import from `@birchui/pdf`.

```ts
class InflateError extends Error
new InflateError(message: string)
```

### JpegError

Kind: class. Import from `@birchui/pdf`.

```ts
class JpegError extends Error
new JpegError(message: string)
```

### MailFormatError

Kind: class. Import from `@birchui/pdf`.

```ts
class MailFormatError extends Error
new MailFormatError(message: string)
```

### PdfCryptoUnavailableError

Kind: class. Import from `@birchui/pdf`.

```ts
class PdfCryptoUnavailableError extends Error
new PdfCryptoUnavailableError()
```

### PdfInputError

Kind: class. Import from `@birchui/pdf`.

```ts
class PdfInputError extends TypeError
new PdfInputError(readonly path: string, message: string)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly path` | `string` |  |

### PdfLimitError

Kind: class. Import from `@birchui/pdf`.

```ts
class PdfLimitError extends Error
new PdfLimitError(readonly limit: PdfLimitName, readonly allowed: number, message: string)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly limit` | `PdfLimitName` |  |
| `readonly allowed` | `number` |  |

### PdfMissingGlyphError

Kind: class. Import from `@birchui/pdf`.

```ts
class PdfMissingGlyphError extends Error
new PdfMissingGlyphError(report: MissingGlyphReport)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly characters` | `string` |  |
| `readonly scripts` | `TextScript[]` |  |

### PdfPasswordError

Kind: class. Import from `@birchui/pdf`.

```ts
class PdfPasswordError extends Error
new PdfPasswordError(readonly reason: 'password-required' | 'password-incorrect' | 'unsupported')
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly reason` | `'password-required' \| 'password-incorrect' \| 'unsupported'` |  |

### PdfPermissionError

Kind: class. Import from `@birchui/pdf`.

```ts
class PdfPermissionError extends Error
new PdfPermissionError(readonly permission: PdfPermissionName)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly permission` | `PdfPermissionName` |  |

### PdfSyntaxError

Kind: class. Import from `@birchui/pdf`.

```ts
class PdfSyntaxError extends Error
new PdfSyntaxError(message: string, readonly offset: number)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly offset` | `number` |  |

### PdfWriteError

Kind: class. Import from `@birchui/pdf`.

```ts
class PdfWriteError extends Error
new PdfWriteError(message: string)
```

### Pkcs12Error

Kind: class. Import from `@birchui/pdf`.

```ts
class Pkcs12Error extends Error
new Pkcs12Error(readonly reason: Pkcs12ErrorReason, message: string)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly reason` | `Pkcs12ErrorReason` |  |

### UnsupportedFilterError

Kind: class. Import from `@birchui/pdf`.

```ts
class UnsupportedFilterError extends Error
new UnsupportedFilterError(readonly filter: string)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly filter` | `string` |  |

### ATTACHMENT_RELATIONSHIPS

Kind: const. Import from `@birchui/pdf`.

```ts
const ATTACHMENT_RELATIONSHIPS: readonly AttachmentRelationship[]
```

### DEFAULT_LABELS

Kind: const. Import from `@birchui/pdf`.

```ts
const DEFAULT_LABELS: Record<LabelKey, string> & { tools: Record<ViewerTool, string> }
```

### DEFAULT_STYLES

Kind: const. Import from `@birchui/pdf`.

```ts
const DEFAULT_STYLES: Record<AnnotationType, AnnotationDefaults>
```

### FILE_ATTACHMENT_ICONS

Kind: const. Import from `@birchui/pdf`.

```ts
const FILE_ATTACHMENT_ICONS: readonly FileAttachmentIcon[]
```

### FORM_MESSAGES

Kind: const. Import from `@birchui/pdf`.

```ts
const FORM_MESSAGES: Record<FormMessageKey, string>
```

### KEYBOARD_SHORTCUTS

Kind: const. Import from `@birchui/pdf`.

```ts
const KEYBOARD_SHORTCUTS: readonly Shortcut[]
```

### PDF_VIEWER_EVENT_NAMES

Kind: const. Import from `@birchui/pdf`.

```ts
const PDF_VIEWER_EVENT_NAMES: readonly (keyof PdfViewerEvents)[]
```

### pdfLocaleDe

Kind: const. Import from `@birchui/pdf`.

```ts
const pdfLocaleDe: PdfViewerLabels
```

### pdfLocaleEn

Kind: const. Import from `@birchui/pdf`.

```ts
const pdfLocaleEn: PdfViewerLabels
```

### pdfLocaleEs

Kind: const. Import from `@birchui/pdf`.

```ts
const pdfLocaleEs: PdfViewerLabels
```

### pdfLocaleFr

Kind: const. Import from `@birchui/pdf`.

```ts
const pdfLocaleFr: PdfViewerLabels
```

### pdfLocaleJa

Kind: const. Import from `@birchui/pdf`.

```ts
const pdfLocaleJa: PdfViewerLabels
```

### pdfLocalePt

Kind: const. Import from `@birchui/pdf`.

```ts
const pdfLocalePt: PdfViewerLabels
```

### pdfLocaleZh

Kind: const. Import from `@birchui/pdf`.

```ts
const pdfLocaleZh: PdfViewerLabels
```

### pdfStyles

Kind: const. Import from `@birchui/pdf`.

```ts
const pdfStyles: "\n.lq-pdf {\n --lq-pdf-font-family: var(--lq-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif);\n --lq-pdf-font-size: var(--lq-font-size, 13px);\n --lq-pdf-fg: var(--lq-fg, #1f2328);\n --lq-pdf-bg: var(--lq-bg, #ffffff);\n --lq-pdf-muted: var(--lq-muted-fg, #59636e);\n --lq-pdf-border: var(--lq-border, #d1d9e0);\n --lq-pdf-chrome-bg: var(--lq-header-bg, #f6f8fa);\n --lq-pdf-accent: var(--lq-accent, #1f6feb);\n --lq-pdf-accent-fg: var(--lq-accent-fg, #ffffff);\n --lq-pdf-focus: var(--lq-focus-ring, #1f6feb);\n --lq-pdf-selection-bg: var(--lq-selection-bg, rgba(31, 111, 235, 0.12));\n --lq-pdf-radius: var(--lq-radius, 6px);\n --lq-pdf-panel-bg: var(--lq-menu-bg, #ffffff);\n --lq-pdf-panel-shadow: var(--lq-menu-shadow, 0 8px 24px rgba(15, 23, 42, 0.16));\n --lq-pdf-canvas-bg: #e6e9ed;\n --lq-pdf-page-shadow: 0 1px 3px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);\n --lq-pdf-search-hit: rgba(255, 196, 0, 0.42);\n --lq-pdf-search-current: rgba(255, 120, 0, 0.55);\n --lq-pdf-read-highlight: rgba(64, 196, 255, 0.35);\n --lq-pdf-danger: #cf222e;\n --lq-pdf-sidebar-width: 220px;\n --lq-pdf-page-bg: #ffffff;\n --lq-pdf-text-selection: rgba(0, 92, 230, 0.28);\n --lq-pdf-snap-guide: #d1242f;\n --lq-pdf-page-accent-soft: rgba(31, 111, 235, 0.12);\n --lq-pdf-field-border: #818b98;\n --lq-pdf-field-bg: rgba(221, 235, 255, 0.55);\n --lq-pdf-page-fg: #1f2328;\n --lq-pdf-page-danger: #cf222e;\n --lq-pdf-page-accent: #1f6feb;\n --lq-pdf-page-accent-fg: #0b2a6f;\n --lq-pdf-page-success-soft: rgba(218, 251, 225, 0.7);\n --lq-pdf-page-success: #1a7f37;\n --lq-pdf-page-danger-soft: rgba(255, 235, 233, 0.8);\n --lq-pdf-page-accent-strong: rgba(31, 111, 235, 0.22);\n --lq-pdf-toast-bg: #1f2328;\n --lq-pdf-toast-fg: #ffffff;\n --lq-pdf-toast-error-bg: #8f1a22;\n --lq-pdf-editor-bg: rgba(255, 255, 255, 0.95);\n --lq-pdf-backdrop: rgba(15, 23, 42, 0.45);\n --lq-pdf-page-warning: #bf8700;\n --lq-pdf-page-loading-sheen: #f1f3f5;\n --lq-pdf-presentation-bg: #000000;\n --lq-pdf-compare-missing: rgba(127, 127, 127, 0.16);\n --lq-pdf-compare-inserted: rgba(46, 160, 67, 0.4);\n --lq-pdf-compare-deleted: rgba(248, 81, 73, 0.4);\n --lq-pdf-compare-moved: rgba(56, 139, 253, 0.36);\n --lq-pdf-compare-diff-opacity: 0.7;\n --lq-pdf-presence-default: #0969da;\n --lq-pdf-presence-fg: #ffffff;\n --lq-pdf-page-danger-bg: #fff5f5;\n --lq-pdf-page-danger-fg: #8a1320;\n --lq-pdf-page-hint: #9a6700;\n --lq-pdf-page-hint-bg: #fff8c5;\n --lq-pdf-page-hint-fg: #5c3d00;\n --lq-pdf-field-required-bg: rgba(255, 235, 233, 0.6);\n --lq-pdf-barcode-stripe: rgba(31, 35, 40, 0.18);\n --lq-pdf-field-button-bg: rgba(221, 235, 255, 0.85);\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 320px;\n overflow: hidden;\n font-family: var(--lq-pdf-font-family);\n font-size: var(--lq-pdf-font-size);\n color: var(--lq-pdf-fg);\n background: var(--lq-pdf-bg);\n border: 1px solid var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n}\n.lq-pdf.lq-theme-light {\n --lq-fg: #1f2328;\n --lq-bg: #ffffff;\n --lq-muted-fg: #59636e;\n --lq-border: #d1d9e0;\n --lq-header-bg: #f6f8fa;\n --lq-accent: #1f6feb;\n --lq-accent-fg: #ffffff;\n --lq-selection-bg: rgba(31, 111, 235, 0.12);\n --lq-focus-ring: #1f6feb;\n --lq-menu-bg: #ffffff;\n color-scheme: light;\n}\n.lq-pdf.lq-theme-dark,\n.lq-theme-dark .lq-pdf:not(.lq-theme-light) {\n --lq-fg: #e6edf3;\n --lq-bg: #0d1117;\n --lq-muted-fg: #9198a1;\n --lq-border: #3d444d;\n --lq-header-bg: #151b23;\n --lq-accent: #4493f8;\n --lq-accent-fg: #0d1117;\n --lq-selection-bg: rgba(68, 147, 248, 0.2);\n --lq-focus-ring: #4493f8;\n --lq-menu-bg: #161b22;\n --lq-menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);\n --lq-pdf-canvas-bg: #010409;\n --lq-pdf-page-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);\n --lq-pdf-danger: #f85149;\n color-scheme: dark;\n}\n@media (prefers-color-scheme: dark) {\n .lq-pdf.lq-theme-auto {\n --lq-fg: #e6edf3;\n --lq-bg: #0d1117;\n --lq-muted-fg: #9198a1;\n --lq-border: #3d444d;\n --lq-header-bg: #151b23;\n --lq-accent: #4493f8;\n --lq-accent-fg: #0d1117;\n --lq-selection-bg: rgba(68, 147, 248, 0.2);\n --lq-focus-ring: #4493f8;\n --lq-menu-bg: #161b22;\n --lq-menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);\n --lq-pdf-canvas-bg: #010409;\n --lq-pdf-page-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);\n --lq-pdf-danger: #f85149;\n color-scheme: dark;\n }\n .lq-pdf.lq-theme-auto.lq-pdf-invert-pages .lq-pdf-canvas {\n filter: invert(0.92) hue-rotate(180deg);\n }\n}\n.lq-pdf.lq-theme-dark.lq-pdf-invert-pages .lq-pdf-canvas {\n filter: invert(0.92) hue-rotate(180deg);\n}\n.lq-pdf *,\n.lq-pdf *::before,\n.lq-pdf *::after {\n box-sizing: border-box;\n}\n.lq-pdf button,\n.lq-pdf input,\n.lq-pdf select,\n.lq-pdf textarea {\n font: inherit;\n color: inherit;\n}\n.lq-pdf-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n.lq-pdf-toolbar-wrap {\n flex: none;\n border-bottom: 1px solid var(--lq-pdf-border);\n background: var(--lq-pdf-chrome-bg);\n}\n.lq-pdf-toolbar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 2px;\n padding: 3px 6px;\n}\n.lq-pdf-group {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n}\n.lq-pdf-tools {\n flex-wrap: wrap;\n}\n.lq-pdf-separator {\n width: 1px;\n height: 20px;\n margin: 0 4px;\n background: var(--lq-pdf-border);\n}\n.lq-pdf-tool {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 32px;\n height: 32px;\n padding: 0 6px;\n border: 1px solid transparent;\n border-radius: var(--lq-pdf-radius);\n background: transparent;\n cursor: pointer;\n}\n.lq-pdf-tool:hover:not(:disabled) {\n background: var(--lq-pdf-selection-bg);\n}\n.lq-pdf-tool:disabled {\n opacity: 0.4;\n cursor: default;\n}\n.lq-pdf-tool[aria-pressed=\"true\"] {\n background: var(--lq-pdf-accent);\n color: var(--lq-pdf-accent-fg);\n}\n.lq-pdf :focus-visible {\n outline: 2px solid var(--lq-pdf-focus);\n outline-offset: 1px;\n}\n.lq-pdf-page-input {\n width: 3.2em;\n height: 32px;\n padding: 0 4px;\n text-align: center;\n border: 1px solid var(--lq-pdf-border);\n border-radius: 4px;\n background: var(--lq-pdf-bg);\n}\n.lq-pdf-zoom,\n.lq-pdf-stamp-select,\n.lq-pdf-field-select,\n.lq-pdf-filters select {\n height: 32px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: 4px;\n background: var(--lq-pdf-bg);\n}\n.lq-pdf-muted {\n color: var(--lq-pdf-muted);\n font-size: 0.92em;\n}\n.lq-pdf-searchbar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n padding: 4px 8px 6px;\n}\n.lq-pdf-searchbar[hidden] {\n display: none;\n}\n.lq-pdf-searchbar input[type=\"search\"] {\n flex: 1 1 200px;\n max-width: 320px;\n height: 28px;\n padding: 0 8px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: 4px;\n background: var(--lq-pdf-bg);\n}\n.lq-pdf-body {\n position: relative;\n display: flex;\n flex: 1 1 auto;\n min-height: 0;\n}\n.lq-pdf-sidebar {\n display: flex;\n flex-direction: column;\n flex: none;\n width: var(--lq-pdf-sidebar-width);\n min-width: 0;\n border-right: 1px solid var(--lq-pdf-border);\n background: var(--lq-pdf-chrome-bg);\n}\n.lq-pdf-sidebar[hidden] {\n display: none;\n}\n.lq-pdf-tabs {\n display: flex;\n border-bottom: 1px solid var(--lq-pdf-border);\n}\n.lq-pdf-tab,\n.lq-pdf-tabs [role=\"tab\"] {\n flex: 1;\n padding: 6px 4px;\n border: 0;\n border-bottom: 2px solid transparent;\n background: transparent;\n cursor: pointer;\n font-size: 0.92em;\n}\n.lq-pdf-tabs [aria-selected=\"true\"] {\n border-bottom-color: var(--lq-pdf-accent);\n font-weight: 600;\n}\n.lq-pdf-panel {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n display: flex;\n flex-direction: column;\n}\n.lq-pdf-panel[hidden] {\n display: none;\n}\n.lq-pdf-page-tools {\n display: flex;\n justify-content: center;\n gap: 2px;\n padding: 4px;\n border-bottom: 1px solid var(--lq-pdf-border);\n}\n.lq-pdf-page-tools[hidden] {\n display: none;\n}\n.lq-pdf-thumbs {\n flex: 1 1 auto;\n overflow: auto;\n padding: 8px 0;\n}\n.lq-pdf-thumbs[hidden],\n.lq-pdf-empty-state[hidden] {\n display: none;\n}\n.lq-pdf-thumb {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n min-height: 186px;\n padding: 6px 0;\n cursor: pointer;\n}\n.lq-pdf-thumb-frame {\n display: flex;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n background: var(--lq-pdf-page-bg);\n border: 2px solid transparent;\n box-shadow: var(--lq-pdf-page-shadow);\n}\n.lq-pdf-thumb-frame canvas {\n width: 100%;\n height: auto;\n}\n.lq-pdf-thumb-page {\n position: relative;\n flex: none;\n width: 100%;\n line-height: 0;\n}\n.lq-pdf-thumb-overlay {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n}\n.lq-pdf-thumb .lq-pdf-thumb-overlay * {\n pointer-events: none;\n}\n.lq-pdf-thumb-field-box {\n fill: var(--lq-pdf-field-bg);\n stroke: var(--lq-pdf-field-border);\n stroke-width: 1;\n}\n.lq-pdf-thumb-field-text,\n.lq-pdf-thumb-field-mark {\n fill: var(--lq-pdf-page-fg);\n}\n.lq-pdf-thumb-field-check {\n fill: none;\n stroke: var(--lq-pdf-page-fg);\n}\n.lq-pdf-thumb[aria-selected=\"true\"] .lq-pdf-thumb-frame {\n border-color: var(--lq-pdf-accent);\n}\n.lq-pdf-thumb-current .lq-pdf-thumb-label {\n font-weight: 700;\n}\n.lq-pdf-thumbs:focus-visible .lq-pdf-thumb-focus .lq-pdf-thumb-frame {\n outline: 2px solid var(--lq-pdf-focus);\n outline-offset: 2px;\n}\n.lq-pdf-drop-before {\n box-shadow: inset 0 3px 0 var(--lq-pdf-accent);\n}\n.lq-pdf-drop-after {\n box-shadow: inset 0 -3px 0 var(--lq-pdf-accent);\n}\n.lq-pdf-outline,\n.lq-pdf-outline ul {\n list-style: none;\n margin: 0;\n padding: 0 0 0 12px;\n}\n.lq-pdf-outline {\n padding: 8px;\n}\n.lq-pdf-outline [role=\"treeitem\"] {\n cursor: pointer;\n}\n.lq-pdf-outline-label {\n display: block;\n padding: 3px 6px;\n border-radius: 4px;\n}\n.lq-pdf-outline-label:hover {\n background: var(--lq-pdf-selection-bg);\n}\n.lq-pdf-outline [aria-expanded=\"false\"] > ul {\n display: none;\n}\n.lq-pdf-filters {\n display: flex;\n gap: 4px;\n padding: 6px;\n}\n.lq-pdf-filters select {\n flex: 1;\n min-width: 0;\n}\n.lq-pdf-annotation-list,\n.lq-pdf-field-list {\n list-style: none;\n margin: 0;\n padding: 0 6px 6px;\n}\n.lq-pdf-list-heading {\n padding: 8px 4px 2px;\n font-size: 0.85em;\n font-weight: 600;\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-annotation-item {\n display: grid;\n grid-template-columns: 10px 1fr;\n column-gap: 6px;\n width: 100%;\n padding: 6px;\n margin: 2px 0;\n text-align: left;\n border: 1px solid transparent;\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-bg);\n cursor: pointer;\n}\n.lq-pdf-annotation-item > :not(.lq-pdf-annotation-swatch) {\n grid-column: 2;\n}\n.lq-pdf-annotation-item[aria-current=\"true\"] {\n border-color: var(--lq-pdf-accent);\n}\n.lq-pdf-annotation-swatch {\n grid-row: span 4;\n width: 10px;\n height: 10px;\n margin-top: 3px;\n border-radius: 50%;\n}\n.lq-pdf-annotation-title {\n font-weight: 600;\n}\n.lq-pdf-annotation-text {\n overflow-wrap: anywhere;\n}\n.lq-pdf-panel-footer {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-top: auto;\n padding: 8px;\n border-top: 1px solid var(--lq-pdf-border);\n}\n.lq-pdf-empty {\n padding: 16px;\n color: var(--lq-pdf-muted);\n text-align: center;\n}\n.lq-pdf-empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n padding: 24px 16px;\n list-style: none;\n text-align: center;\n}\n.lq-pdf-empty-state > .lq-pdf-empty {\n margin: 0;\n padding: 0;\n}\n.lq-pdf-empty-icon {\n display: inline-flex;\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-empty-icon svg {\n width: 28px;\n height: 28px;\n}\n.lq-pdf-welcome {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 8px;\n padding: 24px;\n text-align: center;\n}\n.lq-pdf-welcome[hidden] {\n display: none;\n}\n.lq-pdf-welcome-box {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n box-sizing: border-box;\n width: min(420px, 100%);\n padding: 32px 24px;\n border: 1px dashed var(--lq-pdf-input-border);\n border-radius: var(--lq-pdf-radius-dialog);\n background: var(--lq-pdf-bg);\n}\n.lq-pdf-welcome-box h2 {\n margin: 0;\n font-size: var(--lq-pdf-text-lg);\n font-weight: 600;\n}\n.lq-pdf-welcome-box p {\n margin: 0 0 8px;\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-dropping .lq-pdf-welcome-box {\n border-color: var(--lq-pdf-accent);\n background: var(--lq-pdf-pressed-bg);\n}\n.lq-pdf-viewport {\n position: relative;\n flex: 1 1 auto;\n min-width: 0;\n overflow: auto;\n background: var(--lq-pdf-canvas-bg);\n overscroll-behavior: contain;\n}\n.lq-pdf-pages {\n position: relative;\n margin: 0 auto;\n}\n.lq-pdf-layer-list {\n margin: 0;\n padding: 4px 0;\n list-style: none;\n}\n.lq-pdf-layer,\n.lq-pdf-layer-group {\n padding-block: 4px;\n padding-inline-end: 8px;\n}\n.lq-pdf-layer-group {\n color: var(--lq-pdf-muted);\n font-weight: 600;\n}\n.lq-pdf-tool-text {\n width: auto;\n padding-inline: 8px;\n white-space: nowrap;\n}\n.lq-pdf-palette-input {\n width: 100%;\n box-sizing: border-box;\n}\n.lq-pdf-palette-list {\n margin: 8px 0 0;\n padding: 0;\n max-height: 320px;\n overflow-y: auto;\n list-style: none;\n}\n.lq-pdf-palette-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 6px 8px;\n border-radius: var(--lq-pdf-radius);\n cursor: pointer;\n}\n.lq-pdf-palette-item[aria-selected=\"true\"] {\n background: var(--lq-pdf-selection-bg);\n outline: 2px solid var(--lq-pdf-focus);\n outline-offset: -2px;\n}\n.lq-pdf-palette-item[aria-disabled=\"true\"] {\n color: var(--lq-pdf-muted);\n cursor: default;\n}\n.lq-pdf-tabstrip {\n flex: none;\n background: var(--lq-pdf-chrome-bg);\n border-bottom: 1px solid var(--lq-pdf-border);\n}\n.lq-pdf-tabstrip[hidden] {\n display: none;\n}\n.lq-pdf-doctabs {\n display: flex;\n overflow-x: auto;\n}\n.lq-pdf-doctab {\n display: flex;\n align-items: center;\n gap: 6px;\n max-width: 240px;\n min-height: 32px;\n padding-block: 0;\n padding-inline: 12px 6px;\n border-inline-end: 1px solid var(--lq-pdf-border);\n color: var(--lq-pdf-muted);\n cursor: pointer;\n white-space: nowrap;\n}\n.lq-pdf-doctab[aria-selected=\"true\"] {\n color: var(--lq-pdf-fg);\n background: var(--lq-pdf-bg);\n box-shadow: inset 0 -2px 0 var(--lq-pdf-accent);\n}\n.lq-pdf-doctab:focus-visible {\n outline: 2px solid var(--lq-pdf-focus);\n outline-offset: -2px;\n}\n.lq-pdf-doctab-name {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.lq-pdf-doctab-dirty {\n color: var(--lq-pdf-accent);\n font-size: 0.7em;\n}\n.lq-pdf-doctab-close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border-radius: var(--lq-pdf-radius);\n font-size: 1.2em;\n}\n.lq-pdf-doctab-close:hover {\n background: var(--lq-pdf-selection-bg);\n}\n.lq-pdf-read-highlight {\n position: absolute;\n z-index: 3;\n border-radius: 2px;\n background: var(--lq-pdf-read-highlight);\n outline: 1px solid var(--lq-pdf-accent);\n pointer-events: none;\n mix-blend-mode: multiply;\n}\n.lq-pdf[data-tool=\"snapshot\"] .lq-pdf-page {\n cursor: crosshair;\n}\n.lq-pdf-preview-status {\n flex: none;\n padding: 4px 12px;\n color: var(--lq-pdf-fg);\n background: var(--lq-pdf-selection-bg);\n border-bottom: 1px solid var(--lq-pdf-border);\n}\n.lq-pdf-preview-status[hidden] {\n display: none;\n}\n.lq-pdf-message {\n position: absolute;\n inset: 40% 16px auto;\n text-align: center;\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-message[hidden] {\n display: none;\n}\n.lq-pdf-message-error {\n color: var(--lq-pdf-danger);\n}\n.lq-pdf-page {\n position: absolute;\n overflow: hidden;\n background: var(--lq-pdf-page-bg);\n box-shadow: var(--lq-pdf-page-shadow);\n contain: strict;\n}\n.lq-pdf-canvas {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n}\n.lq-pdf-text {\n position: absolute;\n top: 0;\n left: 0;\n transform-origin: 0 0;\n overflow: hidden;\n line-height: 1;\n font-family: sans-serif;\n -webkit-text-size-adjust: none;\n text-size-adjust: none;\n forced-color-adjust: none;\n}\n.lq-pdf-text span {\n position: absolute;\n color: transparent;\n white-space: pre;\n cursor: text;\n transform-origin: 0 0;\n}\n.lq-pdf-text span.lq-pdf-mc {\n position: static;\n transform: none;\n cursor: inherit;\n}\n.lq-pdf-text ::selection {\n background: var(--lq-pdf-text-selection);\n}\n.lq-pdf-struct {\n position: absolute;\n inset: 0;\n overflow: hidden;\n pointer-events: none;\n}\n.lq-pdf-overlay {\n position: absolute;\n inset: 0;\n overflow: visible;\n pointer-events: none;\n}\n.lq-pdf-annot {\n pointer-events: none;\n}\n.lq-pdf[data-tool=\"select\"] .lq-pdf-annot,\n.lq-pdf:not([data-tool]) .lq-pdf-annot {\n pointer-events: visiblePainted;\n cursor: move;\n}\n.lq-pdf-annot:focus {\n outline: none;\n}\n.lq-pdf-annot:focus-visible {\n outline: 2px dashed var(--lq-pdf-focus);\n}\n.lq-pdf-annot-highlight .lq-pdf-markup,\n.lq-pdf-thumb-annot-highlight .lq-pdf-markup {\n mix-blend-mode: multiply;\n}\n.lq-pdf-hit-area {\n pointer-events: all;\n}\n.lq-pdf-search-hit {\n fill: var(--lq-pdf-search-hit);\n mix-blend-mode: multiply;\n}\n.lq-pdf-search-current {\n fill: var(--lq-pdf-search-current);\n}\n.lq-pdf-selection {\n fill: none;\n stroke: var(--lq-pdf-accent);\n stroke-width: 1;\n stroke-dasharray: 4 3;\n}\n.lq-pdf-snap {\n fill: none;\n stroke: var(--lq-pdf-snap-guide);\n stroke-width: 1.5;\n}\n.lq-pdf-snap-cross {\n fill: none;\n stroke: var(--lq-pdf-snap-guide);\n stroke-width: 1;\n}\n.lq-pdf-crosshair {\n fill: none;\n stroke: var(--lq-pdf-page-accent);\n stroke-width: 1.5;\n}\n.lq-pdf-crosshair-halo {\n stroke: var(--lq-pdf-page-bg);\n stroke-width: 4;\n}\n.lq-pdf-stroke-focus {\n fill: none;\n stroke: var(--lq-pdf-focus);\n stroke-width: 4;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-dasharray: 6 4;\n}\n.lq-pdf-handle {\n fill: var(--lq-pdf-page-bg);\n stroke: var(--lq-pdf-accent);\n stroke-width: 1.5;\n pointer-events: all;\n}\n.lq-pdf-link-area {\n pointer-events: all;\n cursor: pointer;\n}\n.lq-pdf-link-hit {\n stroke: transparent;\n stroke-width: 14px;\n vector-effect: non-scaling-stroke;\n pointer-events: stroke;\n cursor: pointer;\n}\n.lq-pdf[data-tool=\"select\"] .lq-pdf-annot-link .lq-pdf-link-area,\n.lq-pdf-annot-link:focus-visible .lq-pdf-link-area {\n stroke: var(--lq-pdf-accent);\n stroke-width: 0.75;\n stroke-dasharray: 3 2;\n}\n.lq-pdf-media-area {\n pointer-events: all;\n}\n.lq-pdf-link-address {\n margin: 0;\n padding: 8px 10px;\n border-radius: 4px;\n background: var(--lq-pdf-selection-bg);\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 13px;\n overflow-wrap: anywhere;\n user-select: text;\n}\na.lq-pdf-button {\n display: inline-flex;\n align-items: center;\n text-decoration: none;\n}\n.lq-pdf-handle-rotate {\n cursor: grab;\n}\n.lq-pdf-handle-vertex {\n cursor: move;\n}\n.lq-pdf-handle-edge {\n fill: var(--lq-pdf-accent);\n fill-opacity: 0.35;\n cursor: copy;\n}\n.lq-pdf-handle-focus {\n fill: var(--lq-pdf-accent);\n fill-opacity: 1;\n stroke: var(--lq-pdf-page-bg);\n stroke-width: 2;\n outline: 2px solid var(--lq-pdf-focus);\n outline-offset: 2px;\n}\n.lq-pdf-handle-rotated {\n cursor: move;\n}\n.lq-pdf-rotate-stem {\n stroke: var(--lq-pdf-accent);\n stroke-width: 1;\n}\n.lq-pdf-handle-nw,\n.lq-pdf-handle-se {\n cursor: nwse-resize;\n}\n.lq-pdf-handle-ne,\n.lq-pdf-handle-sw {\n cursor: nesw-resize;\n}\n.lq-pdf-handle-n,\n.lq-pdf-handle-s {\n cursor: ns-resize;\n}\n.lq-pdf-handle-e,\n.lq-pdf-handle-w {\n cursor: ew-resize;\n}\n.lq-pdf-links,\n.lq-pdf-forms {\n position: absolute;\n inset: 0;\n pointer-events: none;\n}\n.lq-pdf-link {\n position: absolute;\n padding: 0;\n border: 0;\n background: transparent;\n pointer-events: auto;\n cursor: pointer;\n}\n.lq-pdf-link:hover {\n background: var(--lq-pdf-page-accent-soft);\n}\n.lq-pdf[data-tool]:not([data-tool=\"select\"]):not([data-tool=\"pan\"]) .lq-pdf-link {\n pointer-events: none;\n}\n.lq-pdf[data-tool=\"pan\"] .lq-pdf-viewport,\n.lq-pdf-panning .lq-pdf-viewport {\n cursor: grab;\n}\n.lq-pdf-panning .lq-pdf-viewport {\n cursor: grabbing;\n user-select: none;\n}\n.lq-pdf[data-tool=\"ink\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"rectangle\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"ellipse\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"line\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"arrow\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"polygon\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"polyline\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"distance\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"perimeter\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"area\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"note\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"freeText\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"stamp\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"signature\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"image\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"formField\"] .lq-pdf-page {\n cursor: crosshair;\n touch-action: none;\n user-select: none;\n}\n.lq-pdf[data-tool=\"ink\"] .lq-pdf-text span,\n.lq-pdf[data-tool=\"rectangle\"] .lq-pdf-text span,\n.lq-pdf[data-tool=\"ellipse\"] .lq-pdf-text span,\n.lq-pdf[data-tool=\"note\"] .lq-pdf-text span {\n cursor: crosshair;\n}\n.lq-pdf-field {\n position: absolute;\n margin: 0;\n padding: 0 2px;\n border: 1px solid var(--lq-pdf-field-border);\n border-radius: 2px;\n background: var(--lq-pdf-field-bg);\n color: var(--lq-pdf-page-fg);\n pointer-events: auto;\n}\n.lq-pdf .lq-pdf-forms .lq-pdf-field {\n color: var(--lq-pdf-page-fg);\n color-scheme: light;\n}\n.lq-pdf .lq-pdf-forms .lq-pdf-field:disabled {\n color: var(--lq-pdf-page-fg);\n -webkit-text-fill-color: var(--lq-pdf-page-fg);\n opacity: 1;\n}\n.lq-pdf .lq-pdf-forms .lq-pdf-field option {\n background: var(--lq-pdf-page-bg);\n color: var(--lq-pdf-page-fg);\n}\n.lq-pdf .lq-pdf-forms .lq-pdf-field-signature {\n color: var(--lq-pdf-page-accent-fg);\n}\n.lq-pdf-field:focus {\n background: var(--lq-pdf-page-bg);\n}\n.lq-pdf-field[aria-invalid=\"true\"] {\n border-color: var(--lq-pdf-page-danger);\n box-shadow: 0 0 0 1px var(--lq-pdf-page-danger);\n}\n.lq-pdf-field-checkbox,\n.lq-pdf-field-radio {\n accent-color: var(--lq-pdf-page-accent);\n}\n.lq-pdf-field-signature {\n font-size: 12px;\n color: var(--lq-pdf-page-accent-fg);\n cursor: pointer;\n}\n.lq-pdf-field-signed {\n background: var(--lq-pdf-page-success-soft);\n border-color: var(--lq-pdf-page-success);\n}\n.lq-pdf-field-signature-broken {\n background: var(--lq-pdf-page-danger-soft);\n border-color: var(--lq-pdf-page-danger);\n}\n.lq-pdf-forms .lq-pdf-field:disabled {\n background: transparent;\n border-color: var(--lq-pdf-field-border);\n border-style: dotted;\n}\n.lq-pdf-field-design {\n position: absolute;\n padding: 1px 3px;\n overflow: hidden;\n font-size: 10px;\n color: var(--lq-pdf-page-accent-fg);\n border: 1px dashed var(--lq-pdf-page-accent);\n background: var(--lq-pdf-page-accent-soft);\n pointer-events: auto;\n cursor: move;\n white-space: nowrap;\n}\n.lq-pdf-field-selected {\n border-style: solid;\n background: var(--lq-pdf-page-accent-strong);\n}\n.lq-pdf-field-resize {\n position: absolute;\n right: 0;\n bottom: 0;\n width: 8px;\n height: 8px;\n background: var(--lq-pdf-page-accent);\n cursor: nwse-resize;\n}\n.lq-pdf-content {\n position: absolute;\n inset: 0;\n pointer-events: none;\n}\n.lq-pdf[data-tool=\"addText\"] .lq-pdf-page {\n cursor: text;\n}\n.lq-pdf[data-fill-mark] .lq-pdf-page {\n cursor: crosshair;\n}\n.lq-pdf-content-run,\n.lq-pdf-content-image {\n position: absolute;\n box-sizing: border-box;\n pointer-events: auto;\n border: 1px dashed transparent;\n border-radius: 2px;\n touch-action: none;\n}\n.lq-pdf-content-run {\n cursor: text;\n}\n.lq-pdf-content-path {\n position: absolute;\n box-sizing: border-box;\n pointer-events: auto;\n border: 1px dashed color-mix(in srgb, var(--lq-pdf-accent) 45%, transparent);\n border-radius: 2px;\n cursor: move;\n touch-action: none;\n}\n.lq-pdf-content-path:hover,\n.lq-pdf-content-path:focus-visible {\n border-color: var(--lq-pdf-accent);\n background: var(--lq-pdf-selection-bg);\n outline: none;\n}\n.lq-pdf-content-path:focus-visible {\n box-shadow: 0 0 0 2px var(--lq-pdf-accent);\n}\n.lq-pdf-content-scan {\n border-color: color-mix(in srgb, var(--lq-pdf-accent) 45%, transparent);\n border-style: dotted;\n}\n.lq-pdf-replace-list,\n.lq-pdf-object-list {\n display: flex;\n flex-direction: column;\n gap: 2px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.lq-pdf-replace-list {\n max-height: 320px;\n overflow-y: auto;\n}\n.lq-pdf-replace-item,\n.lq-pdf-object-item {\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 32px;\n}\n.lq-pdf-replace-item > .lq-pdf-check,\n.lq-pdf-replace-item > .lq-pdf-replace-preview {\n flex: 1 1 auto;\n min-width: 0;\n}\n.lq-pdf-dialog .lq-pdf-replace-item > .lq-pdf-check {\n display: flex;\n flex-flow: row nowrap;\n flex: 1 1 auto;\n align-items: flex-start;\n gap: 8px;\n min-width: 0;\n white-space: normal;\n}\n.lq-pdf-replace-item > .lq-pdf-check > input {\n flex: none;\n margin-top: 3px;\n}\n.lq-pdf-replace-item > .lq-pdf-link-button {\n flex: none;\n min-height: 24px;\n white-space: nowrap;\n}\n.lq-pdf-replace-preview {\n flex: 1 1 auto;\n min-width: 0;\n overflow-wrap: anywhere;\n}\n.lq-pdf-replace-preview del {\n color: var(--lq-pdf-danger);\n}\n.lq-pdf-replace-preview ins {\n color: var(--lq-pdf-accent);\n font-weight: 600;\n text-decoration: none;\n}\n.lq-pdf-object-item {\n padding: 0 6px;\n}\n.lq-pdf-object-item > .lq-pdf-icon-button {\n flex: 0 0 auto;\n width: 28px;\n height: 28px;\n align-self: center;\n}\n.lq-pdf-object-select {\n display: flex;\n flex: 1 1 auto;\n align-items: center;\n gap: 6px;\n min-width: 0;\n text-align: start;\n}\n.lq-pdf-object-label {\n flex: 1 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.lq-pdf-object-layer {\n flex: none;\n padding: 0 6px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: 999px;\n color: var(--lq-pdf-muted);\n font-size: 11px;\n}\n.lq-pdf-content-image {\n cursor: move;\n border-color: color-mix(in srgb, var(--lq-pdf-accent) 45%, transparent);\n}\n.lq-pdf-content-run:hover,\n.lq-pdf-content-run:focus-visible,\n.lq-pdf-content-image:hover,\n.lq-pdf-content-image:focus-visible {\n border-color: var(--lq-pdf-accent);\n background: var(--lq-pdf-selection-bg);\n outline: none;\n}\n.lq-pdf-content-run:focus-visible,\n.lq-pdf-content-image:focus-visible {\n box-shadow: 0 0 0 2px var(--lq-pdf-accent);\n}\n.lq-pdf-content-selected {\n border: 1px solid var(--lq-pdf-accent);\n}\n.lq-pdf-content-dragging {\n background: var(--lq-pdf-selection-bg);\n border-color: var(--lq-pdf-accent);\n cursor: grabbing;\n}\n.lq-pdf-content-handle {\n position: absolute;\n width: 9px;\n height: 9px;\n margin: -5px 0 0 -5px;\n box-sizing: border-box;\n background: var(--lq-pdf-page-bg);\n border: 1.5px solid var(--lq-pdf-accent);\n}\n.lq-pdf-content-handle-nw { left: 0; top: 0; cursor: nwse-resize; }\n.lq-pdf-content-handle-n { left: 50%; top: 0; cursor: ns-resize; }\n.lq-pdf-content-handle-ne { left: 100%; top: 0; cursor: nesw-resize; }\n.lq-pdf-content-handle-e { left: 100%; top: 50%; cursor: ew-resize; }\n.lq-pdf-content-handle-se { left: 100%; top: 100%; cursor: nwse-resize; }\n.lq-pdf-content-handle-s { left: 50%; top: 100%; cursor: ns-resize; }\n.lq-pdf-content-handle-sw { left: 0; top: 100%; cursor: nesw-resize; }\n.lq-pdf-content-handle-w { left: 0; top: 50%; cursor: ew-resize; }\n.lq-pdf-content-input {\n position: absolute;\n box-sizing: border-box;\n pointer-events: auto;\n padding: 0 3px;\n border: 1px solid var(--lq-pdf-accent);\n border-radius: 2px;\n background: var(--lq-pdf-page-bg);\n color: var(--lq-pdf-page-fg);\n font-family: Helvetica, Arial, sans-serif;\n line-height: 1;\n outline: 2px solid color-mix(in srgb, var(--lq-pdf-accent) 35%, transparent);\n}\n.lq-pdf-content-textarea {\n padding: 2px 4px;\n resize: none;\n overflow: auto;\n white-space: pre-wrap;\n}\n.lq-pdf-content-paragraph {\n position: absolute;\n width: 18px;\n height: 18px;\n padding: 0;\n pointer-events: auto;\n border: 1px solid color-mix(in srgb, var(--lq-pdf-accent) 45%, transparent);\n border-radius: 3px;\n background: var(--lq-pdf-page-bg);\n color: var(--lq-pdf-accent);\n font: 600 12px/16px Helvetica, Arial, sans-serif;\n cursor: pointer;\n}\n.lq-pdf-content-paragraph:hover,\n.lq-pdf-content-paragraph:focus-visible {\n border-color: var(--lq-pdf-accent);\n background: var(--lq-pdf-selection-bg);\n outline: none;\n}\n.lq-pdf-content-paragraph:focus-visible {\n box-shadow: 0 0 0 2px var(--lq-pdf-accent);\n}\n.lq-pdf-toast {\n position: absolute;\n inset-inline: 0;\n bottom: 16px;\n margin-inline: auto;\n width: max-content;\n max-width: min(520px, calc(100% - 32px));\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 10px 8px 14px;\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-toast-bg);\n color: var(--lq-pdf-toast-fg);\n font-size: 13px;\n box-shadow: var(--lq-pdf-panel-shadow);\n z-index: 6;\n}\n.lq-pdf-toast-error {\n background: var(--lq-pdf-toast-error-bg);\n}\n.lq-pdf-toast-close {\n min-width: 24px;\n min-height: 24px;\n border: 0;\n border-radius: 4px;\n background: transparent;\n color: inherit;\n font-size: 16px;\n cursor: pointer;\n}\n.lq-pdf-editor {\n position: absolute;\n z-index: 3;\n padding: 2px;\n font-family: Helvetica, Arial, sans-serif;\n line-height: 1.2;\n border: 1px solid var(--lq-pdf-accent);\n background: var(--lq-pdf-editor-bg);\n resize: none;\n pointer-events: auto;\n}\n.lq-pdf-rich {\n position: absolute;\n z-index: 3;\n pointer-events: auto;\n}\n.lq-pdf-rich-surface {\n position: static;\n display: block;\n box-sizing: border-box;\n width: 100%;\n outline: none;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n cursor: text;\n}\n.lq-pdf-rich-bar {\n position: absolute;\n bottom: 100%;\n inset-inline-start: 0;\n margin-bottom: 4px;\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 3px;\n width: max-content;\n border: 1px solid var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-panel-bg);\n box-shadow: var(--lq-pdf-panel-shadow);\n font-size: 13px;\n}\n.lq-pdf-rich-below .lq-pdf-rich-bar {\n bottom: auto;\n top: 100%;\n margin: 4px 0 0;\n}\n.lq-pdf-rich-button {\n min-width: 26px;\n height: 26px;\n padding: 0 6px;\n border: 0;\n border-radius: 4px;\n background: transparent;\n color: var(--lq-pdf-fg);\n font: inherit;\n cursor: pointer;\n}\n.lq-pdf-rich-button:hover {\n background: var(--lq-pdf-selection-bg);\n}\n.lq-pdf-rich-button[aria-pressed=\"true\"] {\n background: var(--lq-pdf-accent);\n color: var(--lq-pdf-accent-fg);\n}\n.lq-pdf-rich-button:focus-visible,\n.lq-pdf-rich-select:focus-visible {\n outline: 2px solid var(--lq-pdf-accent);\n outline-offset: 1px;\n}\n.lq-pdf-rich-select {\n height: 26px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: 4px;\n background: var(--lq-pdf-panel-bg);\n color: var(--lq-pdf-fg);\n font: inherit;\n}\n.lq-pdf-popover {\n position: absolute;\n z-index: 20;\n display: flex;\n flex-direction: column;\n gap: 6px;\n width: 280px;\n max-height: 70%;\n overflow: auto;\n padding: 10px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-panel-bg);\n box-shadow: var(--lq-pdf-panel-shadow);\n}\n.lq-pdf-popover[hidden] {\n display: none;\n}\n.lq-pdf-mentions {\n margin: 0;\n padding: 2px;\n max-height: 168px;\n overflow: auto;\n list-style: none;\n border: 1px solid var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-panel-bg);\n}\n.lq-pdf-mentions[hidden] {\n display: none;\n}\n.lq-pdf-mention {\n display: flex;\n flex-wrap: wrap;\n gap: 2px 8px;\n align-items: baseline;\n padding: 4px 6px;\n border-radius: var(--lq-pdf-radius);\n cursor: pointer;\n}\n.lq-pdf-mention[aria-selected=\"true\"] {\n background: var(--lq-pdf-selection-bg);\n outline: 2px solid var(--lq-pdf-focus);\n outline-offset: -2px;\n}\n.lq-pdf-mention-name {\n font-weight: 600;\n}\n.lq-pdf-popover-header {\n display: flex;\n align-items: baseline;\n gap: 6px;\n}\n.lq-pdf-popover-header .lq-pdf-icon-button {\n margin-left: auto;\n}\n.lq-pdf-icon-button,\n.lq-pdf-link-button {\n border: 0;\n background: transparent;\n cursor: pointer;\n}\n.lq-pdf-link-button {\n padding: 0;\n color: var(--lq-pdf-accent);\n text-decoration: underline;\n}\n.lq-pdf-swatches {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px;\n}\n.lq-pdf-swatch {\n width: 20px;\n height: 20px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: 50%;\n cursor: pointer;\n}\n.lq-pdf-swatch[aria-pressed=\"true\"] {\n box-shadow: 0 0 0 2px var(--lq-pdf-bg), 0 0 0 4px var(--lq-pdf-accent);\n}\n.lq-pdf-swatches input[type=\"color\"] {\n width: 26px;\n height: 22px;\n padding: 0;\n border: 0;\n background: transparent;\n}\n.lq-pdf-field-editor .lq-pdf-field,\n.lq-pdf-popover .lq-pdf-field {\n position: static;\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n}\n.lq-pdf-popover textarea,\n.lq-pdf-popover select,\n.lq-pdf-field-editor input:not([type=\"checkbox\"]),\n.lq-pdf-field-editor select,\n.lq-pdf-field-editor textarea {\n width: 100%;\n padding: 4px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: 4px;\n background: var(--lq-pdf-bg);\n}\n.lq-pdf-field-editor {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n border-top: 1px solid var(--lq-pdf-border);\n}\n.lq-pdf-thread {\n margin: 0;\n padding: 0;\n list-style: none;\n border-left: 2px solid var(--lq-pdf-border);\n}\n.lq-pdf-thread li {\n padding: 4px 8px;\n}\n.lq-pdf-thread p {\n margin: 2px 0;\n overflow-wrap: anywhere;\n}\n.lq-pdf-reply {\n display: flex;\n gap: 6px;\n align-items: flex-end;\n}\n.lq-pdf-reply textarea {\n flex: 1;\n}\n.lq-pdf-popover-actions,\n.lq-pdf-dialog-actions {\n display: flex;\n justify-content: flex-end;\n gap: 6px;\n}\n.lq-pdf-button {\n padding: 4px 10px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-bg);\n cursor: pointer;\n}\n.lq-pdf-button:hover {\n background: var(--lq-pdf-selection-bg);\n}\n.lq-pdf-primary {\n border-color: var(--lq-pdf-accent);\n background: var(--lq-pdf-accent);\n color: var(--lq-pdf-accent-fg);\n}\n.lq-pdf-danger {\n border-color: var(--lq-pdf-danger);\n color: var(--lq-pdf-danger);\n}\n.lq-pdf-dialog-backdrop {\n position: absolute;\n inset: 0;\n z-index: 30;\n display: flex;\n align-items: center;\n justify-content: center;\n background: var(--lq-pdf-backdrop);\n}\n.lq-pdf-dialog {\n display: flex;\n flex-direction: column;\n gap: 10px;\n width: min(460px, calc(100% - 24px));\n padding: 16px;\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-panel-bg);\n box-shadow: var(--lq-pdf-panel-shadow);\n}\n.lq-pdf-dialog h2 {\n margin: 0;\n font-size: 1.15em;\n}\n.lq-pdf-signature-panel {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-height: 170px;\n}\n.lq-pdf-signature-pad {\n width: 100%;\n height: 150px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: 4px;\n background: var(--lq-pdf-page-bg);\n touch-action: none;\n cursor: crosshair;\n}\n.lq-pdf-signature-panel input[type=\"text\"] {\n padding: 6px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: 4px;\n background: var(--lq-pdf-bg);\n}\n.lq-pdf-signature-typed {\n min-height: 64px;\n padding: 8px;\n font-family: \"Brush Script MT\", \"Segoe Script\", \"Times New Roman\", serif;\n font-size: 34px;\n font-style: italic;\n color: var(--lq-pdf-page-accent-fg);\n border-bottom: 1px solid var(--lq-pdf-border);\n}\n.lq-pdf-print-root {\n display: none;\n}\n.lq-pdf-print-frame {\n position: fixed;\n right: 0;\n bottom: 0;\n width: 1px;\n height: 1px;\n border: 0;\n opacity: 0;\n pointer-events: none;\n}\n@media print {\n html.lq-pdf-printing body > *:not(.lq-pdf-print-root) {\n display: none !important;\n }\n html.lq-pdf-printing .lq-pdf-print-root {\n display: block;\n }\n .lq-pdf-print-page {\n position: relative;\n width: 100%;\n break-after: page;\n page-break-after: always;\n }\n .lq-pdf-print-page img,\n .lq-pdf-print-overlay {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .lq-pdf * {\n transition: none !important;\n animation: none !important;\n scroll-behavior: auto !important;\n }\n}\n@media (forced-colors: active) {\n .lq-pdf-tool[aria-pressed=\"true\"] {\n outline: 2px solid Highlight;\n }\n .lq-pdf-selection,\n .lq-pdf-handle {\n stroke: Highlight;\n }\n}\n@media (max-width: 640px) {\n .lq-pdf {\n --lq-pdf-sidebar-width: 160px;\n }\n}\n.lq-pdf-toolbar {\n flex-wrap: nowrap;\n min-width: 0;\n}\n.lq-pdf-toolbar > [hidden],\n.lq-pdf-toolstrip[hidden],\n.lq-pdf-style-bar[hidden] {\n display: none;\n}\n.lq-pdf-spacer {\n flex: 1 1 8px;\n min-width: 4px;\n}\n.lq-pdf-group {\n flex: none;\n}\n.lq-pdf-page-total {\n padding: 0 4px;\n white-space: nowrap;\n}\n.lq-pdf-tool svg {\n flex: none;\n}\n.lq-pdf-group-button,\n.lq-pdf-group-menu,\n.lq-pdf-tool-text {\n gap: 6px;\n padding: 0 10px;\n white-space: nowrap;\n}\n.lq-pdf-group-button[aria-selected=\"true\"] {\n background: var(--lq-pdf-selection-bg);\n color: var(--lq-pdf-fg);\n box-shadow: inset 0 -2px 0 var(--lq-pdf-accent);\n font-weight: 600;\n}\n.lq-pdf-group-menu {\n display: none;\n border-color: var(--lq-pdf-border);\n}\n.lq-pdf-toolbar-collapsed .lq-pdf-tool-groups {\n display: none;\n}\n.lq-pdf-toolstrip > * {\n flex: none;\n}\n.lq-pdf-pages {\n --lq-pdf-focus: var(--lq-pdf-page-accent);\n}\n.lq-pdf .lq-pdf-page-input,\n.lq-pdf .lq-pdf-zoom {\n border-color: var(--lq-pdf-muted);\n}\n.lq-pdf-toolstrip-tight > .lq-pdf-style-bar {\n flex: 1 1 0;\n min-width: min(180px, 100%);\n overflow-x: auto;\n scrollbar-width: thin;\n}\n.lq-pdf-toolstrip-tight > .lq-pdf-style-bar > * {\n flex: none;\n}\n.lq-pdf-toolstrip > [hidden] {\n display: none;\n}\n.lq-pdf-tool-compact > span {\n display: none;\n}\n.lq-pdf-tool-text.lq-pdf-tool-compact {\n padding: 0 7px;\n}\n.lq-pdf-strip-group {\n display: inline-flex;\n flex-direction: column;\n align-items: stretch;\n gap: 1px;\n min-width: 0;\n}\n.lq-pdf-strip-group[hidden] {\n display: none;\n}\n.lq-pdf-strip-group-items {\n display: flex;\n align-items: center;\n gap: 2px;\n}\n.lq-pdf-strip-group-items > [hidden] {\n display: none;\n}\n.lq-pdf-strip-caption {\n overflow: hidden;\n color: var(--lq-pdf-muted);\n font-size: 11px;\n line-height: 13px;\n text-align: center;\n text-overflow: ellipsis;\n white-space: nowrap;\n max-width: 100%;\n width: 0;\n min-width: 100%;\n}\n.lq-pdf-toolstrip-captioned > .lq-pdf-separator {\n align-self: stretch;\n height: auto;\n margin-block: 4px;\n}\n.lq-pdf-toolstrip {\n box-sizing: border-box;\n min-height: 51px;\n}\n.lq-pdf-compact .lq-pdf-toolstrip {\n min-height: 0;\n}\n.lq-pdf-compact .lq-pdf-strip-caption {\n display: none;\n}\n.lq-pdf-toolstrip .lq-pdf-tool[aria-disabled=\"true\"] {\n opacity: 0.5;\n}\n.lq-pdf-ocr-banner {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 6px 10px;\n border-bottom: 1px solid var(--lq-pdf-border);\n background: var(--lq-pdf-selection-bg);\n color: var(--lq-pdf-fg);\n}\n.lq-pdf-ocr-banner[hidden],\n.lq-pdf-ocr-banner > [hidden] {\n display: none;\n}\n.lq-pdf-ocr-banner-progress {\n flex: 0 1 160px;\n width: auto;\n}\n.lq-pdf-ocr-banner-text {\n flex: 1 1 200px;\n}\n.lq-pdf-thumb {\n position: relative;\n}\n.lq-pdf-thumb-ocr {\n position: absolute;\n top: 4px;\n inset-inline-end: 4px;\n padding: 1px 5px;\n border-radius: 8px;\n border: 1px solid currentColor;\n background: var(--lq-pdf-chrome-bg);\n color: var(--lq-pdf-fg);\n font-size: 10px;\n font-weight: 600;\n line-height: 14px;\n pointer-events: none;\n}\n.lq-pdf-thumb-ocr[data-state=\"failed\"] {\n color: var(--lq-pdf-danger);\n}\n.lq-pdf-thumb-ocr[data-state=\"running\"] {\n border-style: dashed;\n}\n.lq-pdf-thumb-ocr[data-state=\"no-text\"] {\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-ocr-results {\n margin: 6px 0 0;\n padding-inline-start: 18px;\n max-height: 140px;\n overflow: auto;\n}\n.lq-pdf-ocr-results[hidden],\n.lq-pdf-progress[hidden] {\n display: none;\n}\n.lq-pdf-shortcut-search {\n width: 100%;\n box-sizing: border-box;\n margin-bottom: 6px;\n}\n.lq-pdf-table tr[hidden] {\n display: none;\n}\n.lq-pdf-toolbar-collapsed .lq-pdf-group-menu {\n display: inline-flex;\n}\n.lq-pdf-tool-danger {\n color: var(--lq-pdf-danger);\n}\n.lq-pdf-toolstrip {\n display: flex;\n align-items: center;\n gap: 2px;\n padding: 2px 6px;\n overflow-x: auto;\n border-top: 1px solid var(--lq-pdf-border);\n scrollbar-width: thin;\n}\n.lq-pdf-toolstrip .lq-pdf-tools {\n flex-wrap: nowrap;\n}\n.lq-pdf-style-bar {\n gap: 4px;\n}\n.lq-pdf-style-select,\n.lq-pdf-input {\n height: 28px;\n min-width: 0;\n padding: 0 6px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: 4px;\n background: var(--lq-pdf-bg);\n}\n.lq-pdf-input {\n width: 100%;\n}\n.lq-pdf-input[type=\"color\"] {\n padding: 2px;\n}\n.lq-pdf-input[type=\"range\"] {\n padding: 0;\n border: 0;\n}\n.lq-pdf-input[aria-invalid=\"true\"] {\n border-color: var(--lq-pdf-danger);\n box-shadow: 0 0 0 1px var(--lq-pdf-danger);\n}\n.lq-pdf-style-select {\n max-width: 108px;\n}\n.lq-pdf-style-number {\n width: 58px;\n height: 28px;\n box-sizing: border-box;\n padding: 0 4px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: 4px;\n background: var(--lq-pdf-panel-bg);\n color: inherit;\n font: inherit;\n}\n.lq-pdf-style-range {\n width: 84px;\n accent-color: var(--lq-pdf-accent);\n}\n.lq-pdf-color-chip {\n display: block;\n width: 18px;\n height: 18px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: 50%;\n}\n.lq-pdf-color-none {\n background: linear-gradient(135deg, transparent 46%, var(--lq-pdf-danger) 46%, var(--lq-pdf-danger) 54%, transparent 54%);\n}\n.lq-pdf-check {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n white-space: nowrap;\n}\n.lq-pdf-search-options {\n display: flex;\n flex-wrap: wrap;\n gap: 4px 12px;\n}\n.lq-pdf-search-count {\n min-width: 4.5em;\n}\n.lq-pdf-menu {\n position: absolute;\n z-index: 40;\n display: flex;\n flex-direction: column;\n min-width: 200px;\n max-width: min(340px, calc(100% - 8px));\n max-height: calc(100% - 8px);\n padding: 4px;\n overflow: auto;\n border: 1px solid var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-panel-bg);\n box-shadow: var(--lq-pdf-panel-shadow);\n}\n.lq-pdf-menu-wide {\n min-width: 300px;\n}\n.lq-pdf-menu-item {\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 30px;\n padding: 4px 8px;\n border: 0;\n border-radius: 4px;\n background: transparent;\n text-align: start;\n cursor: pointer;\n}\n.lq-pdf-menu-item:hover,\n.lq-pdf-menu-item:focus-visible {\n background: var(--lq-pdf-selection-bg);\n}\n.lq-pdf-menu-item[aria-disabled=\"true\"] {\n opacity: 0.45;\n cursor: default;\n}\n.lq-pdf-menu-icon {\n display: inline-flex;\n flex: none;\n justify-content: center;\n width: 18px;\n}\n.lq-pdf-menu-label {\n flex: 1 1 auto;\n}\n.lq-pdf-menu-shortcut {\n flex: none;\n font: inherit;\n font-size: 0.85em;\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-menu-danger {\n color: var(--lq-pdf-danger);\n}\n.lq-pdf-menu-separator {\n flex: none;\n height: 1px;\n margin: 4px 0;\n background: var(--lq-pdf-border);\n}\n.lq-pdf-menu-heading {\n padding: 6px 8px 2px;\n font-size: 0.82em;\n font-weight: 600;\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-menu .lq-pdf-swatches {\n padding: 6px 8px;\n}\n.lq-pdf-stamp-grid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 6px;\n padding: 4px 6px 8px;\n}\n.lq-pdf-stamp-option {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n min-height: 38px;\n padding: 4px 6px;\n border: 2px solid currentColor;\n border-radius: 6px;\n background: transparent;\n font-size: 0.82em;\n letter-spacing: 0.04em;\n cursor: pointer;\n}\n.lq-pdf-stamp-option small {\n font-size: 0.8em;\n letter-spacing: 0;\n text-transform: none;\n}\n.lq-pdf-stamp-option[aria-pressed=\"true\"] {\n background: var(--lq-pdf-selection-bg);\n}\n.lq-pdf-dialog {\n max-height: calc(100% - 24px);\n}\n.lq-pdf-dialog-small {\n width: min(380px, calc(100% - 24px));\n}\n.lq-pdf-dialog-large {\n width: min(720px, calc(100% - 24px));\n}\n.lq-pdf-dialog-full {\n width: calc(100% - 24px);\n height: calc(100% - 24px);\n}\n.lq-pdf-dialog-header {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.lq-pdf-dialog-header h2 {\n flex: 1 1 auto;\n}\n.lq-pdf-dialog-icon {\n display: inline-flex;\n flex: none;\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-icon-button,\n.lq-pdf-toast-close,\n.lq-pdf-rich-button,\n.lq-pdf-doctab-close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n.lq-pdf-icon-button svg,\n.lq-pdf-toast-close svg,\n.lq-pdf-rich-button svg,\n.lq-pdf-doctab-close svg {\n flex: none;\n width: 16px;\n height: 16px;\n}\n.lq-pdf-menu-icon svg {\n width: 16px;\n height: 16px;\n}\n.lq-pdf-panel-title {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n.lq-pdf-panel-title svg {\n flex: none;\n width: 16px;\n height: 16px;\n}\n.lq-pdf-dialog-header .lq-pdf-icon-button,\n.lq-pdf-popover-header .lq-pdf-icon-button {\n width: 28px;\n height: 28px;\n border-radius: 4px;\n font-size: 18px;\n line-height: 1;\n}\n.lq-pdf-icon-button:hover {\n background: var(--lq-pdf-selection-bg);\n}\n.lq-pdf-dialog-body {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 10px;\n min-height: 0;\n overflow: auto;\n}\n.lq-pdf-dialog-body > p {\n margin: 0;\n}\n.lq-pdf-dialog-actions {\n flex-wrap: wrap;\n align-items: center;\n}\n.lq-pdf-dialog-actions:empty {\n display: none;\n}\n.lq-pdf-signature-save {\n margin-inline-end: auto;\n}\n.lq-pdf-dialog-scroll {\n max-height: 56vh;\n overflow: auto;\n}\n.lq-pdf-form-row {\n display: flex;\n flex-direction: column;\n gap: 3px;\n}\n.lq-pdf-form-row[hidden] {\n display: none;\n}\n.lq-pdf-form-label {\n font-size: 0.92em;\n font-weight: 600;\n}\n.lq-pdf-form-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n gap: 8px;\n}\n.lq-pdf-fieldset {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0;\n padding: 8px 10px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n}\n.lq-pdf-file-row {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.lq-pdf-error {\n margin: 0;\n color: var(--lq-pdf-danger);\n}\n.lq-pdf-error:empty {\n display: none;\n}\n.lq-pdf-progress {\n width: 100%;\n accent-color: var(--lq-pdf-accent);\n}\n.lq-pdf-table {\n width: 100%;\n border-collapse: collapse;\n}\n.lq-pdf-table th,\n.lq-pdf-table td {\n padding: 4px 6px;\n border-bottom: 1px solid var(--lq-pdf-border);\n text-align: start;\n}\n.lq-pdf kbd {\n padding: 1px 5px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: 4px;\n background: var(--lq-pdf-chrome-bg);\n font: inherit;\n font-size: 0.9em;\n}\n.lq-pdf-facts {\n display: grid;\n grid-template-columns: max-content 1fr;\n gap: 4px 12px;\n margin: 0;\n}\n.lq-pdf-facts dt {\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-facts dd {\n margin: 0;\n overflow-wrap: anywhere;\n}\n.lq-pdf-tabs {\n flex: none;\n overflow-x: auto;\n scrollbar-width: none;\n}\n.lq-pdf-tab {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 28px;\n min-height: 32px;\n}\n.lq-pdf-tabs [aria-selected=\"true\"] {\n color: var(--lq-pdf-accent);\n}\n.lq-pdf-dialog .lq-pdf-tabs [role=\"tab\"] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n.lq-pdf-dialog .lq-pdf-tabs [role=\"tab\"] svg {\n flex: none;\n width: 16px;\n height: 16px;\n}\n.lq-pdf-panel-title {\n flex: none;\n padding: 6px 10px 4px;\n font-size: 0.85em;\n font-weight: 600;\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-panel-note {\n margin: 0;\n padding: 6px 10px;\n}\n.lq-pdf-page-tools {\n flex: none;\n flex-wrap: wrap;\n}\n.lq-pdf-annotation-item mark {\n background: var(--lq-pdf-search-hit);\n color: inherit;\n}\n.lq-pdf-redact-form {\n display: flex;\n flex: none;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n}\n.lq-pdf-redact-item {\n display: flex;\n align-items: center;\n gap: 2px;\n}\n.lq-pdf-redact-item .lq-pdf-annotation-item {\n flex: 1 1 auto;\n min-width: 0;\n grid-template-columns: 1fr;\n}\n.lq-pdf-redact-item .lq-pdf-annotation-item > * {\n grid-column: 1;\n}\n.lq-pdf-panel-footer {\n flex: none;\n align-items: center;\n}\n.lq-pdf-signature-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n margin: 0;\n padding: 8px;\n list-style: none;\n}\n.lq-pdf-signature-card {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 8px 10px;\n border: 1px solid var(--lq-pdf-border);\n border-inline-start: 4px solid var(--lq-pdf-muted);\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-bg);\n overflow-wrap: anywhere;\n}\n.lq-pdf-signature-card[role=\"button\"] {\n cursor: pointer;\n}\n.lq-pdf-signature-valid {\n border-inline-start-color: var(--lq-pdf-page-success);\n}\n.lq-pdf-signature-warning {\n border-inline-start-color: var(--lq-pdf-page-warning);\n}\n.lq-pdf-signature-invalid {\n border-inline-start-color: var(--lq-pdf-danger);\n}\n.lq-pdf-signature-invalid .lq-pdf-signature-status {\n color: var(--lq-pdf-danger);\n}\n.lq-pdf-signature-line {\n font-size: 0.92em;\n}\n.lq-pdf-page-loading {\n background: var(--lq-pdf-page-bg) linear-gradient(100deg, var(--lq-pdf-page-bg) 30%, var(--lq-pdf-page-loading-sheen) 50%, var(--lq-pdf-page-bg) 70%) 0 0 / 200% 100%;\n animation: lq-pdf-shimmer 1.4s linear infinite;\n}\n@keyframes lq-pdf-shimmer {\n to {\n background-position: -200% 0;\n }\n}\n.lq-pdf-detail {\n inset: auto;\n}\n.lq-pdf-selection-locked {\n stroke: var(--lq-pdf-muted);\n stroke-dasharray: 1 3;\n}\n.lq-pdf-freetext {\n white-space: pre;\n user-select: none;\n}\n.lq-pdf[data-tool=\"cloud\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"callout\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"eraser\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"marqueeZoom\"] .lq-pdf-page {\n cursor: crosshair;\n touch-action: none;\n user-select: none;\n}\n.lq-pdf[data-tool=\"marqueeZoom\"] .lq-pdf-page {\n cursor: zoom-in;\n}\n.lq-pdf[data-tool=\"eraser\"] .lq-pdf-page {\n cursor: cell;\n}\n.lq-pdf[data-tool=\"highlight\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"underline\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"strikeout\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"squiggly\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"insertText\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"replaceText\"] .lq-pdf-page,\n.lq-pdf[data-tool=\"redaction\"] .lq-pdf-page {\n cursor: text;\n}\n.lq-pdf[data-scroll-mode=\"page\"] .lq-pdf-pages {\n min-height: 100%;\n}\n.lq-pdf-presentation {\n border: 0;\n border-radius: 0;\n}\n.lq-pdf-presentation .lq-pdf-toolbar-wrap,\n.lq-pdf-presentation .lq-pdf-sidebar {\n display: none;\n}\n.lq-pdf-presentation .lq-pdf-viewport {\n background: var(--lq-pdf-presentation-bg);\n}\n.lq-pdf-presentation-fallback {\n position: fixed;\n inset: 0;\n z-index: 2147483000;\n}\n.lq-pdf-attachment-zone {\n display: flex;\n flex-direction: column;\n gap: 8px;\n min-height: 100%;\n border: 2px dashed transparent;\n border-radius: var(--lq-pdf-radius);\n}\n.lq-pdf-attachment-dropping {\n border-color: var(--lq-pdf-accent);\n background: var(--lq-pdf-selection-bg);\n}\n.lq-pdf-attachment-notice {\n margin: 0;\n padding: 6px 8px;\n border-inline-start: 3px solid var(--lq-pdf-accent);\n font-size: 0.92em;\n}\n.lq-pdf-attachment-row {\n display: flex;\n align-items: center;\n gap: 6px;\n border-radius: var(--lq-pdf-radius);\n}\ntr.lq-pdf-attachment-row {\n display: table-row;\n}\n.lq-pdf-attachment-row:focus-visible {\n outline: 2px solid var(--lq-pdf-accent);\n outline-offset: -2px;\n}\n.lq-pdf-attachment-text {\n display: flex;\n flex: 1;\n flex-direction: column;\n min-width: 0;\n padding: 4px 6px;\n overflow-wrap: anywhere;\n}\n.lq-pdf-attachment-actions {\n display: inline-flex;\n flex-shrink: 0;\n gap: 2px;\n}\n.lq-pdf-attachment-scroll {\n overflow-x: auto;\n}\n.lq-pdf-attachment-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 0.92em;\n}\n.lq-pdf-attachment-table th,\n.lq-pdf-attachment-table td {\n padding: 4px 6px;\n border-bottom: 1px solid var(--lq-pdf-border);\n text-align: start;\n vertical-align: middle;\n overflow-wrap: anywhere;\n}\n.lq-pdf-attachment-table thead th {\n color: var(--lq-pdf-muted);\n font-weight: 600;\n white-space: nowrap;\n}\n.lq-pdf-attachment-table tr[data-initial=\"true\"] th {\n font-weight: 700;\n}\n.lq-pdf-dropping::after {\n content: attr(data-drop-label);\n position: absolute;\n inset: 8px;\n z-index: 50;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 2px dashed var(--lq-pdf-accent);\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-selection-bg);\n font-size: 1.2em;\n font-weight: 600;\n pointer-events: none;\n}\n.lq-pdf-compact .lq-pdf-sidebar {\n position: absolute;\n inset: 0 auto 0 0;\n z-index: 15;\n width: min(280px, 86%);\n box-shadow: var(--lq-pdf-panel-shadow);\n}\n.lq-pdf-compact[dir=\"rtl\"] .lq-pdf-sidebar {\n inset: 0 0 0 auto;\n}\n.lq-pdf-compact .lq-pdf-tool {\n min-width: 36px;\n height: 36px;\n}\n.lq-pdf-compact .lq-pdf-menu-item {\n min-height: 40px;\n}\n.lq-pdf-narrow .lq-pdf-page-total,\n.lq-pdf-narrow .lq-pdf-tool-text span {\n display: none;\n}\n.lq-pdf-narrow .lq-pdf-popover {\n inset: auto 0 0 0 !important;\n width: auto;\n max-height: 60%;\n border-radius: 12px 12px 0 0;\n}\n.lq-pdf-narrow .lq-pdf-dialog {\n width: calc(100% - 12px);\n padding: 12px;\n}\n.lq-pdf[dir=\"rtl\"] .lq-pdf-sidebar {\n border-right: 0;\n border-left: 1px solid var(--lq-pdf-border);\n}\n.lq-pdf-compare-bar {\n display: flex;\n flex: none;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n}\n.lq-pdf-compare-bar .lq-pdf-button[aria-pressed=\"true\"] {\n border-color: var(--lq-pdf-accent);\n color: var(--lq-pdf-accent);\n font-weight: 600;\n}\n.lq-pdf-compare-layout {\n display: flex;\n flex: 1 1 auto;\n gap: 8px;\n min-height: 0;\n}\n.lq-pdf-compare-panes {\n display: grid;\n flex: 1 1 auto;\n grid-template-columns: 1fr 1fr;\n gap: 8px;\n min-width: 0;\n min-height: 0;\n}\n.lq-pdf-compare-pane {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n}\n.lq-pdf-compare-title {\n flex: none;\n margin: 0 0 4px;\n overflow: hidden;\n font-size: 0.92em;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.lq-pdf-compare-scroll {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 8px;\n min-height: 0;\n padding: 8px;\n overflow: auto;\n background: var(--lq-pdf-canvas-bg);\n}\n.lq-pdf-compare-page {\n position: relative;\n flex: none;\n width: 100%;\n background: var(--lq-pdf-page-bg);\n box-shadow: var(--lq-pdf-page-shadow);\n}\n.lq-pdf-compare-page canvas {\n display: block;\n width: 100%;\n height: 100%;\n}\n.lq-pdf-compare-missing {\n background: repeating-linear-gradient(45deg, transparent 0 8px, var(--lq-pdf-compare-missing) 8px 16px);\n box-shadow: none;\n}\n.lq-pdf-compare-mark {\n position: absolute;\n border-radius: 2px;\n mix-blend-mode: multiply;\n}\n.lq-pdf-compare-mark.lq-pdf-compare-inserted {\n background: var(--lq-pdf-compare-inserted);\n}\n.lq-pdf-compare-mark.lq-pdf-compare-deleted {\n background: var(--lq-pdf-compare-deleted);\n}\n.lq-pdf-compare-mark.lq-pdf-compare-moved {\n background: var(--lq-pdf-compare-moved);\n}\n.lq-pdf-compare-current {\n outline: 2px solid var(--lq-pdf-page-warning);\n outline-offset: 1px;\n}\n.lq-pdf-compare-overlay {\n grid-template-columns: 1fr;\n}\n.lq-pdf-compare-overlay .lq-pdf-compare-pane {\n grid-area: 1 / 1;\n}\n.lq-pdf-compare-overlay .lq-pdf-compare-b {\n mix-blend-mode: multiply;\n pointer-events: none;\n}\n.lq-pdf-compare-overlay .lq-pdf-compare-b .lq-pdf-compare-scroll {\n background: transparent;\n}\n.lq-pdf-compare-modes,\n.lq-pdf-compare-opacity {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n.lq-pdf-compare-opacity[hidden],\n.lq-pdf-compare-list[hidden] {\n display: none;\n}\n.lq-pdf-compare-visual {\n position: absolute;\n inset: 0;\n display: none;\n pointer-events: none;\n}\n.lq-pdf-compare-visual-mode .lq-pdf-compare-visual {\n display: block;\n}\n.lq-pdf-compare-visual-mode .lq-pdf-compare-mark {\n display: none;\n}\n.lq-pdf-compare-page canvas.lq-pdf-compare-diff {\n position: absolute;\n opacity: var(--lq-pdf-compare-diff-opacity);\n}\n.lq-pdf-compare-region {\n position: absolute;\n box-sizing: border-box;\n min-width: 6px;\n min-height: 6px;\n border: 2px solid var(--lq-pdf-page-danger);\n border-radius: 2px;\n}\n.lq-pdf-compare-item.lq-pdf-compare-area {\n border-inline-start-color: var(--lq-pdf-page-danger);\n}\n.lq-pdf-compare-list {\n flex: none;\n width: 240px;\n margin: 0;\n padding: 0;\n overflow: auto;\n list-style: none;\n}\n.lq-pdf-compare-item {\n display: flex;\n flex-direction: column;\n gap: 2px;\n width: 100%;\n margin: 0 0 4px;\n padding: 6px 8px;\n border: 1px solid var(--lq-pdf-border);\n border-inline-start: 4px solid var(--lq-pdf-muted);\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-bg);\n text-align: start;\n overflow-wrap: anywhere;\n cursor: pointer;\n}\n.lq-pdf-compare-item.lq-pdf-compare-inserted {\n border-inline-start-color: var(--lq-pdf-page-success);\n}\n.lq-pdf-compare-item.lq-pdf-compare-deleted {\n border-inline-start-color: var(--lq-pdf-page-danger);\n}\n.lq-pdf-compare-item.lq-pdf-compare-moved {\n border-inline-start-color: var(--lq-pdf-page-accent);\n}\n.lq-pdf-compare-item[aria-current=\"true\"] {\n background: var(--lq-pdf-selection-bg);\n}\n.lq-pdf-narrow .lq-pdf-compare-list {\n display: none;\n}\n.lq-pdf-narrow .lq-pdf-compare-panes {\n grid-template-columns: 1fr;\n grid-auto-rows: 1fr;\n}\n@media print {\n .lq-pdf-print-landscape {\n break-before: page;\n }\n html.lq-pdf-printing,\n html.lq-pdf-printing body {\n margin: 0 !important;\n padding: 0 !important;\n background: #ffffff !important;\n }\n .lq-pdf-print-page {\n height: 100vh;\n overflow: hidden;\n break-inside: avoid;\n }\n .lq-pdf-print-page:last-of-type {\n break-after: auto;\n page-break-after: auto;\n }\n .lq-pdf-print-root[data-print-scale=\"fit\"] .lq-pdf-print-page {\n width: min(100vw, calc(100vh * var(--lq-pdf-print-ratio, 0.7071)));\n height: auto;\n margin: 0 auto;\n }\n .lq-pdf-print-root[data-print-scale=\"custom\"] .lq-pdf-print-page {\n height: auto;\n }\n .lq-pdf-print-page img {\n object-fit: contain;\n }\n}\n@media (forced-colors: active) {\n .lq-pdf-tool[aria-pressed=\"true\"],\n .lq-pdf-group-button[aria-selected=\"true\"],\n .lq-pdf-menu-item:focus-visible,\n .lq-pdf-tabs [aria-selected=\"true\"],\n .lq-pdf-annotation-item[aria-current=\"true\"],\n .lq-pdf-thumb[aria-selected=\"true\"] .lq-pdf-thumb-frame {\n outline: 2px solid Highlight;\n outline-offset: -2px;\n }\n .lq-pdf-menu,\n .lq-pdf-dialog,\n .lq-pdf-popover {\n border: 1px solid CanvasText;\n }\n .lq-pdf-search-hit,\n .lq-pdf-compare-mark {\n forced-color-adjust: none;\n }\n .lq-pdf-color-chip,\n .lq-pdf-swatch {\n forced-color-adjust: none;\n }\n .lq-pdf-page {\n forced-color-adjust: none;\n outline: 1px solid CanvasText;\n }\n}\n.lq-pdf-text-end {\n position: absolute;\n inset: 100% 0 0;\n z-index: -1;\n cursor: default;\n user-select: none;\n}\n.lq-pdf-text br {\n user-select: none;\n}\n.lq-pdf-toolbar {\n overflow-x: auto;\n scrollbar-width: none;\n}\n.lq-pdf-narrow .lq-pdf-zoom-step,\n.lq-pdf-narrow .lq-pdf-pointer-tools [data-tool=\"pan\"],\n.lq-pdf-narrow .lq-pdf-pointer-tools [data-tool=\"marqueeZoom\"],\n.lq-pdf-narrow .lq-pdf-toolbar > .lq-pdf-separator {\n display: none;\n}\n.lq-pdf-narrow .lq-pdf-toolbar {\n gap: 0;\n padding: 4px 2px;\n}\n.lq-pdf-narrow .lq-pdf-toolstrip {\n flex-wrap: wrap;\n overflow-x: hidden;\n row-gap: 4px;\n}\n.lq-pdf-narrow .lq-pdf-toolstrip .lq-pdf-tools,\n.lq-pdf-narrow .lq-pdf-toolstrip .lq-pdf-style-bar {\n flex-wrap: wrap;\n flex: 0 1 auto;\n min-width: 0;\n}\n.lq-pdf-narrow .lq-pdf-toolstrip > .lq-pdf-separator {\n display: none;\n}\n.lq-pdf-narrow .lq-pdf-zoom {\n max-width: 76px;\n}\n.lq-pdf kbd,\n.lq-pdf-menu-shortcut {\n direction: ltr;\n unicode-bidi: isolate;\n}\n.lq-pdf .lq-pdf-primary {\n color: var(--lq-pdf-accent-fg);\n}\n.lq-pdf .lq-pdf-primary:hover {\n background: var(--lq-pdf-accent);\n filter: brightness(1.08);\n}\n.lq-pdf .lq-pdf-danger {\n color: var(--lq-pdf-danger);\n}\n.lq-pdf .lq-pdf-button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n.lq-pdf .lq-pdf-tool[aria-disabled=\"true\"],\n.lq-pdf .lq-pdf-button[aria-disabled=\"true\"] {\n opacity: 0.4;\n cursor: not-allowed;\n}\n.lq-pdf .lq-pdf-tool[aria-disabled=\"true\"]:hover,\n.lq-pdf .lq-pdf-button[aria-disabled=\"true\"]:hover {\n background: transparent;\n}\n.lq-pdf-filters {\n flex-wrap: wrap;\n}\n.lq-pdf-filters select {\n flex: 1 1 45%;\n}\n.lq-pdf-comment-search {\n flex: 1 1 100%;\n min-width: 0;\n}\n.lq-pdf-comment-count {\n margin: 0;\n padding: 0 10px 4px;\n font-size: 0.85em;\n}\n.lq-pdf-popover-note {\n margin: 0;\n font-size: 0.85em;\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-thread .lq-pdf-reply-actions {\n display: flex;\n gap: 10px;\n}\n.lq-pdf-thread textarea {\n width: 100%;\n box-sizing: border-box;\n}\n.lq-pdf-tab-order {\n padding: 6px;\n border-top: 1px solid var(--lq-pdf-border);\n}\n.lq-pdf-panel-subtitle {\n margin: 4px 2px 6px;\n font-size: 0.85em;\n font-weight: 600;\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-tab-order-modes {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n margin-bottom: 6px;\n}\n.lq-pdf-tab-order-modes .lq-pdf-button[aria-pressed=\"true\"] {\n border-color: var(--lq-pdf-accent);\n box-shadow: inset 0 0 0 1px var(--lq-pdf-accent);\n}\n.lq-pdf-tab-order-list {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.lq-pdf-calc-order-item,\n.lq-pdf-tab-order-item {\n display: grid;\n grid-template-columns: 22px 1fr auto auto;\n align-items: center;\n gap: 4px;\n padding: 3px 4px;\n margin: 2px 0;\n border: 1px solid var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-bg);\n cursor: grab;\n}\n.lq-pdf-tab-order-item.lq-pdf-drop-before {\n border-top: 2px solid var(--lq-pdf-accent);\n}\n.lq-pdf-tab-order-number {\n color: var(--lq-pdf-muted);\n font-variant-numeric: tabular-nums;\n text-align: right;\n}\n.lq-pdf-tab-order-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.lq-pdf-tab-order-item .lq-pdf-icon-button {\n min-width: 24px;\n min-height: 24px;\n}\n.lq-pdf-tab-order-item .lq-pdf-icon-button:disabled {\n opacity: 0.35;\n cursor: default;\n}\n.lq-pdf-presence {\n position: absolute;\n left: 0;\n top: 0;\n z-index: 6;\n width: 0;\n height: 0;\n pointer-events: none;\n border-top: 12px solid var(--lq-pdf-presence-color, var(--lq-pdf-presence-default));\n border-right: 12px solid transparent;\n transition: transform 80ms linear;\n}\n.lq-pdf-presence-name {\n position: absolute;\n left: 10px;\n top: 2px;\n padding: 1px 6px;\n border-radius: 8px;\n background: var(--lq-pdf-presence-color, var(--lq-pdf-presence-default));\n color: var(--lq-pdf-presence-fg);\n font: 600 11px/1.4 var(--lq-font-family, system-ui, sans-serif);\n white-space: nowrap;\n}\n@media (prefers-reduced-motion: reduce) {\n .lq-pdf-presence {\n transition: none;\n }\n}\n.lq-pdf-field-message {\n position: absolute;\n z-index: 2;\n max-width: 260px;\n padding: 1px 5px;\n border: 1px solid var(--lq-pdf-page-danger);\n border-radius: 3px;\n background: var(--lq-pdf-page-danger-bg);\n color: var(--lq-pdf-page-danger-fg);\n font-size: 11px;\n line-height: 1.35;\n pointer-events: none;\n white-space: normal;\n}\n.lq-pdf-field-message.lq-pdf-field-hint {\n border-color: var(--lq-pdf-page-hint);\n background: var(--lq-pdf-page-hint-bg);\n color: var(--lq-pdf-page-hint-fg);\n}\n.lq-pdf-highlight-required .lq-pdf-field-required:not(:disabled) {\n border: 2px solid var(--lq-pdf-page-danger);\n background: var(--lq-pdf-field-required-bg);\n}\n.lq-pdf-highlight-required input.lq-pdf-field-required[type=\"checkbox\"],\n.lq-pdf-highlight-required input.lq-pdf-field-required[type=\"radio\"] {\n outline: 2px solid var(--lq-pdf-page-danger);\n outline-offset: 1px;\n}\n.lq-pdf-field-comb {\n padding: 0;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n letter-spacing: calc(var(--lq-pdf-comb-cell, 1ch) - 1ch);\n padding-inline-start: calc((var(--lq-pdf-comb-cell, 1ch) - 1ch) / 2);\n background-image: repeating-linear-gradient(\n to right,\n transparent 0,\n transparent calc(var(--lq-pdf-comb-cell, 1ch) - 1px),\n var(--lq-pdf-field-border) calc(var(--lq-pdf-comb-cell, 1ch) - 1px),\n var(--lq-pdf-field-border) var(--lq-pdf-comb-cell, 1ch)\n );\n box-sizing: border-box;\n border-inline-width: 0;\n}\n.lq-pdf-field-rich {\n position: absolute;\n overflow: hidden;\n padding: 1px 3px;\n box-sizing: border-box;\n color: var(--lq-pdf-page-fg);\n pointer-events: none;\n white-space: pre-wrap;\n line-height: 1.2;\n}\n.lq-pdf-field-has-rich:not(:focus) {\n color: transparent;\n}\n.lq-pdf-field-has-rich:focus + .lq-pdf-field-rich {\n display: none;\n}\n.lq-pdf-field-barcode {\n border-style: dashed;\n background: repeating-linear-gradient(90deg, var(--lq-pdf-barcode-stripe) 0 2px, transparent 2px 5px);\n}\n.lq-pdf-field-button:not(:disabled) {\n cursor: pointer;\n background: var(--lq-pdf-field-button-bg);\n}\n.lq-pdf-field-filled,\n.lq-pdf-field-filled:focus {\n background: transparent;\n}\n.lq-pdf-form-section {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 8px;\n border-top: 1px solid var(--lq-pdf-border);\n}\n.lq-pdf-form-section > .lq-pdf-panel-subtitle {\n margin: 0;\n}\n.lq-pdf-form-section select,\n.lq-pdf-form-section textarea {\n width: 100%;\n box-sizing: border-box;\n padding: 4px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: 4px;\n background: var(--lq-pdf-bg);\n color: var(--lq-pdf-fg);\n}\n.lq-pdf-form-section .lq-pdf-field {\n position: static;\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 0;\n border: 0;\n background: transparent;\n color: inherit;\n}\n.lq-pdf-form-section .lq-pdf-field[hidden] {\n display: none;\n}\n.lq-pdf-form-buttons {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n}\n.lq-pdf-arrange-button {\n min-width: 28px;\n min-height: 28px;\n border: 1px solid var(--lq-pdf-border);\n}\n.lq-pdf-form-problem-text {\n color: var(--lq-pdf-danger);\n}\n.lq-pdf-calc-status[data-status=\"supported\"]::before {\n content: \"✓ \";\n}\n.lq-pdf-calc-status[data-status=\"unsupported\"]::before {\n content: \"✕ \";\n}\n.lq-pdf-calc-status[data-status=\"unsupported\"] {\n color: var(--lq-pdf-danger);\n}\n.lq-pdf-calc-status {\n margin: 0;\n}\n.lq-pdf-choices {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.lq-pdf-choice {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 10px 12px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-bg);\n color: var(--lq-pdf-fg);\n font: inherit;\n text-align: start;\n cursor: pointer;\n}\n.lq-pdf-choice:hover {\n border-color: var(--lq-pdf-accent);\n}\n.lq-pdf-choice-title {\n font-weight: 600;\n}\n.lq-pdf-organizer .lq-pdf-dialog-body {\n overflow: hidden;\n}\n.lq-pdf-organizer-toolbar {\n display: flex;\n flex-wrap: wrap;\n gap: 6px 14px;\n flex: 0 0 auto;\n}\n.lq-pdf-organizer-group {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px;\n}\n.lq-pdf-organizer-group-label {\n font-size: 0.8em;\n font-weight: 600;\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-organizer-range {\n width: 150px;\n}\n.lq-pdf-organizer-status {\n flex: 0 0 auto;\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-organizer-main {\n display: flex;\n flex: 1 1 auto;\n gap: 10px;\n min-height: 0;\n}\n.lq-pdf-organizer-grid {\n position: relative;\n flex: 1 1 auto;\n min-width: 0;\n overflow: auto;\n border: 1px solid var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-canvas-bg);\n}\n.lq-pdf-organizer-grid:focus-visible {\n outline: 2px solid var(--lq-pdf-focus);\n outline-offset: -2px;\n}\n.lq-pdf-organizer-sizer {\n position: relative;\n min-height: 100%;\n}\n.lq-pdf-organizer-cell {\n position: absolute;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n gap: 6px;\n width: 172px;\n height: 236px;\n padding: 10px 0 8px;\n box-sizing: border-box;\n cursor: default;\n user-select: none;\n}\n.lq-pdf-organizer-frame {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 148px;\n height: 188px;\n border: 3px solid transparent;\n border-radius: 3px;\n box-sizing: border-box;\n cursor: grab;\n}\n.lq-pdf-organizer-frame canvas {\n pointer-events: none;\n}\n.lq-pdf-organizer-actions {\n position: absolute;\n top: 14px;\n inset-inline-end: 16px;\n display: none;\n gap: 2px;\n padding: 2px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-panel-bg);\n color: var(--lq-pdf-fg);\n}\n.lq-pdf-organizer-cell:hover .lq-pdf-organizer-actions,\n.lq-pdf-organizer-grid:focus-visible .lq-pdf-organizer-focus .lq-pdf-organizer-actions {\n display: flex;\n}\n.lq-pdf-organizer-action {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n border-radius: 3px;\n cursor: pointer;\n}\n.lq-pdf-organizer-action:hover {\n background: var(--lq-pdf-selection-bg);\n}\n.lq-pdf-organizer-action[data-cell-action=\"delete\"] {\n color: var(--lq-pdf-danger);\n}\n.lq-pdf-organizer-dragging .lq-pdf-organizer-cell {\n pointer-events: none;\n}\n.lq-pdf-organizer-band {\n position: absolute;\n border: 1px solid var(--lq-pdf-accent);\n background: var(--lq-pdf-selection-bg);\n opacity: 0.6;\n pointer-events: none;\n}\n.lq-pdf-organizer-zoom {\n width: 120px;\n accent-color: var(--lq-pdf-accent);\n}\n.lq-pdf-toolstrip-pages {\n flex-wrap: wrap;\n overflow-x: hidden;\n row-gap: 2px;\n}\n.lq-pdf-merge-drop {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 10px;\n padding: 12px;\n border: 1px dashed var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n}\n.lq-pdf-merge-drop-active {\n border-color: var(--lq-pdf-accent);\n background: var(--lq-pdf-selection-bg);\n}\n.lq-pdf-merge-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n margin: 0;\n padding: 0;\n list-style: none;\n max-height: 260px;\n overflow-y: auto;\n}\n.lq-pdf-merge-list:empty {\n display: none;\n}\n.lq-pdf-merge-row {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 4px 6px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n background: var(--lq-pdf-panel-bg);\n}\n.lq-pdf-merge-before {\n box-shadow: 0 -3px 0 var(--lq-pdf-accent);\n}\n.lq-pdf-merge-after {\n box-shadow: 0 3px 0 var(--lq-pdf-accent);\n}\n.lq-pdf-merge-name {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-width: 0;\n cursor: grab;\n user-select: none;\n}\n.lq-pdf-merge-title {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 600;\n}\n.lq-pdf-merge-pages {\n flex: 0 0 130px;\n width: 130px;\n}\n.lq-pdf-merge-result {\n display: flex;\n flex-direction: column;\n gap: 6px;\n margin: 0;\n padding: 8px 10px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n}\n.lq-pdf-merge-progress {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n.lq-pdf-merge-progress[hidden] {\n display: none;\n}\n.lq-pdf-merge-progress progress {\n flex: 1 1 auto;\n accent-color: var(--lq-pdf-accent);\n}\n.lq-pdf-organizer-frame canvas {\n max-width: 100%;\n max-height: 100%;\n background: var(--lq-pdf-page-bg);\n box-shadow: var(--lq-pdf-page-shadow);\n}\n.lq-pdf-organizer-cell[aria-selected=\"true\"] .lq-pdf-organizer-frame {\n border-color: var(--lq-pdf-accent);\n background: var(--lq-pdf-selection-bg);\n}\n.lq-pdf-organizer-cell[aria-selected=\"true\"] .lq-pdf-thumbnail-label {\n font-weight: 700;\n text-decoration: underline;\n}\n.lq-pdf-organizer-grid:focus-visible .lq-pdf-organizer-focus .lq-pdf-organizer-frame,\n.lq-pdf-organizer-source:focus-visible .lq-pdf-organizer-frame {\n outline: 2px solid var(--lq-pdf-focus);\n outline-offset: 2px;\n}\n.lq-pdf-organizer-cell .lq-pdf-thumbnail-label {\n padding: 0 6px;\n border-radius: 3px;\n background: var(--lq-pdf-panel-bg);\n color: var(--lq-pdf-fg);\n font-variant-numeric: tabular-nums;\n}\n.lq-pdf-organizer-marker {\n position: absolute;\n width: 4px;\n height: 236px;\n margin-left: -2px;\n background: var(--lq-pdf-accent);\n pointer-events: none;\n}\n.lq-pdf-organizer-second {\n display: flex;\n flex: 0 0 210px;\n flex-direction: column;\n gap: 6px;\n min-height: 0;\n padding: 8px;\n border: 1px solid var(--lq-pdf-border);\n border-radius: var(--lq-pdf-radius);\n}\n.lq-pdf-organizer-second[hidden] {\n display: none;\n}\n.lq-pdf-organizer-second p,\n.lq-pdf-organizer-second h3 {\n margin: 0;\n}\n.lq-pdf-organizer-second-list {\n flex: 1 1 auto;\n min-height: 0;\n overflow: auto;\n background: var(--lq-pdf-canvas-bg);\n}\n.lq-pdf-organizer-source {\n position: static;\n outline: none;\n}\n.lq-pdf-accessibility-summary {\n margin: 0 0 8px;\n font-weight: 600;\n}\n.lq-pdf-accessibility-summary[data-state=\"error\"] {\n color: var(--lq-pdf-danger);\n}\n.lq-pdf-accessibility-list {\n margin: 0 0 12px;\n padding: 0;\n list-style: none;\n max-height: 40vh;\n overflow: auto;\n}\n.lq-pdf-accessibility-item {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 4px 0;\n}\n.lq-pdf-accessibility-item > span:nth-child(2) {\n flex: 1 1 auto;\n}\n.lq-pdf-accessibility-mark {\n display: inline-flex;\n color: var(--lq-pdf-muted);\n}\n.lq-pdf-accessibility-item[data-severity=\"error\"] .lq-pdf-accessibility-mark {\n color: var(--lq-pdf-danger);\n}\n.lq-pdf-accessibility-item .lq-pdf-link-button {\n min-height: 24px;\n padding: 0 4px;\n}\n.lq-pdf-accessibility-controls {\n display: flex;\n gap: 8px;\n}\n.lq-pdf-accessibility-controls > .lq-pdf-input {\n flex: 1 1 auto;\n min-width: 0;\n}\n.lq-pdf-organizer-drop-target {\n outline: 2px solid var(--lq-pdf-accent);\n outline-offset: -2px;\n}\n.lq-pdf-organizer-drop-before {\n box-shadow: 0 -3px 0 var(--lq-pdf-accent);\n}\n.lq-pdf-organizer-drop-after {\n box-shadow: 0 3px 0 var(--lq-pdf-accent);\n}\n.lq-pdf-boxes-layout {\n display: flex;\n flex-wrap: wrap;\n gap: 14px;\n}\n.lq-pdf-boxes-table {\n display: flex;\n flex: 1 1 380px;\n flex-direction: column;\n gap: 6px;\n}\n.lq-pdf-boxes-row {\n display: grid;\n grid-template-columns: 110px repeat(4, minmax(0, 1fr));\n align-items: center;\n gap: 4px;\n}\n.lq-pdf-boxes-row .lq-pdf-input {\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n}\n.lq-pdf-boxes-name {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n.lq-pdf-boxes-swatch {\n width: 12px;\n height: 12px;\n border: 2px solid;\n box-sizing: border-box;\n}\n.lq-pdf-boxes-preview {\n flex: 0 0 180px;\n width: 180px;\n height: 230px;\n background: var(--lq-pdf-canvas-bg);\n}\n.lq-pdf-label-ranges {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.lq-pdf-label-range {\n display: grid;\n grid-template-columns: 90px 1fr 1fr 100px auto;\n align-items: end;\n gap: 6px;\n}\n.lq-pdf-label-range .lq-pdf-input {\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n}\n.lq-pdf-input[aria-invalid=\"true\"] {\n border-color: var(--lq-pdf-danger);\n box-shadow: 0 0 0 1px var(--lq-pdf-danger);\n}\n.lq-pdf {\n --lq-pdf-surface-2: var(--lq-surface-2, var(--lq-pdf-chrome-bg));\n --lq-pdf-border-subtle: var(--lq-border-subtle, #e6eaef);\n --lq-pdf-input-border: var(--lq-input-border, #818b98);\n --lq-pdf-hover: var(--lq-row-hover, #eef2f6);\n --lq-pdf-radius-control: var(--lq-radius-control, 4px);\n --lq-pdf-radius-surface: var(--lq-radius-surface, var(--lq-pdf-radius));\n --lq-pdf-radius-dialog: var(--lq-radius-dialog, 8px);\n --lq-pdf-control-height: var(--lq-control-height, 32px);\n --lq-pdf-text-xs: var(--lq-text-xs, 11px);\n --lq-pdf-text-sm: var(--lq-text-sm, 12px);\n --lq-pdf-text-lg: var(--lq-text-lg, 15px);\n --lq-pdf-pressed-bg: color-mix(in srgb, var(--lq-pdf-accent) 16%, transparent);\n --lq-pdf-pressed-edge: color-mix(in srgb, var(--lq-pdf-accent) 55%, transparent);\n --lq-pdf-active-bg: color-mix(in srgb, var(--lq-pdf-fg) 12%, transparent);\n}\n.lq-pdf.lq-theme-dark,\n.lq-theme-dark .lq-pdf:not(.lq-theme-light) {\n --lq-pdf-border-subtle: var(--lq-border-subtle, #262c36);\n --lq-pdf-input-border: var(--lq-input-border, #6e7681);\n --lq-pdf-hover: var(--lq-row-hover, #1f2630);\n}\n@media (prefers-color-scheme: dark) {\n .lq-pdf.lq-theme-auto {\n --lq-pdf-border-subtle: var(--lq-border-subtle, #262c36);\n --lq-pdf-input-border: var(--lq-input-border, #6e7681);\n --lq-pdf-hover: var(--lq-row-hover, #1f2630);\n }\n}\n.lq-pdf-tool,\n.lq-pdf-button,\n.lq-pdf-menu-item,\n.lq-pdf-icon-button,\n.lq-pdf-group-button,\n.lq-pdf-group-menu,\n.lq-pdf-rich-button,\n.lq-pdf-input,\n.lq-pdf-style-select,\n.lq-pdf-field-select,\n.lq-pdf .lq-pdf-page-input,\n.lq-pdf .lq-pdf-zoom {\n border-radius: var(--lq-pdf-radius-control);\n transition: none;\n}\n.lq-pdf-button,\n.lq-pdf-input,\n.lq-pdf-menu-item {\n box-sizing: border-box;\n min-height: var(--lq-pdf-control-height);\n}\n.lq-pdf-input {\n height: var(--lq-pdf-control-height);\n}\n.lq-pdf-button,\n.lq-pdf-input,\n.lq-pdf-style-select,\n.lq-pdf-field-select,\n.lq-pdf .lq-pdf-page-input,\n.lq-pdf .lq-pdf-zoom {\n border-color: var(--lq-pdf-input-border);\n}\n.lq-pdf-input[type=\"range\"] {\n border: 0;\n}\n.lq-pdf-tool:hover:not(:disabled),\n.lq-pdf-button:hover:not(:disabled),\n.lq-pdf-menu-item:hover,\n.lq-pdf-menu-item:focus-visible,\n.lq-pdf-icon-button:hover:not(:disabled),\n.lq-pdf-rich-button:hover,\n.lq-pdf-group-button:hover,\n.lq-pdf-tab:hover {\n background: var(--lq-pdf-hover);\n}\n.lq-pdf-tool:active:not(:disabled),\n.lq-pdf-button:active:not(:disabled),\n.lq-pdf-menu-item:active,\n.lq-pdf-icon-button:active:not(:disabled),\n.lq-pdf-rich-button:active,\n.lq-pdf-group-button:active {\n background: var(--lq-pdf-active-bg);\n}\n.lq-pdf-tool[aria-pressed=\"true\"],\n.lq-pdf-rich-button[aria-pressed=\"true\"],\n.lq-pdf-compare-bar .lq-pdf-button[aria-pressed=\"true\"],\n.lq-pdf-tab-order-modes .lq-pdf-button[aria-pressed=\"true\"],\n.lq-pdf-menu-item[aria-checked=\"true\"],\n.lq-pdf-palette-item[aria-selected=\"true\"],\n.lq-pdf-stamp-option[aria-pressed=\"true\"] {\n background: var(--lq-pdf-pressed-bg);\n border-color: var(--lq-pdf-pressed-edge);\n box-shadow: inset 0 0 0 1px var(--lq-pdf-pressed-edge);\n color: var(--lq-pdf-fg);\n font-weight: inherit;\n}\n.lq-pdf-group-button[aria-selected=\"true\"] {\n background: var(--lq-pdf-pressed-bg);\n box-shadow: inset 0 -2px 0 var(--lq-pdf-accent);\n color: var(--lq-pdf-fg);\n}\n.lq-pdf .lq-pdf-primary,\n.lq-pdf .lq-pdf-primary:hover:not(:disabled) {\n border-color: var(--lq-pdf-accent);\n background: var(--lq-pdf-accent);\n color: var(--lq-pdf-accent-fg);\n}\n.lq-pdf .lq-pdf-primary:hover:not(:disabled) {\n filter: brightness(1.08);\n}\n.lq-pdf .lq-pdf-button.lq-pdf-danger {\n border-color: var(--lq-pdf-danger);\n background: transparent;\n color: var(--lq-pdf-danger);\n}\n.lq-pdf-tool:disabled,\n.lq-pdf-tool[aria-disabled=\"true\"],\n.lq-pdf .lq-pdf-button:disabled,\n.lq-pdf-button[aria-disabled=\"true\"],\n.lq-pdf-icon-button:disabled,\n.lq-pdf-menu-item[aria-disabled=\"true\"],\n.lq-pdf-input:disabled,\n.lq-pdf-toolstrip .lq-pdf-tool[aria-disabled=\"true\"],\n.lq-pdf-tab-order-item .lq-pdf-icon-button:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n}\n.lq-pdf [aria-busy=\"true\"] {\n opacity: 0.7;\n cursor: progress;\n}\n.lq-pdf [aria-invalid=\"true\"]:not(.lq-pdf-field) {\n border-color: var(--lq-pdf-danger);\n box-shadow: inset 0 0 0 1px var(--lq-pdf-danger);\n}\n.lq-pdf :focus-visible {\n outline: 2px solid var(--lq-pdf-focus);\n outline-offset: 1px;\n transition: none;\n}\n.lq-pdf-menu,\n.lq-pdf-popover {\n border-radius: var(--lq-pdf-radius-surface);\n}\n.lq-pdf-dialog {\n border-radius: var(--lq-pdf-radius-dialog);\n}\n.lq-pdf-dialog h2 {\n font-size: var(--lq-pdf-text-lg);\n font-weight: 600;\n}\n.lq-pdf-dialog-actions {\n justify-content: flex-end;\n padding-top: 10px;\n border-top: 1px solid var(--lq-pdf-border-subtle);\n}\n.lq-pdf-menu-heading,\n.lq-pdf-panel-title,\n.lq-pdf-panel-subtitle {\n font-size: var(--lq-pdf-text-sm);\n letter-spacing: 0;\n}\n.lq-pdf-menu-shortcut,\n.lq-pdf-strip-caption {\n font-size: var(--lq-pdf-text-xs);\n}\n.lq-pdf-toolbar,\n.lq-pdf-toolstrip,\n.lq-pdf-sidebar {\n background: var(--lq-pdf-surface-2);\n}\n@media (prefers-reduced-motion: reduce) {\n .lq-pdf *,\n .lq-pdf *::before,\n .lq-pdf *::after {\n transition: none !important;\n animation: none !important;\n }\n}\n@media (forced-colors: active) {\n .lq-pdf :focus-visible {\n outline-color: Highlight;\n }\n .lq-pdf-button,\n .lq-pdf-input {\n border-color: ButtonText;\n }\n .lq-pdf .lq-pdf-primary,\n .lq-pdf-tool[aria-pressed=\"true\"],\n .lq-pdf-group-button[aria-selected=\"true\"] {\n background: Highlight;\n color: HighlightText;\n forced-color-adjust: none;\n }\n .lq-pdf-tool:disabled,\n .lq-pdf .lq-pdf-button:disabled,\n .lq-pdf-menu-item[aria-disabled=\"true\"] {\n color: GrayText;\n opacity: 1;\n }\n}\n" = ` .lq-pdf { --lq-pdf-font-family: var(--lq-font-family, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif); --lq-pdf-font-size: var(--lq-font-size, 13px); --lq-pdf-fg: var(--lq-fg, #1f2328); --lq-pdf-bg: var(--lq-bg, #ffffff); --lq-pdf-muted: var(--lq-muted-fg, #59636e); --lq-pdf-border: var(--lq-border, #d1d9e0); --lq-pdf-chrome-bg: var(--lq-header-bg, #f6f8fa); --lq-pdf-accent: var(--lq-accent, #1f6feb); --lq-pdf-accent-fg: var(--lq-accent-fg, #ffffff); --lq-pdf-focus: var(--lq-focus-ring, #1f6feb); --lq-pdf-selection-bg: var(--lq-selection-bg, rgba(31, 111, 235, 0.12)); --lq-pdf-radius: var(--lq-radius, 6px); --lq-pdf-panel-bg: var(--lq-menu-bg, #ffffff); --lq-pdf-panel-shadow: var(--lq-menu-shadow, 0 8px 24px rgba(15, 23, 42, 0.16)); --lq-pdf-canvas-bg: #e6e9ed; --lq-pdf-page-shadow: 0 1px 3px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08); --lq-pdf-search-hit: rgba(255, 196, 0, 0.42); --lq-pdf-search-current: rgba(255, 120, 0, 0.55); --lq-pdf-read-highlight: rgba(64, 196, 255, 0.35); --lq-pdf-danger: #cf222e; --lq-pdf-sidebar-width: 220px; --lq-pdf-page-bg: #ffffff; --lq-pdf-text-selection: rgba(0, 92, 230, 0.28); --lq-pdf-snap-guide: #d1242f; --lq-pdf-page-accent-soft: rgba(31, 111, 235, 0.12); --lq-pdf-field-border: #818b98; --lq-pdf-field-bg: rgba(221, 235, 255, 0.55); --lq-pdf-page-fg: #1f2328; --lq-pdf-page-danger: #cf222e; --lq-pdf-page-accent: #1f6feb; --lq-pdf-page-accent-fg: #0b2a6f; --lq-pdf-page-success-soft: rgba(218, 251, 225, 0.7); --lq-pdf-page-success: #1a7f37; --lq-pdf-page-danger-soft: rgba(255, 235, 233, 0.8); --lq-pdf-page-accent-strong: rgba(31, 111, 235, 0.22); --lq-pdf-toast-bg: #1f2328; --lq-pdf-toast-fg: #ffffff; --lq-pdf-toast-error-bg: #8f1a22; --lq-pdf-editor-bg: rgba(255, 255, 255, 0.95); --lq-pdf-backdrop: rgba(15, 23, 42, 0.45); --lq-pdf-page-warning: #bf8700; --lq-pdf-page-loading-sheen: #f1f3f5; --lq-pdf-presentation-bg: #000000; --lq-pdf-compare-missing: rgba(127, 127, 127, 0.16); --lq-pdf-compare-inserted: rgba(46, 160, 67, 0.4); --lq-pdf-compare-deleted: rgba(248, 81, 73, 0.4); --lq-pdf-compare-moved: rgba(56, 139, 253, 0.36); --lq-pdf-compare-diff-opacity: 0.7; --lq-pdf-presence-default: #0969da; --lq-pdf-presence-fg: #ffffff; --lq-pdf-page-danger-bg: #fff5f5; --lq-pdf-page-danger-fg: #8a1320; --lq-pdf-page-hint: #9a6700; --lq-pdf-page-hint-bg: #fff8c5; --lq-pdf-page-hint-fg: #5c3d00; --lq-pdf-field-required-bg: rgba(255, 235, 233, 0.6); --lq-pdf-barcode-stripe: rgba(31, 35, 40, 0.18); --lq-pdf-field-button-bg: rgba(221, 235, 255, 0.85); position: relative; box-sizing: border-box; display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 320px; overflow: hidden; font-family: var(--lq-pdf-font-family); font-size: var(--lq-pdf-font-size); color: var(--lq-pdf-fg); background: var(--lq-pdf-bg); border: 1px solid var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); } .lq-pdf.lq-theme-light { --lq-fg: #1f2328; --lq-bg: #ffffff; --lq-muted-fg: #59636e; --lq-border: #d1d9e0; --lq-header-bg: #f6f8fa; --lq-accent: #1f6feb; --lq-accent-fg: #ffffff; --lq-selection-bg: rgba(31, 111, 235, 0.12); --lq-focus-ring: #1f6feb; --lq-menu-bg: #ffffff; color-scheme: light; } .lq-pdf.lq-theme-dark, .lq-theme-dark .lq-pdf:not(.lq-theme-light) { --lq-fg: #e6edf3; --lq-bg: #0d1117; --lq-muted-fg: #9198a1; --lq-border: #3d444d; --lq-header-bg: #151b23; --lq-accent: #4493f8; --lq-accent-fg: #0d1117; --lq-selection-bg: rgba(68, 147, 248, 0.2); --lq-focus-ring: #4493f8; --lq-menu-bg: #161b22; --lq-menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); --lq-pdf-canvas-bg: #010409; --lq-pdf-page-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); --lq-pdf-danger: #f85149; color-scheme: dark; } @media (prefers-color-scheme: dark) { .lq-pdf.lq-theme-auto { --lq-fg: #e6edf3; --lq-bg: #0d1117; --lq-muted-fg: #9198a1; --lq-border: #3d444d; --lq-header-bg: #151b23; --lq-accent: #4493f8; --lq-accent-fg: #0d1117; --lq-selection-bg: rgba(68, 147, 248, 0.2); --lq-focus-ring: #4493f8; --lq-menu-bg: #161b22; --lq-menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); --lq-pdf-canvas-bg: #010409; --lq-pdf-page-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); --lq-pdf-danger: #f85149; color-scheme: dark; } .lq-pdf.lq-theme-auto.lq-pdf-invert-pages .lq-pdf-canvas { filter: invert(0.92) hue-rotate(180deg); } } .lq-pdf.lq-theme-dark.lq-pdf-invert-pages .lq-pdf-canvas { filter: invert(0.92) hue-rotate(180deg); } .lq-pdf *, .lq-pdf *::before, .lq-pdf *::after { box-sizing: border-box; } .lq-pdf button, .lq-pdf input, .lq-pdf select, .lq-pdf textarea { font: inherit; color: inherit; } .lq-pdf-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } .lq-pdf-toolbar-wrap { flex: none; border-bottom: 1px solid var(--lq-pdf-border); background: var(--lq-pdf-chrome-bg); } .lq-pdf-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 3px 6px; } .lq-pdf-group { display: inline-flex; align-items: center; gap: 2px; } .lq-pdf-tools { flex-wrap: wrap; } .lq-pdf-separator { width: 1px; height: 20px; margin: 0 4px; background: var(--lq-pdf-border); } .lq-pdf-tool { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 6px; border: 1px solid transparent; border-radius: var(--lq-pdf-radius); background: transparent; cursor: pointer; } .lq-pdf-tool:hover:not(:disabled) { background: var(--lq-pdf-selection-bg); } .lq-pdf-tool:disabled { opacity: 0.4; cursor: default; } .lq-pdf-tool[aria-pressed="true"] { background: var(--lq-pdf-accent); color: var(--lq-pdf-accent-fg); } .lq-pdf :focus-visible { outline: 2px solid var(--lq-pdf-focus); outline-offset: 1px; } .lq-pdf-page-input { width: 3.2em; height: 32px; padding: 0 4px; text-align: center; border: 1px solid var(--lq-pdf-border); border-radius: 4px; background: var(--lq-pdf-bg); } .lq-pdf-zoom, .lq-pdf-stamp-select, .lq-pdf-field-select, .lq-pdf-filters select { height: 32px; border: 1px solid var(--lq-pdf-border); border-radius: 4px; background: var(--lq-pdf-bg); } .lq-pdf-muted { color: var(--lq-pdf-muted); font-size: 0.92em; } .lq-pdf-searchbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 8px 6px; } .lq-pdf-searchbar[hidden] { display: none; } .lq-pdf-searchbar input[type="search"] { flex: 1 1 200px; max-width: 320px; height: 28px; padding: 0 8px; border: 1px solid var(--lq-pdf-border); border-radius: 4px; background: var(--lq-pdf-bg); } .lq-pdf-body { position: relative; display: flex; flex: 1 1 auto; min-height: 0; } .lq-pdf-sidebar { display: flex; flex-direction: column; flex: none; width: var(--lq-pdf-sidebar-width); min-width: 0; border-right: 1px solid var(--lq-pdf-border); background: var(--lq-pdf-chrome-bg); } .lq-pdf-sidebar[hidden] { display: none; } .lq-pdf-tabs { display: flex; border-bottom: 1px solid var(--lq-pdf-border); } .lq-pdf-tab, .lq-pdf-tabs [role="tab"] { flex: 1; padding: 6px 4px; border: 0; border-bottom: 2px solid transparent; background: transparent; cursor: pointer; font-size: 0.92em; } .lq-pdf-tabs [aria-selected="true"] { border-bottom-color: var(--lq-pdf-accent); font-weight: 600; } .lq-pdf-panel { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; } .lq-pdf-panel[hidden] { display: none; } .lq-pdf-page-tools { display: flex; justify-content: center; gap: 2px; padding: 4px; border-bottom: 1px solid var(--lq-pdf-border); } .lq-pdf-page-tools[hidden] { display: none; } .lq-pdf-thumbs { flex: 1 1 auto; overflow: auto; padding: 8px 0; } .lq-pdf-thumbs[hidden], .lq-pdf-empty-state[hidden] { display: none; } .lq-pdf-thumb { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 186px; padding: 6px 0; cursor: pointer; } .lq-pdf-thumb-frame { display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--lq-pdf-page-bg); border: 2px solid transparent; box-shadow: var(--lq-pdf-page-shadow); } .lq-pdf-thumb-frame canvas { width: 100%; height: auto; } .lq-pdf-thumb-page { position: relative; flex: none; width: 100%; line-height: 0; } .lq-pdf-thumb-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; } .lq-pdf-thumb .lq-pdf-thumb-overlay * { pointer-events: none; } .lq-pdf-thumb-field-box { fill: var(--lq-pdf-field-bg); stroke: var(--lq-pdf-field-border); stroke-width: 1; } .lq-pdf-thumb-field-text, .lq-pdf-thumb-field-mark { fill: var(--lq-pdf-page-fg); } .lq-pdf-thumb-field-check { fill: none; stroke: var(--lq-pdf-page-fg); } .lq-pdf-thumb[aria-selected="true"] .lq-pdf-thumb-frame { border-color: var(--lq-pdf-accent); } .lq-pdf-thumb-current .lq-pdf-thumb-label { font-weight: 700; } .lq-pdf-thumbs:focus-visible .lq-pdf-thumb-focus .lq-pdf-thumb-frame { outline: 2px solid var(--lq-pdf-focus); outline-offset: 2px; } .lq-pdf-drop-before { box-shadow: inset 0 3px 0 var(--lq-pdf-accent); } .lq-pdf-drop-after { box-shadow: inset 0 -3px 0 var(--lq-pdf-accent); } .lq-pdf-outline, .lq-pdf-outline ul { list-style: none; margin: 0; padding: 0 0 0 12px; } .lq-pdf-outline { padding: 8px; } .lq-pdf-outline [role="treeitem"] { cursor: pointer; } .lq-pdf-outline-label { display: block; padding: 3px 6px; border-radius: 4px; } .lq-pdf-outline-label:hover { background: var(--lq-pdf-selection-bg); } .lq-pdf-outline [aria-expanded="false"] > ul { display: none; } .lq-pdf-filters { display: flex; gap: 4px; padding: 6px; } .lq-pdf-filters select { flex: 1; min-width: 0; } .lq-pdf-annotation-list, .lq-pdf-field-list { list-style: none; margin: 0; padding: 0 6px 6px; } .lq-pdf-list-heading { padding: 8px 4px 2px; font-size: 0.85em; font-weight: 600; color: var(--lq-pdf-muted); } .lq-pdf-annotation-item { display: grid; grid-template-columns: 10px 1fr; column-gap: 6px; width: 100%; padding: 6px; margin: 2px 0; text-align: left; border: 1px solid transparent; border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-bg); cursor: pointer; } .lq-pdf-annotation-item > :not(.lq-pdf-annotation-swatch) { grid-column: 2; } .lq-pdf-annotation-item[aria-current="true"] { border-color: var(--lq-pdf-accent); } .lq-pdf-annotation-swatch { grid-row: span 4; width: 10px; height: 10px; margin-top: 3px; border-radius: 50%; } .lq-pdf-annotation-title { font-weight: 600; } .lq-pdf-annotation-text { overflow-wrap: anywhere; } .lq-pdf-panel-footer { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding: 8px; border-top: 1px solid var(--lq-pdf-border); } .lq-pdf-empty { padding: 16px; color: var(--lq-pdf-muted); text-align: center; } .lq-pdf-empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px; list-style: none; text-align: center; } .lq-pdf-empty-state > .lq-pdf-empty { margin: 0; padding: 0; } .lq-pdf-empty-icon { display: inline-flex; color: var(--lq-pdf-muted); } .lq-pdf-empty-icon svg { width: 28px; height: 28px; } .lq-pdf-welcome { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; } .lq-pdf-welcome[hidden] { display: none; } .lq-pdf-welcome-box { display: flex; flex-direction: column; align-items: center; gap: 8px; box-sizing: border-box; width: min(420px, 100%); padding: 32px 24px; border: 1px dashed var(--lq-pdf-input-border); border-radius: var(--lq-pdf-radius-dialog); background: var(--lq-pdf-bg); } .lq-pdf-welcome-box h2 { margin: 0; font-size: var(--lq-pdf-text-lg); font-weight: 600; } .lq-pdf-welcome-box p { margin: 0 0 8px; color: var(--lq-pdf-muted); } .lq-pdf-dropping .lq-pdf-welcome-box { border-color: var(--lq-pdf-accent); background: var(--lq-pdf-pressed-bg); } .lq-pdf-viewport { position: relative; flex: 1 1 auto; min-width: 0; overflow: auto; background: var(--lq-pdf-canvas-bg); overscroll-behavior: contain; } .lq-pdf-pages { position: relative; margin: 0 auto; } .lq-pdf-layer-list { margin: 0; padding: 4px 0; list-style: none; } .lq-pdf-layer, .lq-pdf-layer-group { padding-block: 4px; padding-inline-end: 8px; } .lq-pdf-layer-group { color: var(--lq-pdf-muted); font-weight: 600; } .lq-pdf-tool-text { width: auto; padding-inline: 8px; white-space: nowrap; } .lq-pdf-palette-input { width: 100%; box-sizing: border-box; } .lq-pdf-palette-list { margin: 8px 0 0; padding: 0; max-height: 320px; overflow-y: auto; list-style: none; } .lq-pdf-palette-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px; border-radius: var(--lq-pdf-radius); cursor: pointer; } .lq-pdf-palette-item[aria-selected="true"] { background: var(--lq-pdf-selection-bg); outline: 2px solid var(--lq-pdf-focus); outline-offset: -2px; } .lq-pdf-palette-item[aria-disabled="true"] { color: var(--lq-pdf-muted); cursor: default; } .lq-pdf-tabstrip { flex: none; background: var(--lq-pdf-chrome-bg); border-bottom: 1px solid var(--lq-pdf-border); } .lq-pdf-tabstrip[hidden] { display: none; } .lq-pdf-doctabs { display: flex; overflow-x: auto; } .lq-pdf-doctab { display: flex; align-items: center; gap: 6px; max-width: 240px; min-height: 32px; padding-block: 0; padding-inline: 12px 6px; border-inline-end: 1px solid var(--lq-pdf-border); color: var(--lq-pdf-muted); cursor: pointer; white-space: nowrap; } .lq-pdf-doctab[aria-selected="true"] { color: var(--lq-pdf-fg); background: var(--lq-pdf-bg); box-shadow: inset 0 -2px 0 var(--lq-pdf-accent); } .lq-pdf-doctab:focus-visible { outline: 2px solid var(--lq-pdf-focus); outline-offset: -2px; } .lq-pdf-doctab-name { overflow: hidden; text-overflow: ellipsis; } .lq-pdf-doctab-dirty { color: var(--lq-pdf-accent); font-size: 0.7em; } .lq-pdf-doctab-close { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--lq-pdf-radius); font-size: 1.2em; } .lq-pdf-doctab-close:hover { background: var(--lq-pdf-selection-bg); } .lq-pdf-read-highlight { position: absolute; z-index: 3; border-radius: 2px; background: var(--lq-pdf-read-highlight); outline: 1px solid var(--lq-pdf-accent); pointer-events: none; mix-blend-mode: multiply; } .lq-pdf[data-tool="snapshot"] .lq-pdf-page { cursor: crosshair; } .lq-pdf-preview-status { flex: none; padding: 4px 12px; color: var(--lq-pdf-fg); background: var(--lq-pdf-selection-bg); border-bottom: 1px solid var(--lq-pdf-border); } .lq-pdf-preview-status[hidden] { display: none; } .lq-pdf-message { position: absolute; inset: 40% 16px auto; text-align: center; color: var(--lq-pdf-muted); } .lq-pdf-message[hidden] { display: none; } .lq-pdf-message-error { color: var(--lq-pdf-danger); } .lq-pdf-page { position: absolute; overflow: hidden; background: var(--lq-pdf-page-bg); box-shadow: var(--lq-pdf-page-shadow); contain: strict; } .lq-pdf-canvas { position: absolute; inset: 0; width: 100%; height: 100%; } .lq-pdf-text { position: absolute; top: 0; left: 0; transform-origin: 0 0; overflow: hidden; line-height: 1; font-family: sans-serif; -webkit-text-size-adjust: none; text-size-adjust: none; forced-color-adjust: none; } .lq-pdf-text span { position: absolute; color: transparent; white-space: pre; cursor: text; transform-origin: 0 0; } .lq-pdf-text span.lq-pdf-mc { position: static; transform: none; cursor: inherit; } .lq-pdf-text ::selection { background: var(--lq-pdf-text-selection); } .lq-pdf-struct { position: absolute; inset: 0; overflow: hidden; pointer-events: none; } .lq-pdf-overlay { position: absolute; inset: 0; overflow: visible; pointer-events: none; } .lq-pdf-annot { pointer-events: none; } .lq-pdf[data-tool="select"] .lq-pdf-annot, .lq-pdf:not([data-tool]) .lq-pdf-annot { pointer-events: visiblePainted; cursor: move; } .lq-pdf-annot:focus { outline: none; } .lq-pdf-annot:focus-visible { outline: 2px dashed var(--lq-pdf-focus); } .lq-pdf-annot-highlight .lq-pdf-markup, .lq-pdf-thumb-annot-highlight .lq-pdf-markup { mix-blend-mode: multiply; } .lq-pdf-hit-area { pointer-events: all; } .lq-pdf-search-hit { fill: var(--lq-pdf-search-hit); mix-blend-mode: multiply; } .lq-pdf-search-current { fill: var(--lq-pdf-search-current); } .lq-pdf-selection { fill: none; stroke: var(--lq-pdf-accent); stroke-width: 1; stroke-dasharray: 4 3; } .lq-pdf-snap { fill: none; stroke: var(--lq-pdf-snap-guide); stroke-width: 1.5; } .lq-pdf-snap-cross { fill: none; stroke: var(--lq-pdf-snap-guide); stroke-width: 1; } .lq-pdf-crosshair { fill: none; stroke: var(--lq-pdf-page-accent); stroke-width: 1.5; } .lq-pdf-crosshair-halo { stroke: var(--lq-pdf-page-bg); stroke-width: 4; } .lq-pdf-stroke-focus { fill: none; stroke: var(--lq-pdf-focus); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 6 4; } .lq-pdf-handle { fill: var(--lq-pdf-page-bg); stroke: var(--lq-pdf-accent); stroke-width: 1.5; pointer-events: all; } .lq-pdf-link-area { pointer-events: all; cursor: pointer; } .lq-pdf-link-hit { stroke: transparent; stroke-width: 14px; vector-effect: non-scaling-stroke; pointer-events: stroke; cursor: pointer; } .lq-pdf[data-tool="select"] .lq-pdf-annot-link .lq-pdf-link-area, .lq-pdf-annot-link:focus-visible .lq-pdf-link-area { stroke: var(--lq-pdf-accent); stroke-width: 0.75; stroke-dasharray: 3 2; } .lq-pdf-media-area { pointer-events: all; } .lq-pdf-link-address { margin: 0; padding: 8px 10px; border-radius: 4px; background: var(--lq-pdf-selection-bg); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; overflow-wrap: anywhere; user-select: text; } a.lq-pdf-button { display: inline-flex; align-items: center; text-decoration: none; } .lq-pdf-handle-rotate { cursor: grab; } .lq-pdf-handle-vertex { cursor: move; } .lq-pdf-handle-edge { fill: var(--lq-pdf-accent); fill-opacity: 0.35; cursor: copy; } .lq-pdf-handle-focus { fill: var(--lq-pdf-accent); fill-opacity: 1; stroke: var(--lq-pdf-page-bg); stroke-width: 2; outline: 2px solid var(--lq-pdf-focus); outline-offset: 2px; } .lq-pdf-handle-rotated { cursor: move; } .lq-pdf-rotate-stem { stroke: var(--lq-pdf-accent); stroke-width: 1; } .lq-pdf-handle-nw, .lq-pdf-handle-se { cursor: nwse-resize; } .lq-pdf-handle-ne, .lq-pdf-handle-sw { cursor: nesw-resize; } .lq-pdf-handle-n, .lq-pdf-handle-s { cursor: ns-resize; } .lq-pdf-handle-e, .lq-pdf-handle-w { cursor: ew-resize; } .lq-pdf-links, .lq-pdf-forms { position: absolute; inset: 0; pointer-events: none; } .lq-pdf-link { position: absolute; padding: 0; border: 0; background: transparent; pointer-events: auto; cursor: pointer; } .lq-pdf-link:hover { background: var(--lq-pdf-page-accent-soft); } .lq-pdf[data-tool]:not([data-tool="select"]):not([data-tool="pan"]) .lq-pdf-link { pointer-events: none; } .lq-pdf[data-tool="pan"] .lq-pdf-viewport, .lq-pdf-panning .lq-pdf-viewport { cursor: grab; } .lq-pdf-panning .lq-pdf-viewport { cursor: grabbing; user-select: none; } .lq-pdf[data-tool="ink"] .lq-pdf-page, .lq-pdf[data-tool="rectangle"] .lq-pdf-page, .lq-pdf[data-tool="ellipse"] .lq-pdf-page, .lq-pdf[data-tool="line"] .lq-pdf-page, .lq-pdf[data-tool="arrow"] .lq-pdf-page, .lq-pdf[data-tool="polygon"] .lq-pdf-page, .lq-pdf[data-tool="polyline"] .lq-pdf-page, .lq-pdf[data-tool="distance"] .lq-pdf-page, .lq-pdf[data-tool="perimeter"] .lq-pdf-page, .lq-pdf[data-tool="area"] .lq-pdf-page, .lq-pdf[data-tool="note"] .lq-pdf-page, .lq-pdf[data-tool="freeText"] .lq-pdf-page, .lq-pdf[data-tool="stamp"] .lq-pdf-page, .lq-pdf[data-tool="signature"] .lq-pdf-page, .lq-pdf[data-tool="image"] .lq-pdf-page, .lq-pdf[data-tool="formField"] .lq-pdf-page { cursor: crosshair; touch-action: none; user-select: none; } .lq-pdf[data-tool="ink"] .lq-pdf-text span, .lq-pdf[data-tool="rectangle"] .lq-pdf-text span, .lq-pdf[data-tool="ellipse"] .lq-pdf-text span, .lq-pdf[data-tool="note"] .lq-pdf-text span { cursor: crosshair; } .lq-pdf-field { position: absolute; margin: 0; padding: 0 2px; border: 1px solid var(--lq-pdf-field-border); border-radius: 2px; background: var(--lq-pdf-field-bg); color: var(--lq-pdf-page-fg); pointer-events: auto; } .lq-pdf .lq-pdf-forms .lq-pdf-field { color: var(--lq-pdf-page-fg); color-scheme: light; } .lq-pdf .lq-pdf-forms .lq-pdf-field:disabled { color: var(--lq-pdf-page-fg); -webkit-text-fill-color: var(--lq-pdf-page-fg); opacity: 1; } .lq-pdf .lq-pdf-forms .lq-pdf-field option { background: var(--lq-pdf-page-bg); color: var(--lq-pdf-page-fg); } .lq-pdf .lq-pdf-forms .lq-pdf-field-signature { color: var(--lq-pdf-page-accent-fg); } .lq-pdf-field:focus { background: var(--lq-pdf-page-bg); } .lq-pdf-field[aria-invalid="true"] { border-color: var(--lq-pdf-page-danger); box-shadow: 0 0 0 1px var(--lq-pdf-page-danger); } .lq-pdf-field-checkbox, .lq-pdf-field-radio { accent-color: var(--lq-pdf-page-accent); } .lq-pdf-field-signature { font-size: 12px; color: var(--lq-pdf-page-accent-fg); cursor: pointer; } .lq-pdf-field-signed { background: var(--lq-pdf-page-success-soft); border-color: var(--lq-pdf-page-success); } .lq-pdf-field-signature-broken { background: var(--lq-pdf-page-danger-soft); border-color: var(--lq-pdf-page-danger); } .lq-pdf-forms .lq-pdf-field:disabled { background: transparent; border-color: var(--lq-pdf-field-border); border-style: dotted; } .lq-pdf-field-design { position: absolute; padding: 1px 3px; overflow: hidden; font-size: 10px; color: var(--lq-pdf-page-accent-fg); border: 1px dashed var(--lq-pdf-page-accent); background: var(--lq-pdf-page-accent-soft); pointer-events: auto; cursor: move; white-space: nowrap; } .lq-pdf-field-selected { border-style: solid; background: var(--lq-pdf-page-accent-strong); } .lq-pdf-field-resize { position: absolute; right: 0; bottom: 0; width: 8px; height: 8px; background: var(--lq-pdf-page-accent); cursor: nwse-resize; } .lq-pdf-content { position: absolute; inset: 0; pointer-events: none; } .lq-pdf[data-tool="addText"] .lq-pdf-page { cursor: text; } .lq-pdf[data-fill-mark] .lq-pdf-page { cursor: crosshair; } .lq-pdf-content-run, .lq-pdf-content-image { position: absolute; box-sizing: border-box; pointer-events: auto; border: 1px dashed transparent; border-radius: 2px; touch-action: none; } .lq-pdf-content-run { cursor: text; } .lq-pdf-content-path { position: absolute; box-sizing: border-box; pointer-events: auto; border: 1px dashed color-mix(in srgb, var(--lq-pdf-accent) 45%, transparent); border-radius: 2px; cursor: move; touch-action: none; } .lq-pdf-content-path:hover, .lq-pdf-content-path:focus-visible { border-color: var(--lq-pdf-accent); background: var(--lq-pdf-selection-bg); outline: none; } .lq-pdf-content-path:focus-visible { box-shadow: 0 0 0 2px var(--lq-pdf-accent); } .lq-pdf-content-scan { border-color: color-mix(in srgb, var(--lq-pdf-accent) 45%, transparent); border-style: dotted; } .lq-pdf-replace-list, .lq-pdf-object-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; } .lq-pdf-replace-list { max-height: 320px; overflow-y: auto; } .lq-pdf-replace-item, .lq-pdf-object-item { display: flex; align-items: center; gap: 8px; min-height: 32px; } .lq-pdf-replace-item > .lq-pdf-check, .lq-pdf-replace-item > .lq-pdf-replace-preview { flex: 1 1 auto; min-width: 0; } .lq-pdf-dialog .lq-pdf-replace-item > .lq-pdf-check { display: flex; flex-flow: row nowrap; flex: 1 1 auto; align-items: flex-start; gap: 8px; min-width: 0; white-space: normal; } .lq-pdf-replace-item > .lq-pdf-check > input { flex: none; margin-top: 3px; } .lq-pdf-replace-item > .lq-pdf-link-button { flex: none; min-height: 24px; white-space: nowrap; } .lq-pdf-replace-preview { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; } .lq-pdf-replace-preview del { color: var(--lq-pdf-danger); } .lq-pdf-replace-preview ins { color: var(--lq-pdf-accent); font-weight: 600; text-decoration: none; } .lq-pdf-object-item { padding: 0 6px; } .lq-pdf-object-item > .lq-pdf-icon-button { flex: 0 0 auto; width: 28px; height: 28px; align-self: center; } .lq-pdf-object-select { display: flex; flex: 1 1 auto; align-items: center; gap: 6px; min-width: 0; text-align: start; } .lq-pdf-object-label { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lq-pdf-object-layer { flex: none; padding: 0 6px; border: 1px solid var(--lq-pdf-border); border-radius: 999px; color: var(--lq-pdf-muted); font-size: 11px; } .lq-pdf-content-image { cursor: move; border-color: color-mix(in srgb, var(--lq-pdf-accent) 45%, transparent); } .lq-pdf-content-run:hover, .lq-pdf-content-run:focus-visible, .lq-pdf-content-image:hover, .lq-pdf-content-image:focus-visible { border-color: var(--lq-pdf-accent); background: var(--lq-pdf-selection-bg); outline: none; } .lq-pdf-content-run:focus-visible, .lq-pdf-content-image:focus-visible { box-shadow: 0 0 0 2px var(--lq-pdf-accent); } .lq-pdf-content-selected { border: 1px solid var(--lq-pdf-accent); } .lq-pdf-content-dragging { background: var(--lq-pdf-selection-bg); border-color: var(--lq-pdf-accent); cursor: grabbing; } .lq-pdf-content-handle { position: absolute; width: 9px; height: 9px; margin: -5px 0 0 -5px; box-sizing: border-box; background: var(--lq-pdf-page-bg); border: 1.5px solid var(--lq-pdf-accent); } .lq-pdf-content-handle-nw { left: 0; top: 0; cursor: nwse-resize; } .lq-pdf-content-handle-n { left: 50%; top: 0; cursor: ns-resize; } .lq-pdf-content-handle-ne { left: 100%; top: 0; cursor: nesw-resize; } .lq-pdf-content-handle-e { left: 100%; top: 50%; cursor: ew-resize; } .lq-pdf-content-handle-se { left: 100%; top: 100%; cursor: nwse-resize; } .lq-pdf-content-handle-s { left: 50%; top: 100%; cursor: ns-resize; } .lq-pdf-content-handle-sw { left: 0; top: 100%; cursor: nesw-resize; } .lq-pdf-content-handle-w { left: 0; top: 50%; cursor: ew-resize; } .lq-pdf-content-input { position: absolute; box-sizing: border-box; pointer-events: auto; padding: 0 3px; border: 1px solid var(--lq-pdf-accent); border-radius: 2px; background: var(--lq-pdf-page-bg); color: var(--lq-pdf-page-fg); font-family: Helvetica, Arial, sans-serif; line-height: 1; outline: 2px solid color-mix(in srgb, var(--lq-pdf-accent) 35%, transparent); } .lq-pdf-content-textarea { padding: 2px 4px; resize: none; overflow: auto; white-space: pre-wrap; } .lq-pdf-content-paragraph { position: absolute; width: 18px; height: 18px; padding: 0; pointer-events: auto; border: 1px solid color-mix(in srgb, var(--lq-pdf-accent) 45%, transparent); border-radius: 3px; background: var(--lq-pdf-page-bg); color: var(--lq-pdf-accent); font: 600 12px/16px Helvetica, Arial, sans-serif; cursor: pointer; } .lq-pdf-content-paragraph:hover, .lq-pdf-content-paragraph:focus-visible { border-color: var(--lq-pdf-accent); background: var(--lq-pdf-selection-bg); outline: none; } .lq-pdf-content-paragraph:focus-visible { box-shadow: 0 0 0 2px var(--lq-pdf-accent); } .lq-pdf-toast { position: absolute; inset-inline: 0; bottom: 16px; margin-inline: auto; width: max-content; max-width: min(520px, calc(100% - 32px)); display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-toast-bg); color: var(--lq-pdf-toast-fg); font-size: 13px; box-shadow: var(--lq-pdf-panel-shadow); z-index: 6; } .lq-pdf-toast-error { background: var(--lq-pdf-toast-error-bg); } .lq-pdf-toast-close { min-width: 24px; min-height: 24px; border: 0; border-radius: 4px; background: transparent; color: inherit; font-size: 16px; cursor: pointer; } .lq-pdf-editor { position: absolute; z-index: 3; padding: 2px; font-family: Helvetica, Arial, sans-serif; line-height: 1.2; border: 1px solid var(--lq-pdf-accent); background: var(--lq-pdf-editor-bg); resize: none; pointer-events: auto; } .lq-pdf-rich { position: absolute; z-index: 3; pointer-events: auto; } .lq-pdf-rich-surface { position: static; display: block; box-sizing: border-box; width: 100%; outline: none; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; } .lq-pdf-rich-bar { position: absolute; bottom: 100%; inset-inline-start: 0; margin-bottom: 4px; display: flex; align-items: center; gap: 2px; padding: 3px; width: max-content; border: 1px solid var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-panel-bg); box-shadow: var(--lq-pdf-panel-shadow); font-size: 13px; } .lq-pdf-rich-below .lq-pdf-rich-bar { bottom: auto; top: 100%; margin: 4px 0 0; } .lq-pdf-rich-button { min-width: 26px; height: 26px; padding: 0 6px; border: 0; border-radius: 4px; background: transparent; color: var(--lq-pdf-fg); font: inherit; cursor: pointer; } .lq-pdf-rich-button:hover { background: var(--lq-pdf-selection-bg); } .lq-pdf-rich-button[aria-pressed="true"] { background: var(--lq-pdf-accent); color: var(--lq-pdf-accent-fg); } .lq-pdf-rich-button:focus-visible, .lq-pdf-rich-select:focus-visible { outline: 2px solid var(--lq-pdf-accent); outline-offset: 1px; } .lq-pdf-rich-select { height: 26px; border: 1px solid var(--lq-pdf-border); border-radius: 4px; background: var(--lq-pdf-panel-bg); color: var(--lq-pdf-fg); font: inherit; } .lq-pdf-popover { position: absolute; z-index: 20; display: flex; flex-direction: column; gap: 6px; width: 280px; max-height: 70%; overflow: auto; padding: 10px; border: 1px solid var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-panel-bg); box-shadow: var(--lq-pdf-panel-shadow); } .lq-pdf-popover[hidden] { display: none; } .lq-pdf-mentions { margin: 0; padding: 2px; max-height: 168px; overflow: auto; list-style: none; border: 1px solid var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-panel-bg); } .lq-pdf-mentions[hidden] { display: none; } .lq-pdf-mention { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; padding: 4px 6px; border-radius: var(--lq-pdf-radius); cursor: pointer; } .lq-pdf-mention[aria-selected="true"] { background: var(--lq-pdf-selection-bg); outline: 2px solid var(--lq-pdf-focus); outline-offset: -2px; } .lq-pdf-mention-name { font-weight: 600; } .lq-pdf-popover-header { display: flex; align-items: baseline; gap: 6px; } .lq-pdf-popover-header .lq-pdf-icon-button { margin-left: auto; } .lq-pdf-icon-button, .lq-pdf-link-button { border: 0; background: transparent; cursor: pointer; } .lq-pdf-link-button { padding: 0; color: var(--lq-pdf-accent); text-decoration: underline; } .lq-pdf-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; } .lq-pdf-swatch { width: 20px; height: 20px; border: 1px solid var(--lq-pdf-border); border-radius: 50%; cursor: pointer; } .lq-pdf-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--lq-pdf-bg), 0 0 0 4px var(--lq-pdf-accent); } .lq-pdf-swatches input[type="color"] { width: 26px; height: 22px; padding: 0; border: 0; background: transparent; } .lq-pdf-field-editor .lq-pdf-field, .lq-pdf-popover .lq-pdf-field { position: static; display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; background: transparent; color: inherit; } .lq-pdf-popover textarea, .lq-pdf-popover select, .lq-pdf-field-editor input:not([type="checkbox"]), .lq-pdf-field-editor select, .lq-pdf-field-editor textarea { width: 100%; padding: 4px; border: 1px solid var(--lq-pdf-border); border-radius: 4px; background: var(--lq-pdf-bg); } .lq-pdf-field-editor { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-top: 1px solid var(--lq-pdf-border); } .lq-pdf-thread { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--lq-pdf-border); } .lq-pdf-thread li { padding: 4px 8px; } .lq-pdf-thread p { margin: 2px 0; overflow-wrap: anywhere; } .lq-pdf-reply { display: flex; gap: 6px; align-items: flex-end; } .lq-pdf-reply textarea { flex: 1; } .lq-pdf-popover-actions, .lq-pdf-dialog-actions { display: flex; justify-content: flex-end; gap: 6px; } .lq-pdf-button { padding: 4px 10px; border: 1px solid var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-bg); cursor: pointer; } .lq-pdf-button:hover { background: var(--lq-pdf-selection-bg); } .lq-pdf-primary { border-color: var(--lq-pdf-accent); background: var(--lq-pdf-accent); color: var(--lq-pdf-accent-fg); } .lq-pdf-danger { border-color: var(--lq-pdf-danger); color: var(--lq-pdf-danger); } .lq-pdf-dialog-backdrop { position: absolute; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; background: var(--lq-pdf-backdrop); } .lq-pdf-dialog { display: flex; flex-direction: column; gap: 10px; width: min(460px, calc(100% - 24px)); padding: 16px; border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-panel-bg); box-shadow: var(--lq-pdf-panel-shadow); } .lq-pdf-dialog h2 { margin: 0; font-size: 1.15em; } .lq-pdf-signature-panel { display: flex; flex-direction: column; gap: 8px; min-height: 170px; } .lq-pdf-signature-pad { width: 100%; height: 150px; border: 1px solid var(--lq-pdf-border); border-radius: 4px; background: var(--lq-pdf-page-bg); touch-action: none; cursor: crosshair; } .lq-pdf-signature-panel input[type="text"] { padding: 6px; border: 1px solid var(--lq-pdf-border); border-radius: 4px; background: var(--lq-pdf-bg); } .lq-pdf-signature-typed { min-height: 64px; padding: 8px; font-family: "Brush Script MT", "Segoe Script", "Times New Roman", serif; font-size: 34px; font-style: italic; color: var(--lq-pdf-page-accent-fg); border-bottom: 1px solid var(--lq-pdf-border); } .lq-pdf-print-root { display: none; } .lq-pdf-print-frame { position: fixed; right: 0; bottom: 0; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; } @media print { html.lq-pdf-printing body > *:not(.lq-pdf-print-root) { display: none !important; } html.lq-pdf-printing .lq-pdf-print-root { display: block; } .lq-pdf-print-page { position: relative; width: 100%; break-after: page; page-break-after: always; } .lq-pdf-print-page img, .lq-pdf-print-overlay { position: absolute; inset: 0; width: 100%; height: 100%; } } @media (prefers-reduced-motion: reduce) { .lq-pdf * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } } @media (forced-colors: active) { .lq-pdf-tool[aria-pressed="true"] { outline: 2px solid Highlight; } .lq-pdf-selection, .lq-pdf-handle { stroke: Highlight; } } @media (max-width: 640px) { .lq-pdf { --lq-pdf-sidebar-width: 160px; } } .lq-pdf-toolbar { flex-wrap: nowrap; min-width: 0; } .lq-pdf-toolbar > [hidden], .lq-pdf-toolstrip[hidden], .lq-pdf-style-bar[hidden] { display: none; } .lq-pdf-spacer { flex: 1 1 8px; min-width: 4px; } .lq-pdf-group { flex: none; } .lq-pdf-page-total { padding: 0 4px; white-space: nowrap; } .lq-pdf-tool svg { flex: none; } .lq-pdf-group-button, .lq-pdf-group-menu, .lq-pdf-tool-text { gap: 6px; padding: 0 10px; white-space: nowrap; } .lq-pdf-group-button[aria-selected="true"] { background: var(--lq-pdf-selection-bg); color: var(--lq-pdf-fg); box-shadow: inset 0 -2px 0 var(--lq-pdf-accent); font-weight: 600; } .lq-pdf-group-menu { display: none; border-color: var(--lq-pdf-border); } .lq-pdf-toolbar-collapsed .lq-pdf-tool-groups { display: none; } .lq-pdf-toolstrip > * { flex: none; } .lq-pdf-pages { --lq-pdf-focus: var(--lq-pdf-page-accent); } .lq-pdf .lq-pdf-page-input, .lq-pdf .lq-pdf-zoom { border-color: var(--lq-pdf-muted); } .lq-pdf-toolstrip-tight > .lq-pdf-style-bar { flex: 1 1 0; min-width: min(180px, 100%); overflow-x: auto; scrollbar-width: thin; } .lq-pdf-toolstrip-tight > .lq-pdf-style-bar > * { flex: none; } .lq-pdf-toolstrip > [hidden] { display: none; } .lq-pdf-tool-compact > span { display: none; } .lq-pdf-tool-text.lq-pdf-tool-compact { padding: 0 7px; } .lq-pdf-strip-group { display: inline-flex; flex-direction: column; align-items: stretch; gap: 1px; min-width: 0; } .lq-pdf-strip-group[hidden] { display: none; } .lq-pdf-strip-group-items { display: flex; align-items: center; gap: 2px; } .lq-pdf-strip-group-items > [hidden] { display: none; } .lq-pdf-strip-caption { overflow: hidden; color: var(--lq-pdf-muted); font-size: 11px; line-height: 13px; text-align: center; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; width: 0; min-width: 100%; } .lq-pdf-toolstrip-captioned > .lq-pdf-separator { align-self: stretch; height: auto; margin-block: 4px; } .lq-pdf-toolstrip { box-sizing: border-box; min-height: 51px; } .lq-pdf-compact .lq-pdf-toolstrip { min-height: 0; } .lq-pdf-compact .lq-pdf-strip-caption { display: none; } .lq-pdf-toolstrip .lq-pdf-tool[aria-disabled="true"] { opacity: 0.5; } .lq-pdf-ocr-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--lq-pdf-border); background: var(--lq-pdf-selection-bg); color: var(--lq-pdf-fg); } .lq-pdf-ocr-banner[hidden], .lq-pdf-ocr-banner > [hidden] { display: none; } .lq-pdf-ocr-banner-progress { flex: 0 1 160px; width: auto; } .lq-pdf-ocr-banner-text { flex: 1 1 200px; } .lq-pdf-thumb { position: relative; } .lq-pdf-thumb-ocr { position: absolute; top: 4px; inset-inline-end: 4px; padding: 1px 5px; border-radius: 8px; border: 1px solid currentColor; background: var(--lq-pdf-chrome-bg); color: var(--lq-pdf-fg); font-size: 10px; font-weight: 600; line-height: 14px; pointer-events: none; } .lq-pdf-thumb-ocr[data-state="failed"] { color: var(--lq-pdf-danger); } .lq-pdf-thumb-ocr[data-state="running"] { border-style: dashed; } .lq-pdf-thumb-ocr[data-state="no-text"] { color: var(--lq-pdf-muted); } .lq-pdf-ocr-results { margin: 6px 0 0; padding-inline-start: 18px; max-height: 140px; overflow: auto; } .lq-pdf-ocr-results[hidden], .lq-pdf-progress[hidden] { display: none; } .lq-pdf-shortcut-search { width: 100%; box-sizing: border-box; margin-bottom: 6px; } .lq-pdf-table tr[hidden] { display: none; } .lq-pdf-toolbar-collapsed .lq-pdf-group-menu { display: inline-flex; } .lq-pdf-tool-danger { color: var(--lq-pdf-danger); } .lq-pdf-toolstrip { display: flex; align-items: center; gap: 2px; padding: 2px 6px; overflow-x: auto; border-top: 1px solid var(--lq-pdf-border); scrollbar-width: thin; } .lq-pdf-toolstrip .lq-pdf-tools { flex-wrap: nowrap; } .lq-pdf-style-bar { gap: 4px; } .lq-pdf-style-select, .lq-pdf-input { height: 28px; min-width: 0; padding: 0 6px; border: 1px solid var(--lq-pdf-border); border-radius: 4px; background: var(--lq-pdf-bg); } .lq-pdf-input { width: 100%; } .lq-pdf-input[type="color"] { padding: 2px; } .lq-pdf-input[type="range"] { padding: 0; border: 0; } .lq-pdf-input[aria-invalid="true"] { border-color: var(--lq-pdf-danger); box-shadow: 0 0 0 1px var(--lq-pdf-danger); } .lq-pdf-style-select { max-width: 108px; } .lq-pdf-style-number { width: 58px; height: 28px; box-sizing: border-box; padding: 0 4px; border: 1px solid var(--lq-pdf-border); border-radius: 4px; background: var(--lq-pdf-panel-bg); color: inherit; font: inherit; } .lq-pdf-style-range { width: 84px; accent-color: var(--lq-pdf-accent); } .lq-pdf-color-chip { display: block; width: 18px; height: 18px; border: 1px solid var(--lq-pdf-border); border-radius: 50%; } .lq-pdf-color-none { background: linear-gradient(135deg, transparent 46%, var(--lq-pdf-danger) 46%, var(--lq-pdf-danger) 54%, transparent 54%); } .lq-pdf-check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; } .lq-pdf-search-options { display: flex; flex-wrap: wrap; gap: 4px 12px; } .lq-pdf-search-count { min-width: 4.5em; } .lq-pdf-menu { position: absolute; z-index: 40; display: flex; flex-direction: column; min-width: 200px; max-width: min(340px, calc(100% - 8px)); max-height: calc(100% - 8px); padding: 4px; overflow: auto; border: 1px solid var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-panel-bg); box-shadow: var(--lq-pdf-panel-shadow); } .lq-pdf-menu-wide { min-width: 300px; } .lq-pdf-menu-item { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 8px; border: 0; border-radius: 4px; background: transparent; text-align: start; cursor: pointer; } .lq-pdf-menu-item:hover, .lq-pdf-menu-item:focus-visible { background: var(--lq-pdf-selection-bg); } .lq-pdf-menu-item[aria-disabled="true"] { opacity: 0.45; cursor: default; } .lq-pdf-menu-icon { display: inline-flex; flex: none; justify-content: center; width: 18px; } .lq-pdf-menu-label { flex: 1 1 auto; } .lq-pdf-menu-shortcut { flex: none; font: inherit; font-size: 0.85em; color: var(--lq-pdf-muted); } .lq-pdf-menu-danger { color: var(--lq-pdf-danger); } .lq-pdf-menu-separator { flex: none; height: 1px; margin: 4px 0; background: var(--lq-pdf-border); } .lq-pdf-menu-heading { padding: 6px 8px 2px; font-size: 0.82em; font-weight: 600; color: var(--lq-pdf-muted); } .lq-pdf-menu .lq-pdf-swatches { padding: 6px 8px; } .lq-pdf-stamp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 6px 8px; } .lq-pdf-stamp-option { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 38px; padding: 4px 6px; border: 2px solid currentColor; border-radius: 6px; background: transparent; font-size: 0.82em; letter-spacing: 0.04em; cursor: pointer; } .lq-pdf-stamp-option small { font-size: 0.8em; letter-spacing: 0; text-transform: none; } .lq-pdf-stamp-option[aria-pressed="true"] { background: var(--lq-pdf-selection-bg); } .lq-pdf-dialog { max-height: calc(100% - 24px); } .lq-pdf-dialog-small { width: min(380px, calc(100% - 24px)); } .lq-pdf-dialog-large { width: min(720px, calc(100% - 24px)); } .lq-pdf-dialog-full { width: calc(100% - 24px); height: calc(100% - 24px); } .lq-pdf-dialog-header { display: flex; align-items: center; gap: 8px; } .lq-pdf-dialog-header h2 { flex: 1 1 auto; } .lq-pdf-dialog-icon { display: inline-flex; flex: none; color: var(--lq-pdf-muted); } .lq-pdf-icon-button, .lq-pdf-toast-close, .lq-pdf-rich-button, .lq-pdf-doctab-close { display: inline-flex; align-items: center; justify-content: center; } .lq-pdf-icon-button svg, .lq-pdf-toast-close svg, .lq-pdf-rich-button svg, .lq-pdf-doctab-close svg { flex: none; width: 16px; height: 16px; } .lq-pdf-menu-icon svg { width: 16px; height: 16px; } .lq-pdf-panel-title { display: flex; align-items: center; gap: 6px; } .lq-pdf-panel-title svg { flex: none; width: 16px; height: 16px; } .lq-pdf-dialog-header .lq-pdf-icon-button, .lq-pdf-popover-header .lq-pdf-icon-button { width: 28px; height: 28px; border-radius: 4px; font-size: 18px; line-height: 1; } .lq-pdf-icon-button:hover { background: var(--lq-pdf-selection-bg); } .lq-pdf-dialog-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 10px; min-height: 0; overflow: auto; } .lq-pdf-dialog-body > p { margin: 0; } .lq-pdf-dialog-actions { flex-wrap: wrap; align-items: center; } .lq-pdf-dialog-actions:empty { display: none; } .lq-pdf-signature-save { margin-inline-end: auto; } .lq-pdf-dialog-scroll { max-height: 56vh; overflow: auto; } .lq-pdf-form-row { display: flex; flex-direction: column; gap: 3px; } .lq-pdf-form-row[hidden] { display: none; } .lq-pdf-form-label { font-size: 0.92em; font-weight: 600; } .lq-pdf-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; } .lq-pdf-fieldset { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 8px 10px; border: 1px solid var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); } .lq-pdf-file-row { display: flex; align-items: center; gap: 8px; } .lq-pdf-error { margin: 0; color: var(--lq-pdf-danger); } .lq-pdf-error:empty { display: none; } .lq-pdf-progress { width: 100%; accent-color: var(--lq-pdf-accent); } .lq-pdf-table { width: 100%; border-collapse: collapse; } .lq-pdf-table th, .lq-pdf-table td { padding: 4px 6px; border-bottom: 1px solid var(--lq-pdf-border); text-align: start; } .lq-pdf kbd { padding: 1px 5px; border: 1px solid var(--lq-pdf-border); border-radius: 4px; background: var(--lq-pdf-chrome-bg); font: inherit; font-size: 0.9em; } .lq-pdf-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; } .lq-pdf-facts dt { color: var(--lq-pdf-muted); } .lq-pdf-facts dd { margin: 0; overflow-wrap: anywhere; } .lq-pdf-tabs { flex: none; overflow-x: auto; scrollbar-width: none; } .lq-pdf-tab { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 32px; } .lq-pdf-tabs [aria-selected="true"] { color: var(--lq-pdf-accent); } .lq-pdf-dialog .lq-pdf-tabs [role="tab"] { display: inline-flex; align-items: center; gap: 6px; } .lq-pdf-dialog .lq-pdf-tabs [role="tab"] svg { flex: none; width: 16px; height: 16px; } .lq-pdf-panel-title { flex: none; padding: 6px 10px 4px; font-size: 0.85em; font-weight: 600; color: var(--lq-pdf-muted); } .lq-pdf-panel-note { margin: 0; padding: 6px 10px; } .lq-pdf-page-tools { flex: none; flex-wrap: wrap; } .lq-pdf-annotation-item mark { background: var(--lq-pdf-search-hit); color: inherit; } .lq-pdf-redact-form { display: flex; flex: none; flex-direction: column; gap: 6px; padding: 8px; } .lq-pdf-redact-item { display: flex; align-items: center; gap: 2px; } .lq-pdf-redact-item .lq-pdf-annotation-item { flex: 1 1 auto; min-width: 0; grid-template-columns: 1fr; } .lq-pdf-redact-item .lq-pdf-annotation-item > * { grid-column: 1; } .lq-pdf-panel-footer { flex: none; align-items: center; } .lq-pdf-signature-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 8px; list-style: none; } .lq-pdf-signature-card { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--lq-pdf-border); border-inline-start: 4px solid var(--lq-pdf-muted); border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-bg); overflow-wrap: anywhere; } .lq-pdf-signature-card[role="button"] { cursor: pointer; } .lq-pdf-signature-valid { border-inline-start-color: var(--lq-pdf-page-success); } .lq-pdf-signature-warning { border-inline-start-color: var(--lq-pdf-page-warning); } .lq-pdf-signature-invalid { border-inline-start-color: var(--lq-pdf-danger); } .lq-pdf-signature-invalid .lq-pdf-signature-status { color: var(--lq-pdf-danger); } .lq-pdf-signature-line { font-size: 0.92em; } .lq-pdf-page-loading { background: var(--lq-pdf-page-bg) linear-gradient(100deg, var(--lq-pdf-page-bg) 30%, var(--lq-pdf-page-loading-sheen) 50%, var(--lq-pdf-page-bg) 70%) 0 0 / 200% 100%; animation: lq-pdf-shimmer 1.4s linear infinite; } @keyframes lq-pdf-shimmer { to { background-position: -200% 0; } } .lq-pdf-detail { inset: auto; } .lq-pdf-selection-locked { stroke: var(--lq-pdf-muted); stroke-dasharray: 1 3; } .lq-pdf-freetext { white-space: pre; user-select: none; } .lq-pdf[data-tool="cloud"] .lq-pdf-page, .lq-pdf[data-tool="callout"] .lq-pdf-page, .lq-pdf[data-tool="eraser"] .lq-pdf-page, .lq-pdf[data-tool="marqueeZoom"] .lq-pdf-page { cursor: crosshair; touch-action: none; user-select: none; } .lq-pdf[data-tool="marqueeZoom"] .lq-pdf-page { cursor: zoom-in; } .lq-pdf[data-tool="eraser"] .lq-pdf-page { cursor: cell; } .lq-pdf[data-tool="highlight"] .lq-pdf-page, .lq-pdf[data-tool="underline"] .lq-pdf-page, .lq-pdf[data-tool="strikeout"] .lq-pdf-page, .lq-pdf[data-tool="squiggly"] .lq-pdf-page, .lq-pdf[data-tool="insertText"] .lq-pdf-page, .lq-pdf[data-tool="replaceText"] .lq-pdf-page, .lq-pdf[data-tool="redaction"] .lq-pdf-page { cursor: text; } .lq-pdf[data-scroll-mode="page"] .lq-pdf-pages { min-height: 100%; } .lq-pdf-presentation { border: 0; border-radius: 0; } .lq-pdf-presentation .lq-pdf-toolbar-wrap, .lq-pdf-presentation .lq-pdf-sidebar { display: none; } .lq-pdf-presentation .lq-pdf-viewport { background: var(--lq-pdf-presentation-bg); } .lq-pdf-presentation-fallback { position: fixed; inset: 0; z-index: 2147483000; } .lq-pdf-attachment-zone { display: flex; flex-direction: column; gap: 8px; min-height: 100%; border: 2px dashed transparent; border-radius: var(--lq-pdf-radius); } .lq-pdf-attachment-dropping { border-color: var(--lq-pdf-accent); background: var(--lq-pdf-selection-bg); } .lq-pdf-attachment-notice { margin: 0; padding: 6px 8px; border-inline-start: 3px solid var(--lq-pdf-accent); font-size: 0.92em; } .lq-pdf-attachment-row { display: flex; align-items: center; gap: 6px; border-radius: var(--lq-pdf-radius); } tr.lq-pdf-attachment-row { display: table-row; } .lq-pdf-attachment-row:focus-visible { outline: 2px solid var(--lq-pdf-accent); outline-offset: -2px; } .lq-pdf-attachment-text { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 4px 6px; overflow-wrap: anywhere; } .lq-pdf-attachment-actions { display: inline-flex; flex-shrink: 0; gap: 2px; } .lq-pdf-attachment-scroll { overflow-x: auto; } .lq-pdf-attachment-table { width: 100%; border-collapse: collapse; font-size: 0.92em; } .lq-pdf-attachment-table th, .lq-pdf-attachment-table td { padding: 4px 6px; border-bottom: 1px solid var(--lq-pdf-border); text-align: start; vertical-align: middle; overflow-wrap: anywhere; } .lq-pdf-attachment-table thead th { color: var(--lq-pdf-muted); font-weight: 600; white-space: nowrap; } .lq-pdf-attachment-table tr[data-initial="true"] th { font-weight: 700; } .lq-pdf-dropping::after { content: attr(data-drop-label); position: absolute; inset: 8px; z-index: 50; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--lq-pdf-accent); border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-selection-bg); font-size: 1.2em; font-weight: 600; pointer-events: none; } .lq-pdf-compact .lq-pdf-sidebar { position: absolute; inset: 0 auto 0 0; z-index: 15; width: min(280px, 86%); box-shadow: var(--lq-pdf-panel-shadow); } .lq-pdf-compact[dir="rtl"] .lq-pdf-sidebar { inset: 0 0 0 auto; } .lq-pdf-compact .lq-pdf-tool { min-width: 36px; height: 36px; } .lq-pdf-compact .lq-pdf-menu-item { min-height: 40px; } .lq-pdf-narrow .lq-pdf-page-total, .lq-pdf-narrow .lq-pdf-tool-text span { display: none; } .lq-pdf-narrow .lq-pdf-popover { inset: auto 0 0 0 !important; width: auto; max-height: 60%; border-radius: 12px 12px 0 0; } .lq-pdf-narrow .lq-pdf-dialog { width: calc(100% - 12px); padding: 12px; } .lq-pdf[dir="rtl"] .lq-pdf-sidebar { border-right: 0; border-left: 1px solid var(--lq-pdf-border); } .lq-pdf-compare-bar { display: flex; flex: none; flex-wrap: wrap; align-items: center; gap: 6px; } .lq-pdf-compare-bar .lq-pdf-button[aria-pressed="true"] { border-color: var(--lq-pdf-accent); color: var(--lq-pdf-accent); font-weight: 600; } .lq-pdf-compare-layout { display: flex; flex: 1 1 auto; gap: 8px; min-height: 0; } .lq-pdf-compare-panes { display: grid; flex: 1 1 auto; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 0; min-height: 0; } .lq-pdf-compare-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; } .lq-pdf-compare-title { flex: none; margin: 0 0 4px; overflow: hidden; font-size: 0.92em; text-overflow: ellipsis; white-space: nowrap; } .lq-pdf-compare-scroll { display: flex; flex: 1 1 auto; flex-direction: column; gap: 8px; min-height: 0; padding: 8px; overflow: auto; background: var(--lq-pdf-canvas-bg); } .lq-pdf-compare-page { position: relative; flex: none; width: 100%; background: var(--lq-pdf-page-bg); box-shadow: var(--lq-pdf-page-shadow); } .lq-pdf-compare-page canvas { display: block; width: 100%; height: 100%; } .lq-pdf-compare-missing { background: repeating-linear-gradient(45deg, transparent 0 8px, var(--lq-pdf-compare-missing) 8px 16px); box-shadow: none; } .lq-pdf-compare-mark { position: absolute; border-radius: 2px; mix-blend-mode: multiply; } .lq-pdf-compare-mark.lq-pdf-compare-inserted { background: var(--lq-pdf-compare-inserted); } .lq-pdf-compare-mark.lq-pdf-compare-deleted { background: var(--lq-pdf-compare-deleted); } .lq-pdf-compare-mark.lq-pdf-compare-moved { background: var(--lq-pdf-compare-moved); } .lq-pdf-compare-current { outline: 2px solid var(--lq-pdf-page-warning); outline-offset: 1px; } .lq-pdf-compare-overlay { grid-template-columns: 1fr; } .lq-pdf-compare-overlay .lq-pdf-compare-pane { grid-area: 1 / 1; } .lq-pdf-compare-overlay .lq-pdf-compare-b { mix-blend-mode: multiply; pointer-events: none; } .lq-pdf-compare-overlay .lq-pdf-compare-b .lq-pdf-compare-scroll { background: transparent; } .lq-pdf-compare-modes, .lq-pdf-compare-opacity { display: inline-flex; align-items: center; gap: 6px; } .lq-pdf-compare-opacity[hidden], .lq-pdf-compare-list[hidden] { display: none; } .lq-pdf-compare-visual { position: absolute; inset: 0; display: none; pointer-events: none; } .lq-pdf-compare-visual-mode .lq-pdf-compare-visual { display: block; } .lq-pdf-compare-visual-mode .lq-pdf-compare-mark { display: none; } .lq-pdf-compare-page canvas.lq-pdf-compare-diff { position: absolute; opacity: var(--lq-pdf-compare-diff-opacity); } .lq-pdf-compare-region { position: absolute; box-sizing: border-box; min-width: 6px; min-height: 6px; border: 2px solid var(--lq-pdf-page-danger); border-radius: 2px; } .lq-pdf-compare-item.lq-pdf-compare-area { border-inline-start-color: var(--lq-pdf-page-danger); } .lq-pdf-compare-list { flex: none; width: 240px; margin: 0; padding: 0; overflow: auto; list-style: none; } .lq-pdf-compare-item { display: flex; flex-direction: column; gap: 2px; width: 100%; margin: 0 0 4px; padding: 6px 8px; border: 1px solid var(--lq-pdf-border); border-inline-start: 4px solid var(--lq-pdf-muted); border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-bg); text-align: start; overflow-wrap: anywhere; cursor: pointer; } .lq-pdf-compare-item.lq-pdf-compare-inserted { border-inline-start-color: var(--lq-pdf-page-success); } .lq-pdf-compare-item.lq-pdf-compare-deleted { border-inline-start-color: var(--lq-pdf-page-danger); } .lq-pdf-compare-item.lq-pdf-compare-moved { border-inline-start-color: var(--lq-pdf-page-accent); } .lq-pdf-compare-item[aria-current="true"] { background: var(--lq-pdf-selection-bg); } .lq-pdf-narrow .lq-pdf-compare-list { display: none; } .lq-pdf-narrow .lq-pdf-compare-panes { grid-template-columns: 1fr; grid-auto-rows: 1fr; } @media print { .lq-pdf-print-landscape { break-before: page; } html.lq-pdf-printing, html.lq-pdf-printing body { margin: 0 !important; padding: 0 !important; background: #ffffff !important; } .lq-pdf-print-page { height: 100vh; overflow: hidden; break-inside: avoid; } .lq-pdf-print-page:last-of-type { break-after: auto; page-break-after: auto; } .lq-pdf-print-root[data-print-scale="fit"] .lq-pdf-print-page { width: min(100vw, calc(100vh * var(--lq-pdf-print-ratio, 0.7071))); height: auto; margin: 0 auto; } .lq-pdf-print-root[data-print-scale="custom"] .lq-pdf-print-page { height: auto; } .lq-pdf-print-page img { object-fit: contain; } } @media (forced-colors: active) { .lq-pdf-tool[aria-pressed="true"], .lq-pdf-group-button[aria-selected="true"], .lq-pdf-menu-item:focus-visible, .lq-pdf-tabs [aria-selected="true"], .lq-pdf-annotation-item[aria-current="true"], .lq-pdf-thumb[aria-selected="true"] .lq-pdf-thumb-frame { outline: 2px solid Highlight; outline-offset: -2px; } .lq-pdf-menu, .lq-pdf-dialog, .lq-pdf-popover { border: 1px solid CanvasText; } .lq-pdf-search-hit, .lq-pdf-compare-mark { forced-color-adjust: none; } .lq-pdf-color-chip, .lq-pdf-swatch { forced-color-adjust: none; } .lq-pdf-page { forced-color-adjust: none; outline: 1px solid CanvasText; } } .lq-pdf-text-end { position: absolute; inset: 100% 0 0; z-index: -1; cursor: default; user-select: none; } .lq-pdf-text br { user-select: none; } .lq-pdf-toolbar { overflow-x: auto; scrollbar-width: none; } .lq-pdf-narrow .lq-pdf-zoom-step, .lq-pdf-narrow .lq-pdf-pointer-tools [data-tool="pan"], .lq-pdf-narrow .lq-pdf-pointer-tools [data-tool="marqueeZoom"], .lq-pdf-narrow .lq-pdf-toolbar > .lq-pdf-separator { display: none; } .lq-pdf-narrow .lq-pdf-toolbar { gap: 0; padding: 4px 2px; } .lq-pdf-narrow .lq-pdf-toolstrip { flex-wrap: wrap; overflow-x: hidden; row-gap: 4px; } .lq-pdf-narrow .lq-pdf-toolstrip .lq-pdf-tools, .lq-pdf-narrow .lq-pdf-toolstrip .lq-pdf-style-bar { flex-wrap: wrap; flex: 0 1 auto; min-width: 0; } .lq-pdf-narrow .lq-pdf-toolstrip > .lq-pdf-separator { display: none; } .lq-pdf-narrow .lq-pdf-zoom { max-width: 76px; } .lq-pdf kbd, .lq-pdf-menu-shortcut { direction: ltr; unicode-bidi: isolate; } .lq-pdf .lq-pdf-primary { color: var(--lq-pdf-accent-fg); } .lq-pdf .lq-pdf-primary:hover { background: var(--lq-pdf-accent); filter: brightness(1.08); } .lq-pdf .lq-pdf-danger { color: var(--lq-pdf-danger); } .lq-pdf .lq-pdf-button:disabled { opacity: 0.5; cursor: default; } .lq-pdf .lq-pdf-tool[aria-disabled="true"], .lq-pdf .lq-pdf-button[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; } .lq-pdf .lq-pdf-tool[aria-disabled="true"]:hover, .lq-pdf .lq-pdf-button[aria-disabled="true"]:hover { background: transparent; } .lq-pdf-filters { flex-wrap: wrap; } .lq-pdf-filters select { flex: 1 1 45%; } .lq-pdf-comment-search { flex: 1 1 100%; min-width: 0; } .lq-pdf-comment-count { margin: 0; padding: 0 10px 4px; font-size: 0.85em; } .lq-pdf-popover-note { margin: 0; font-size: 0.85em; color: var(--lq-pdf-muted); } .lq-pdf-thread .lq-pdf-reply-actions { display: flex; gap: 10px; } .lq-pdf-thread textarea { width: 100%; box-sizing: border-box; } .lq-pdf-tab-order { padding: 6px; border-top: 1px solid var(--lq-pdf-border); } .lq-pdf-panel-subtitle { margin: 4px 2px 6px; font-size: 0.85em; font-weight: 600; color: var(--lq-pdf-muted); } .lq-pdf-tab-order-modes { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; } .lq-pdf-tab-order-modes .lq-pdf-button[aria-pressed="true"] { border-color: var(--lq-pdf-accent); box-shadow: inset 0 0 0 1px var(--lq-pdf-accent); } .lq-pdf-tab-order-list { list-style: none; margin: 0; padding: 0; } .lq-pdf-calc-order-item, .lq-pdf-tab-order-item { display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 4px; padding: 3px 4px; margin: 2px 0; border: 1px solid var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-bg); cursor: grab; } .lq-pdf-tab-order-item.lq-pdf-drop-before { border-top: 2px solid var(--lq-pdf-accent); } .lq-pdf-tab-order-number { color: var(--lq-pdf-muted); font-variant-numeric: tabular-nums; text-align: right; } .lq-pdf-tab-order-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lq-pdf-tab-order-item .lq-pdf-icon-button { min-width: 24px; min-height: 24px; } .lq-pdf-tab-order-item .lq-pdf-icon-button:disabled { opacity: 0.35; cursor: default; } .lq-pdf-presence { position: absolute; left: 0; top: 0; z-index: 6; width: 0; height: 0; pointer-events: none; border-top: 12px solid var(--lq-pdf-presence-color, var(--lq-pdf-presence-default)); border-right: 12px solid transparent; transition: transform 80ms linear; } .lq-pdf-presence-name { position: absolute; left: 10px; top: 2px; padding: 1px 6px; border-radius: 8px; background: var(--lq-pdf-presence-color, var(--lq-pdf-presence-default)); color: var(--lq-pdf-presence-fg); font: 600 11px/1.4 var(--lq-font-family, system-ui, sans-serif); white-space: nowrap; } @media (prefers-reduced-motion: reduce) { .lq-pdf-presence { transition: none; } } .lq-pdf-field-message { position: absolute; z-index: 2; max-width: 260px; padding: 1px 5px; border: 1px solid var(--lq-pdf-page-danger); border-radius: 3px; background: var(--lq-pdf-page-danger-bg); color: var(--lq-pdf-page-danger-fg); font-size: 11px; line-height: 1.35; pointer-events: none; white-space: normal; } .lq-pdf-field-message.lq-pdf-field-hint { border-color: var(--lq-pdf-page-hint); background: var(--lq-pdf-page-hint-bg); color: var(--lq-pdf-page-hint-fg); } .lq-pdf-highlight-required .lq-pdf-field-required:not(:disabled) { border: 2px solid var(--lq-pdf-page-danger); background: var(--lq-pdf-field-required-bg); } .lq-pdf-highlight-required input.lq-pdf-field-required[type="checkbox"], .lq-pdf-highlight-required input.lq-pdf-field-required[type="radio"] { outline: 2px solid var(--lq-pdf-page-danger); outline-offset: 1px; } .lq-pdf-field-comb { padding: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: calc(var(--lq-pdf-comb-cell, 1ch) - 1ch); padding-inline-start: calc((var(--lq-pdf-comb-cell, 1ch) - 1ch) / 2); background-image: repeating-linear-gradient( to right, transparent 0, transparent calc(var(--lq-pdf-comb-cell, 1ch) - 1px), var(--lq-pdf-field-border) calc(var(--lq-pdf-comb-cell, 1ch) - 1px), var(--lq-pdf-field-border) var(--lq-pdf-comb-cell, 1ch) ); box-sizing: border-box; border-inline-width: 0; } .lq-pdf-field-rich { position: absolute; overflow: hidden; padding: 1px 3px; box-sizing: border-box; color: var(--lq-pdf-page-fg); pointer-events: none; white-space: pre-wrap; line-height: 1.2; } .lq-pdf-field-has-rich:not(:focus) { color: transparent; } .lq-pdf-field-has-rich:focus + .lq-pdf-field-rich { display: none; } .lq-pdf-field-barcode { border-style: dashed; background: repeating-linear-gradient(90deg, var(--lq-pdf-barcode-stripe) 0 2px, transparent 2px 5px); } .lq-pdf-field-button:not(:disabled) { cursor: pointer; background: var(--lq-pdf-field-button-bg); } .lq-pdf-field-filled, .lq-pdf-field-filled:focus { background: transparent; } .lq-pdf-form-section { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-top: 1px solid var(--lq-pdf-border); } .lq-pdf-form-section > .lq-pdf-panel-subtitle { margin: 0; } .lq-pdf-form-section select, .lq-pdf-form-section textarea { width: 100%; box-sizing: border-box; padding: 4px; border: 1px solid var(--lq-pdf-border); border-radius: 4px; background: var(--lq-pdf-bg); color: var(--lq-pdf-fg); } .lq-pdf-form-section .lq-pdf-field { position: static; display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; background: transparent; color: inherit; } .lq-pdf-form-section .lq-pdf-field[hidden] { display: none; } .lq-pdf-form-buttons { display: flex; flex-wrap: wrap; gap: 4px; } .lq-pdf-arrange-button { min-width: 28px; min-height: 28px; border: 1px solid var(--lq-pdf-border); } .lq-pdf-form-problem-text { color: var(--lq-pdf-danger); } .lq-pdf-calc-status[data-status="supported"]::before { content: "✓ "; } .lq-pdf-calc-status[data-status="unsupported"]::before { content: "✕ "; } .lq-pdf-calc-status[data-status="unsupported"] { color: var(--lq-pdf-danger); } .lq-pdf-calc-status { margin: 0; } .lq-pdf-choices { display: flex; flex-direction: column; gap: 8px; } .lq-pdf-choice { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-bg); color: var(--lq-pdf-fg); font: inherit; text-align: start; cursor: pointer; } .lq-pdf-choice:hover { border-color: var(--lq-pdf-accent); } .lq-pdf-choice-title { font-weight: 600; } .lq-pdf-organizer .lq-pdf-dialog-body { overflow: hidden; } .lq-pdf-organizer-toolbar { display: flex; flex-wrap: wrap; gap: 6px 14px; flex: 0 0 auto; } .lq-pdf-organizer-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; } .lq-pdf-organizer-group-label { font-size: 0.8em; font-weight: 600; color: var(--lq-pdf-muted); } .lq-pdf-organizer-range { width: 150px; } .lq-pdf-organizer-status { flex: 0 0 auto; color: var(--lq-pdf-muted); } .lq-pdf-organizer-main { display: flex; flex: 1 1 auto; gap: 10px; min-height: 0; } .lq-pdf-organizer-grid { position: relative; flex: 1 1 auto; min-width: 0; overflow: auto; border: 1px solid var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-canvas-bg); } .lq-pdf-organizer-grid:focus-visible { outline: 2px solid var(--lq-pdf-focus); outline-offset: -2px; } .lq-pdf-organizer-sizer { position: relative; min-height: 100%; } .lq-pdf-organizer-cell { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; width: 172px; height: 236px; padding: 10px 0 8px; box-sizing: border-box; cursor: default; user-select: none; } .lq-pdf-organizer-frame { display: flex; align-items: center; justify-content: center; width: 148px; height: 188px; border: 3px solid transparent; border-radius: 3px; box-sizing: border-box; cursor: grab; } .lq-pdf-organizer-frame canvas { pointer-events: none; } .lq-pdf-organizer-actions { position: absolute; top: 14px; inset-inline-end: 16px; display: none; gap: 2px; padding: 2px; border: 1px solid var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-panel-bg); color: var(--lq-pdf-fg); } .lq-pdf-organizer-cell:hover .lq-pdf-organizer-actions, .lq-pdf-organizer-grid:focus-visible .lq-pdf-organizer-focus .lq-pdf-organizer-actions { display: flex; } .lq-pdf-organizer-action { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 3px; cursor: pointer; } .lq-pdf-organizer-action:hover { background: var(--lq-pdf-selection-bg); } .lq-pdf-organizer-action[data-cell-action="delete"] { color: var(--lq-pdf-danger); } .lq-pdf-organizer-dragging .lq-pdf-organizer-cell { pointer-events: none; } .lq-pdf-organizer-band { position: absolute; border: 1px solid var(--lq-pdf-accent); background: var(--lq-pdf-selection-bg); opacity: 0.6; pointer-events: none; } .lq-pdf-organizer-zoom { width: 120px; accent-color: var(--lq-pdf-accent); } .lq-pdf-toolstrip-pages { flex-wrap: wrap; overflow-x: hidden; row-gap: 2px; } .lq-pdf-merge-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border: 1px dashed var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); } .lq-pdf-merge-drop-active { border-color: var(--lq-pdf-accent); background: var(--lq-pdf-selection-bg); } .lq-pdf-merge-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; max-height: 260px; overflow-y: auto; } .lq-pdf-merge-list:empty { display: none; } .lq-pdf-merge-row { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border: 1px solid var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); background: var(--lq-pdf-panel-bg); } .lq-pdf-merge-before { box-shadow: 0 -3px 0 var(--lq-pdf-accent); } .lq-pdf-merge-after { box-shadow: 0 3px 0 var(--lq-pdf-accent); } .lq-pdf-merge-name { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; cursor: grab; user-select: none; } .lq-pdf-merge-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .lq-pdf-merge-pages { flex: 0 0 130px; width: 130px; } .lq-pdf-merge-result { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 8px 10px; border: 1px solid var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); } .lq-pdf-merge-progress { display: flex; align-items: center; gap: 10px; } .lq-pdf-merge-progress[hidden] { display: none; } .lq-pdf-merge-progress progress { flex: 1 1 auto; accent-color: var(--lq-pdf-accent); } .lq-pdf-organizer-frame canvas { max-width: 100%; max-height: 100%; background: var(--lq-pdf-page-bg); box-shadow: var(--lq-pdf-page-shadow); } .lq-pdf-organizer-cell[aria-selected="true"] .lq-pdf-organizer-frame { border-color: var(--lq-pdf-accent); background: var(--lq-pdf-selection-bg); } .lq-pdf-organizer-cell[aria-selected="true"] .lq-pdf-thumbnail-label { font-weight: 700; text-decoration: underline; } .lq-pdf-organizer-grid:focus-visible .lq-pdf-organizer-focus .lq-pdf-organizer-frame, .lq-pdf-organizer-source:focus-visible .lq-pdf-organizer-frame { outline: 2px solid var(--lq-pdf-focus); outline-offset: 2px; } .lq-pdf-organizer-cell .lq-pdf-thumbnail-label { padding: 0 6px; border-radius: 3px; background: var(--lq-pdf-panel-bg); color: var(--lq-pdf-fg); font-variant-numeric: tabular-nums; } .lq-pdf-organizer-marker { position: absolute; width: 4px; height: 236px; margin-left: -2px; background: var(--lq-pdf-accent); pointer-events: none; } .lq-pdf-organizer-second { display: flex; flex: 0 0 210px; flex-direction: column; gap: 6px; min-height: 0; padding: 8px; border: 1px solid var(--lq-pdf-border); border-radius: var(--lq-pdf-radius); } .lq-pdf-organizer-second[hidden] { display: none; } .lq-pdf-organizer-second p, .lq-pdf-organizer-second h3 { margin: 0; } .lq-pdf-organizer-second-list { flex: 1 1 auto; min-height: 0; overflow: auto; background: var(--lq-pdf-canvas-bg); } .lq-pdf-organizer-source { position: static; outline: none; } .lq-pdf-accessibility-summary { margin: 0 0 8px; font-weight: 600; } .lq-pdf-accessibility-summary[data-state="error"] { color: var(--lq-pdf-danger); } .lq-pdf-accessibility-list { margin: 0 0 12px; padding: 0; list-style: none; max-height: 40vh; overflow: auto; } .lq-pdf-accessibility-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; } .lq-pdf-accessibility-item > span:nth-child(2) { flex: 1 1 auto; } .lq-pdf-accessibility-mark { display: inline-flex; color: var(--lq-pdf-muted); } .lq-pdf-accessibility-item[data-severity="error"] .lq-pdf-accessibility-mark { color: var(--lq-pdf-danger); } .lq-pdf-accessibility-item .lq-pdf-link-button { min-height: 24px; padding: 0 4px; } .lq-pdf-accessibility-controls { display: flex; gap: 8px; } .lq-pdf-accessibility-controls > .lq-pdf-input { flex: 1 1 auto; min-width: 0; } .lq-pdf-organizer-drop-target { outline: 2px solid var(--lq-pdf-accent); outline-offset: -2px; } .lq-pdf-organizer-drop-before { box-shadow: 0 -3px 0 var(--lq-pdf-accent); } .lq-pdf-organizer-drop-after { box-shadow: 0 3px 0 var(--lq-pdf-accent); } .lq-pdf-boxes-layout { display: flex; flex-wrap: wrap; gap: 14px; } .lq-pdf-boxes-table { display: flex; flex: 1 1 380px; flex-direction: column; gap: 6px; } .lq-pdf-boxes-row { display: grid; grid-template-columns: 110px repeat(4, minmax(0, 1fr)); align-items: center; gap: 4px; } .lq-pdf-boxes-row .lq-pdf-input { width: 100%; min-width: 0; box-sizing: border-box; } .lq-pdf-boxes-name { display: inline-flex; align-items: center; gap: 6px; } .lq-pdf-boxes-swatch { width: 12px; height: 12px; border: 2px solid; box-sizing: border-box; } .lq-pdf-boxes-preview { flex: 0 0 180px; width: 180px; height: 230px; background: var(--lq-pdf-canvas-bg); } .lq-pdf-label-ranges { display: flex; flex-direction: column; gap: 8px; } .lq-pdf-label-range { display: grid; grid-template-columns: 90px 1fr 1fr 100px auto; align-items: end; gap: 6px; } .lq-pdf-label-range .lq-pdf-input { width: 100%; min-width: 0; box-sizing: border-box; } .lq-pdf-input[aria-invalid="true"] { border-color: var(--lq-pdf-danger); box-shadow: 0 0 0 1px var(--lq-pdf-danger); } .lq-pdf { --lq-pdf-surface-2: var(--lq-surface-2, var(--lq-pdf-chrome-bg)); --lq-pdf-border-subtle: var(--lq-border-subtle, #e6eaef); --lq-pdf-input-border: var(--lq-input-border, #818b98); --lq-pdf-hover: var(--lq-row-hover, #eef2f6); --lq-pdf-radius-control: var(--lq-radius-control, 4px); --lq-pdf-radius-surface: var(--lq-radius-surface, var(--lq-pdf-radius)); --lq-pdf-radius-dialog: var(--lq-radius-dialog, 8px); --lq-pdf-control-height: var(--lq-control-height, 32px); --lq-pdf-text-xs: var(--lq-text-xs, 11px); --lq-pdf-text-sm: var(--lq-text-sm, 12px); --lq-pdf-text-lg: var(--lq-text-lg, 15px); --lq-pdf-pressed-bg: color-mix(in srgb, var(--lq-pdf-accent) 16%, transparent); --lq-pdf-pressed-edge: color-mix(in srgb, var(--lq-pdf-accent) 55%, transparent); --lq-pdf-active-bg: color-mix(in srgb, var(--lq-pdf-fg) 12%, transparent); } .lq-pdf.lq-theme-dark, .lq-theme-dark .lq-pdf:not(.lq-theme-light) { --lq-pdf-border-subtle: var(--lq-border-subtle, #262c36); --lq-pdf-input-border: var(--lq-input-border, #6e7681); --lq-pdf-hover: var(--lq-row-hover, #1f2630); } @media (prefers-color-scheme: dark) { .lq-pdf.lq-theme-auto { --lq-pdf-border-subtle: var(--lq-border-subtle, #262c36); --lq-pdf-input-border: var(--lq-input-border, #6e7681); --lq-pdf-hover: var(--lq-row-hover, #1f2630); } } .lq-pdf-tool, .lq-pdf-button, .lq-pdf-menu-item, .lq-pdf-icon-button, .lq-pdf-group-button, .lq-pdf-group-menu, .lq-pdf-rich-button, .lq-pdf-input, .lq-pdf-style-select, .lq-pdf-field-select, .lq-pdf .lq-pdf-page-input, .lq-pdf .lq-pdf-zoom { border-radius: var(--lq-pdf-radius-control); transition: none; } .lq-pdf-button, .lq-pdf-input, .lq-pdf-menu-item { box-sizing: border-box; min-height: var(--lq-pdf-control-height); } .lq-pdf-input { height: var(--lq-pdf-control-height); } .lq-pdf-button, .lq-pdf-input, .lq-pdf-style-select, .lq-pdf-field-select, .lq-pdf .lq-pdf-page-input, .lq-pdf .lq-pdf-zoom { border-color: var(--lq-pdf-input-border); } .lq-pdf-input[type="range"] { border: 0; } .lq-pdf-tool:hover:not(:disabled), .lq-pdf-button:hover:not(:disabled), .lq-pdf-menu-item:hover, .lq-pdf-menu-item:focus-visible, .lq-pdf-icon-button:hover:not(:disabled), .lq-pdf-rich-button:hover, .lq-pdf-group-button:hover, .lq-pdf-tab:hover { background: var(--lq-pdf-hover); } .lq-pdf-tool:active:not(:disabled), .lq-pdf-button:active:not(:disabled), .lq-pdf-menu-item:active, .lq-pdf-icon-button:active:not(:disabled), .lq-pdf-rich-button:active, .lq-pdf-group-button:active { background: var(--lq-pdf-active-bg); } .lq-pdf-tool[aria-pressed="true"], .lq-pdf-rich-button[aria-pressed="true"], .lq-pdf-compare-bar .lq-pdf-button[aria-pressed="true"], .lq-pdf-tab-order-modes .lq-pdf-button[aria-pressed="true"], .lq-pdf-menu-item[aria-checked="true"], .lq-pdf-palette-item[aria-selected="true"], .lq-pdf-stamp-option[aria-pressed="true"] { background: var(--lq-pdf-pressed-bg); border-color: var(--lq-pdf-pressed-edge); box-shadow: inset 0 0 0 1px var(--lq-pdf-pressed-edge); color: var(--lq-pdf-fg); font-weight: inherit; } .lq-pdf-group-button[aria-selected="true"] { background: var(--lq-pdf-pressed-bg); box-shadow: inset 0 -2px 0 var(--lq-pdf-accent); color: var(--lq-pdf-fg); } .lq-pdf .lq-pdf-primary, .lq-pdf .lq-pdf-primary:hover:not(:disabled) { border-color: var(--lq-pdf-accent); background: var(--lq-pdf-accent); color: var(--lq-pdf-accent-fg); } .lq-pdf .lq-pdf-primary:hover:not(:disabled) { filter: brightness(1.08); } .lq-pdf .lq-pdf-button.lq-pdf-danger { border-color: var(--lq-pdf-danger); background: transparent; color: var(--lq-pdf-danger); } .lq-pdf-tool:disabled, .lq-pdf-tool[aria-disabled="true"], .lq-pdf .lq-pdf-button:disabled, .lq-pdf-button[aria-disabled="true"], .lq-pdf-icon-button:disabled, .lq-pdf-menu-item[aria-disabled="true"], .lq-pdf-input:disabled, .lq-pdf-toolstrip .lq-pdf-tool[aria-disabled="true"], .lq-pdf-tab-order-item .lq-pdf-icon-button:disabled { opacity: 0.55; cursor: not-allowed; } .lq-pdf [aria-busy="true"] { opacity: 0.7; cursor: progress; } .lq-pdf [aria-invalid="true"]:not(.lq-pdf-field) { border-color: var(--lq-pdf-danger); box-shadow: inset 0 0 0 1px var(--lq-pdf-danger); } .lq-pdf :focus-visible { outline: 2px solid var(--lq-pdf-focus); outline-offset: 1px; transition: none; } .lq-pdf-menu, .lq-pdf-popover { border-radius: var(--lq-pdf-radius-surface); } .lq-pdf-dialog { border-radius: var(--lq-pdf-radius-dialog); } .lq-pdf-dialog h2 { font-size: var(--lq-pdf-text-lg); font-weight: 600; } .lq-pdf-dialog-actions { justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--lq-pdf-border-subtle); } .lq-pdf-menu-heading, .lq-pdf-panel-title, .lq-pdf-panel-subtitle { font-size: var(--lq-pdf-text-sm); letter-spacing: 0; } .lq-pdf-menu-shortcut, .lq-pdf-strip-caption { font-size: var(--lq-pdf-text-xs); } .lq-pdf-toolbar, .lq-pdf-toolstrip, .lq-pdf-sidebar { background: var(--lq-pdf-surface-2); } @media (prefers-reduced-motion: reduce) { .lq-pdf *, .lq-pdf *::before, .lq-pdf *::after { transition: none !important; animation: none !important; } } @media (forced-colors: active) { .lq-pdf :focus-visible { outline-color: Highlight; } .lq-pdf-button, .lq-pdf-input { border-color: ButtonText; } .lq-pdf .lq-pdf-primary, .lq-pdf-tool[aria-pressed="true"], .lq-pdf-group-button[aria-selected="true"] { background: Highlight; color: HighlightText; forced-color-adjust: none; } .lq-pdf-tool:disabled, .lq-pdf .lq-pdf-button:disabled, .lq-pdf-menu-item[aria-disabled="true"] { color: GrayText; opacity: 1; } } `
```

### pdfViewerDefinition

Kind: const. Import from `@birchui/pdf`.

```ts
const pdfViewerDefinition: WidgetDefinition<PdfViewerOptions | undefined, { historyChange: any; zoomChange: any; save: any; documentLoad: any; documentPreview: any; layersChange: any; viewStateChange: any; tabChange: any; documentError: any; pageChange: any; annotationPresetsChange: any; annotationAdd: any; annotationChange: any; annotationRemove: any; annotationSelect: any; layoutChange: any; presentationChange: any; printProgress: any; formFieldChange: any; pagesChange: any; documentChange: any; fontMissing: any; toolChange: any; searchResult: any; formValidation: any; formSubmit: any; formReset: any; formDataExport: any; pagesSplit: any; filesMerge: any; mailConversion: any; attachmentOpen: any; textRecognition: any; pagesExport: any; textExport: any; officeExport: any; fillInitialsChange: any; organizerSecondChange: any; compareReport: any; documentSanitize: any; }, PdfViewerApi>
```

### PLACEHOLDER_PAGE_ID

Kind: const. Import from `@birchui/pdf`.

```ts
const PLACEHOLDER_PAGE_ID: "placeholder" = 'placeholder'
```

### RECOGNISED_FUNCTIONS

Kind: const. Import from `@birchui/pdf`.

```ts
const RECOGNISED_FUNCTIONS: readonly string[]
```

### REDACTION_PATTERN_NAMES

Kind: const. Import from `@birchui/pdf`.

```ts
const REDACTION_PATTERN_NAMES: readonly ("date" | "email" | "phone" | "ssn" | "creditCard" | "iban")[]
```

### REDACTION_PATTERNS

Kind: const. Import from `@birchui/pdf`.

```ts
const REDACTION_PATTERNS: { readonly email: RegExp; readonly phone: RegExp; readonly ssn: RegExp; readonly creditCard: RegExp; readonly iban: RegExp; readonly date: RegExp; }
```

### RICH_TEXT_DEFAULTS

Kind: const. Import from `@birchui/pdf`.

```ts
const RICH_TEXT_DEFAULTS: RichTextDefaults
```

### STAMP_COLORS

Kind: const. Import from `@birchui/pdf`.

```ts
const STAMP_COLORS: Record<string, string>
```

### STAMP_LABELS

Kind: const. Import from `@birchui/pdf`.

```ts
const STAMP_LABELS: Record<string, string>
```

### AccessibilityIssue

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AccessibilityIssue
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `AccessibilityCode` |  |
| `severity` | `'error' \| 'warning'` |  |
| `message` | `string` |  |
| `pageIndex?` | `number` |  |
| `figureId?` | `string` | For `figure-without-alt`: the id to pass to `setAlternateText`. |

### AccessibilityReport

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AccessibilityReport
```

| Property | Type | Description |
| --- | --- | --- |
| `isTagged` | `boolean` |  |
| `title?` | `string` |  |
| `language?` | `string` |  |
| `figures` | `PdfFigure[]` |  |
| `issues` | `AccessibilityIssue[]` |  |
| `passes` | `boolean` | True when no issue of severity `error` was found. It is a pre-flight check, not a statement of conformance. |

### AddDocumentTimestampOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AddDocumentTimestampOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `timestamp` | `TimestampCallback` |  |
| `fieldName?` | `string` |  |
| `placeholderSize?` | `number` |  |
| `password?` | `string` |  |

### AddImageOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AddImageOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `rect` | `PdfRect` |  |
| `opacity?` | `number` |  |
| `rotation?` | `number` |  |

### AddMarkOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AddMarkOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `kind` | `PageMarkKind` |  |
| `x` | `number` | Centre of the mark. |
| `y` | `number` |  |
| `size?` | `number` |  |
| `color?` | `string` |  |

### AddTextOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AddTextOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `x` | `number` |  |
| `y` | `number` |  |
| `fontSize?` | `number` |  |
| `color?` | `string` |  |
| `opacity?` | `number` |  |
| `font?` | `StandardFontName` |  |
| `fontName?` | `string` | Name of a supplied font to use instead of a standard one. |
| `rotation?` | `number` |  |
| `lineHeight?` | `number` |  |
| `fonts?` | `FontRegistry` |  |

### AddTextResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AddTextResult extends TextEditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `rect?` | `PdfRect` |  |
| `ok` | `boolean` | Inherited from TextEditResult. |
| `reason?` | `ContentEditFailure \| undefined` | Inherited from TextEditResult. |
| `message?` | `string \| undefined` | Inherited from TextEditResult. |
| `usedFont?` | `"original" \| "embedded" \| "standard" \| undefined` | Inherited from TextEditResult. |
| `fontNames?` | `string[] \| undefined` | Inherited from TextEditResult. |
| `missing?` | `string \| undefined` | Inherited from TextEditResult. |
| `widthChange?` | `number \| undefined` | Inherited from TextEditResult. |

### AddValidationDataOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AddValidationDataOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `certificates?` | `(Uint8Array \| string)[]` |  |
| `ocsps?` | `Uint8Array[]` |  |
| `crls?` | `Uint8Array[]` |  |
| `fetch?` | `ValidationDataCallback` |  |
| `password?` | `string` |  |
| `now?` | `Date` |  |

### AnnotationAttachment

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationAttachment
```

| Property | Type | Description |
| --- | --- | --- |
| `fileName` | `string` |  |
| `mimeType?` | `string` |  |
| `description?` | `string` |  |
| `size?` | `number` |  |
| `data?` | `Uint8Array` |  |
| `relationship?` | `AttachmentRelationship` |  |

### AnnotationAttachmentFile

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationAttachmentFile
```

| Property | Type | Description |
| --- | --- | --- |
| `fileName` | `string` |  |
| `mimeType` | `string` |  |
| `description?` | `string` |  |
| `data` | `Uint8Array` |  |
| `relationship?` | `AttachmentRelationship` |  |

### AnnotationChangeSet

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationChangeSet
```

| Property | Type | Description |
| --- | --- | --- |
| `added` | `PdfAnnotation[]` |  |
| `changed` | `{ before: PdfAnnotation; after: PdfAnnotation }[]` |  |
| `removed` | `PdfAnnotation[]` |  |
| `source` | `ChangeSource` |  |

### AnnotationDefaults

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationDefaults
```

| Property | Type | Description |
| --- | --- | --- |
| `color` | `string` |  |
| `opacity` | `number` |  |
| `strokeWidth` | `number` |  |
| `fillColor?` | `string` |  |
| `fontSize?` | `number` |  |

### AnnotationImage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationImage
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `mimeType` | `'image/png' \| 'image/jpeg'` |  |
| `width` | `number` |  |
| `height` | `number` |  |

### AnnotationPermissionOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationPermissionOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `isDocumentReadOnly?` | `boolean` |  |
| `canAnnotate?` | `boolean` |  |

### AnnotationPermissions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationPermissions
```

| Property | Type | Description |
| --- | --- | --- |
| `canMove` | `boolean` |  |
| `canResize` | `boolean` |  |
| `canEditContents` | `boolean` |  |
| `canEditStyle` | `boolean` |  |
| `canDelete` | `boolean` |  |
| `canReply` | `boolean` |  |
| `canChangeStatus` | `boolean` |  |
| `isOwner` | `boolean` |  |

### AnnotationPreset

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationPreset extends AnnotationPresetStyle
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `name` | `string` |  |
| `type` | `AnnotationType` |  |
| `color?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `fillColor?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `opacity?` | `number \| undefined` | Inherited from AnnotationPresetStyle. |
| `strokeWidth?` | `number \| undefined` | Inherited from AnnotationPresetStyle. |
| `borderStyle?` | `BorderStyle \| undefined` | Inherited from AnnotationPresetStyle. |
| `lineEndings?` | `[LineEnding, LineEnding] \| undefined` | Inherited from AnnotationPresetStyle. |
| `fontSize?` | `number \| undefined` | Inherited from AnnotationPresetStyle. |
| `fontColor?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `fontFamily?` | `AnnotationFont \| undefined` | Inherited from AnnotationPresetStyle. |
| `textAlign?` | `RichTextAlign \| undefined` | Inherited from AnnotationPresetStyle. |
| `icon?` | `NoteIcon \| undefined` | Inherited from AnnotationPresetStyle. |
| `iconName?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `stamp?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `stampLabel?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `label?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `measureScale?` | `MeasureScale \| undefined` | Inherited from AnnotationPresetStyle. |
| `rotation?` | `number \| undefined` | Inherited from AnnotationPresetStyle. |
| `overlayText?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `text?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `contents?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `width?` | `number \| undefined` | Inherited from AnnotationPresetStyle. |
| `height?` | `number \| undefined` | Inherited from AnnotationPresetStyle. |

### AnnotationPresetsJson

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationPresetsJson
```

| Property | Type | Description |
| --- | --- | --- |
| `format` | `'birchui-pdf-annotation-presets'` |  |
| `version` | `1` |  |
| `presets` | `AnnotationPreset[]` |  |

### AnnotationPresetStyle

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationPresetStyle
```

| Property | Type | Description |
| --- | --- | --- |
| `color?` | `string` |  |
| `fillColor?` | `string` |  |
| `opacity?` | `number` |  |
| `strokeWidth?` | `number` |  |
| `borderStyle?` | `BorderStyle` |  |
| `lineEndings?` | `[LineEnding, LineEnding]` |  |
| `fontSize?` | `number` |  |
| `fontColor?` | `string` |  |
| `fontFamily?` | `AnnotationFont` |  |
| `textAlign?` | `RichTextAlign` |  |
| `icon?` | `NoteIcon` |  |
| `iconName?` | `string` |  |
| `stamp?` | `string` |  |
| `stampLabel?` | `string` |  |
| `label?` | `string` |  |
| `measureScale?` | `MeasureScale` |  |
| `rotation?` | `number` |  |
| `overlayText?` | `string` |  |
| `text?` | `string` |  |
| `contents?` | `string` |  |
| `width?` | `number` |  |
| `height?` | `number` |  |

### AnnotationReply

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationReply
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `author` | `string` |  |
| `contents` | `string` |  |
| `createdAt` | `string` |  |
| `modifiedAt` | `string` |  |

### AnnotationsFdfImport

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationsFdfImport
```

| Property | Type | Description |
| --- | --- | --- |
| `annotations` | `AnnotationInput[]` |  |
| `fileName?` | `string` |  |

### AnnotationsFdfOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationsFdfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `fileName?` | `string` |  |
| `includeAppearances?` | `boolean` |  |
| `fonts?` | `FontRegistry` |  |
| `pageRotations?` | `readonly number[]` |  |

### AnnotationsJson

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationsJson
```

| Property | Type | Description |
| --- | --- | --- |
| `format` | `'birchui-pdf-annotations'` |  |
| `version` | `1` |  |
| `annotations` | `(Omit<PdfAnnotation, 'image'> & { image?: { data: string; mimeType: string; width: number; height: number }; })[]` |  |

### AnnotationSync

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationSync
```

| Property | Type | Description |
| --- | --- | --- |
| `receive` | `(operations: SyncOperation \| SyncOperation[]) => void` |  |
| `merge` | `(snapshot: SyncSnapshot) => void` |  |
| `snapshot` | `() => SyncSnapshot` |  |
| `refresh` | `() => void` |  |
| `destroy` | `() => void` |  |

### AnnotationSyncChannel

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationSyncChannel
```

| Property | Type | Description |
| --- | --- | --- |
| `actorId?` | `string` |  |
| `color?` | `string` |  |
| `send` | `(operations: SyncOperation[]) => void` |  |
| `onRemote` | `(receive: (operations: SyncOperation \| SyncOperation[]) => void) => (() => void) \| void` |  |
| `sendPresence?` | `(message: PresenceMessage) => void` |  |
| `onRemotePresence?` | `(receive: (message: PresenceMessage) => void) => (() => void) \| void` |  |
| `onConflict?` | `(conflict: SyncConflict) => void` |  |
| `snapshot?` | `SyncSnapshot` |  |
| `sendFormValues?` | `(operations: FormSyncOperation[]) => void` |  |
| `onRemoteFormValues?` | `(receive: (operations: FormSyncOperation \| FormSyncOperation[]) => void) => (() => void) \| void` |  |
| `onFormConflict?` | `(conflict: FormSyncConflict) => void` |  |
| `sendPageOperations?` | `(operations: PageSyncOperation[]) => void` |  |
| `onRemotePageOperations?` | `(receive: (operations: PageSyncOperation \| PageSyncOperation[]) => void) => (() => void) \| void` |  |
| `onPageConflict?` | `(conflict: PageSyncConflict) => void` |  |
| `presenceTimeout?` | `number` |  |
| `onPresenceChange?` | `(collaborators: PresenceState[]) => void` |  |

### AnnotationSyncHost

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationSyncHost
```

| Property | Type | Description |
| --- | --- | --- |
| `getAnnotations` | `() => PdfAnnotation[]` |  |
| `applyRemoteChanges` | `(changes: RemoteAnnotationChanges) => void` |  |
| `subscribeAnnotationChanges` | `(listener: (changes: SyncAnnotationChanges) => void) => () => void` |  |

### AnnotationSyncOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationSyncOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `actorId` | `string` |  |
| `send` | `(operations: SyncOperation[]) => void` |  |
| `author?` | `string` |  |
| `onConflict?` | `(conflict: SyncConflict) => void` |  |
| `snapshot?` | `SyncSnapshot` |  |
| `pageIds?` | `() => readonly (string \| undefined)[]` |  |

### AnnotationUser

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AnnotationUser
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `id?` | `string` |  |
| `isAdmin?` | `boolean` |  |

### ApplyRedactionsAsyncOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ApplyRedactionsAsyncOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `decodeImage?` | `AsyncRedactionImageDecoder` |  |

### ApplyRedactionsOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ApplyRedactionsOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `decodeImage?` | `RedactionImageDecoder` |  |

### ArcGeometry

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ArcGeometry
```

| Property | Type | Description |
| --- | --- | --- |
| `center` | `PdfPoint` |  |
| `radius` | `number` |  |
| `startAngle` | `number` |  |
| `sweep` | `number` |  |
| `length` | `number` |  |

### ArchiveFinding

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ArchiveFinding
```

| Property | Type | Description |
| --- | --- | --- |
| `rule` | `ArchiveRule` |  |
| `severity` | `ArchiveSeverity` |  |
| `message` | `string` |  |
| `pageIndex?` | `number` |  |

### ArchiveFontUsage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ArchiveFontUsage
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `isEmbedded` | `boolean` |  |
| `pages` | `number[]` |  |

### ArchiveReport

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ArchiveReport
```

| Property | Type | Description |
| --- | --- | --- |
| `isLikelyConformant` | `boolean` |  |
| `declared?` | `{ part: number; conformance?: string }` |  |
| `findings` | `ArchiveFinding[]` |  |
| `fonts` | `ArchiveFontUsage[]` |  |

### AttachmentOpenEvent

Kind: interface. Import from `@birchui/pdf`.

```ts
interface AttachmentOpenEvent
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `mimeType` | `string` |  |
| `size` | `number` |  |
| `data` | `Uint8Array` |  |
| `source` | `'document' \| 'annotation'` |  |
| `pageIndex?` | `number` |  |
| `relationship?` | `AttachmentRelationship` |  |
| `description?` | `string` |  |

### BackgroundOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface BackgroundOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `color?` | `string` |  |
| `image?` | `Uint8Array` |  |
| `opacity?` | `number` |  |

### BarcodeFieldInfo

Kind: interface. Import from `@birchui/pdf`.

```ts
interface BarcodeFieldInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `symbology` | `'pdf417' \| 'qrCode' \| 'dataMatrix' \| 'unknown'` |  |

### BatesOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface BatesOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `prefix?` | `string` |  |
| `suffix?` | `string` |  |
| `start?` | `number` |  |
| `digits?` | `number` |  |
| `position?` | `StampPosition` |  |
| `fontSize?` | `number` |  |
| `color?` | `string` |  |
| `font?` | `StandardFont` |  |
| `margin?` | `number` |  |
| `fonts?` | `FontRegistry` |  |

### BlankScanOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface BlankScanOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `whiteLevel?` | `number` | Lightness from 0 to 255 at or above which a pixel counts as paper. |
| `tolerance?` | `number` | Share of pixels that may be darker than paper, for dust and scanner noise. |
| `border?` | `number` | Share of each edge that is left out, where scanners leave shadows. |

### ChainProblem

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ChainProblem
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `ChainProblemCode` |  |
| `index` | `number` | Position in the chain of the certificate the problem is about; 0 is the signer. |
| `subject` | `string` |  |
| `message` | `string` |  |

### CommentFilter

Kind: interface. Import from `@birchui/pdf`.

```ts
interface CommentFilter
```

| Property | Type | Description |
| --- | --- | --- |
| `author?` | `string` |  |
| `type?` | `AnnotationType` |  |
| `status?` | `ReviewStatus` |  |
| `pages?` | `number[]` |  |

### CommentSummaryOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface CommentSummaryOptions extends CommentFilter
```

| Property | Type | Description |
| --- | --- | --- |
| `format` | `CommentSummaryFormat` |  |
| `sort?` | `CommentSort` |  |
| `title?` | `string` |  |
| `includeReplies?` | `boolean` |  |
| `fonts?` | `PdfFontSource[]` |  |
| `allowMissingGlyphs?` | `boolean` |  |
| `author?` | `string \| undefined` | Inherited from CommentFilter. |
| `type?` | `AnnotationType \| undefined` | Inherited from CommentFilter. |
| `status?` | `ReviewStatus \| undefined` | Inherited from CommentFilter. |
| `pages?` | `number[] \| undefined` | Inherited from CommentFilter. |

### ComparableDocument

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ComparableDocument
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly pageCount` | `number` |  |
| `getPageText` | `(pageIndex: number) => ComparablePageText` |  |

### ComparablePageText

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ComparablePageText
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `boxes` | `(PdfRect \| undefined)[]` |  |

### ComparePdfAsyncOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ComparePdfAsyncOptions extends ComparePdfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `password?` | `string` |  |
| `otherPassword?` | `string` |  |
| `ignoreCase?` | `boolean \| undefined` | Inherited from ComparePdfOptions. |
| `ignoreWhitespace?` | `boolean \| undefined` | Inherited from ComparePdfOptions. |
| `annotations?` | `boolean \| undefined` | Inherited from ComparePdfOptions. |
| `minMoveWords?` | `number \| undefined` | Inherited from ComparePdfOptions. |
| `pageSimilarityThreshold?` | `number \| undefined` | Inherited from ComparePdfOptions. |
| `colors?` | `{ inserted?: string; deleted?: string; moved?: string; } \| undefined` | Inherited from ComparePdfOptions. |
| `author?` | `string \| undefined` | Inherited from ComparePdfOptions. |

### ComparePdfOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ComparePdfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `ignoreCase?` | `boolean` |  |
| `ignoreWhitespace?` | `boolean` |  |
| `annotations?` | `boolean` |  |
| `minMoveWords?` | `number` |  |
| `pageSimilarityThreshold?` | `number` |  |
| `colors?` | `{ inserted?: string; deleted?: string; moved?: string }` |  |
| `author?` | `string` |  |

### CompareReportLabels

Kind: interface. Import from `@birchui/pdf`.

```ts
interface CompareReportLabels
```

| Property | Type | Description |
| --- | --- | --- |
| `title` | `string` |  |
| `first` | `string` |  |
| `second` | `string` |  |
| `page` | `string` |  |
| `change` | `string` |  |
| `text` | `string` |  |
| `inserted` | `string` |  |
| `deleted` | `string` |  |
| `moved` | `string` |  |
| `none` | `string` |  |
| `pages` | `string` |  |
| `words` | `string` |  |

### CompareReportOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface CompareReportOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `format?` | `CompareReportFormat` |  |
| `fileNameA?` | `string` |  |
| `fileNameB?` | `string` |  |
| `date?` | `Date \| string` |  |
| `labels?` | `Partial<CompareReportLabels>` |  |

### CropPagesOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface CropPagesOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `removeContent?` | `boolean` |  |

### CustomToolbarItem

Kind: interface. Import from `@birchui/pdf`.

```ts
interface CustomToolbarItem
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'custom'` |  |
| `id` | `string` |  |
| `label` | `string` |  |
| `icon?` | `string` |  |
| `onClick` | `(viewer: PdfViewerApi) => void` |  |
| `isDisabled?` | `(viewer: PdfViewerApi) => boolean` |  |

### DecodedImage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface DecodedImage
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `data` | `Uint8Array \| Uint8ClampedArray` |  |

### DecodedRedactionImage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface DecodedRedactionImage
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `rgba` | `Uint8Array \| Uint8ClampedArray` |  |

### DecompressRtfOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface DecompressRtfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `verifyCrc?` | `boolean` |  |

### DetectedField

Kind: interface. Import from `@birchui/pdf`.

```ts
interface DetectedField
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'text' \| 'checkbox'` |  |
| `pageIndex` | `number` |  |
| `rect` | `PdfRect` |  |
| `name` | `string` |  |
| `label?` | `string` | The text on the page the name was taken from. |
| `isMultiline?` | `boolean` |  |
| `source` | `'underline' \| 'box' \| 'square' \| 'underscores'` |  |

### DetectFieldsOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface DetectFieldsOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `takenNames?` | `Iterable<string>` | Names that are taken already; detected names are made different from these and from each other. |
| `existing?` | `readonly PdfRect[]` | Rectangles of fields the page has already; a candidate that overlaps one is left out. |

### DetectionShape

Kind: interface. Import from `@birchui/pdf`.

```ts
interface DetectionShape
```

| Property | Type | Description |
| --- | --- | --- |
| `rect` | `PdfRect` |  |
| `operator` | `string` | The painting operator of the path: `S`, `f`, `B` and their variants. |

### DownsampleReport

Kind: interface. Import from `@birchui/pdf`.

```ts
interface DownsampleReport
```

| Property | Type | Description |
| --- | --- | --- |
| `imagesDownsampled` | `number` |  |
| `imagesKept` | `number` |  |

### DuplicateFieldOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface DuplicateFieldOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `offset?` | `[number, number]` |  |
| `pageIndex?` | `number` |  |
| `newName?` | `string` |  |

### DynamicStampContext

Kind: interface. Import from `@birchui/pdf`.

```ts
interface DynamicStampContext
```

| Property | Type | Description |
| --- | --- | --- |
| `user` | `PdfUser` |  |
| `now` | `Date` |  |
| `locale` | `string` |  |

### EditableTextMatch

Kind: interface. Import from `@birchui/pdf`.

```ts
interface EditableTextMatch
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` | The block of text in reading order, then the position of the match in it. |
| `text` | `string` |  |
| `before` | `string` |  |
| `after` | `string` |  |
| `rect` | `PdfRect` |  |
| `scope` | `'paragraph' \| 'run'` | Whether replacing reflows a paragraph or rewrites one text run. |
| `start` | `number` |  |
| `end` | `number` |  |

### EmbeddedText

Kind: interface. Import from `@birchui/pdf`.

```ts
interface EmbeddedText
```

| Property | Type | Description |
| --- | --- | --- |
| `ref` | `PdfRef` |  |
| `fontName` | `string` |  |
| `encoded` | `Uint8Array` |  |
| `width` | `number` |  |
| `ascent` | `number` |  |
| `descent` | `number` |  |
| `isRtl` | `boolean` |  |
| `placements?` | `(GlyphPlacement \| undefined)[]` |  |

### EncryptOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface EncryptOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `userPassword?` | `string` |  |
| `ownerPassword?` | `string` |  |
| `permissions?` | `Partial<PdfPermissions>` |  |
| `algorithm?` | `EncryptionAlgorithm` |  |
| `encryptMetadata?` | `boolean` |  |

### ExportedPageFile

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ExportedPageFile
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `fileName` | `string` |  |
| `mimeType` | `'image/png' \| 'image/jpeg'` |  |
| `data` | `Uint8Array` |  |

### ExportPageImagesOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ExportPageImagesOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `pages?` | `number[]` | Pages to export, from 0. All pages by default. |
| `format?` | `'png' \| 'jpeg'` |  |
| `dpi?` | `number` | Resolution, 36 to 600. 150 by default. |
| `quality?` | `number` | JPEG quality, 0.1 to 1. 0.85 by default. |
| `signal?` | `AbortSignal` |  |
| `onProgress?` | `(progress: { pageIndex: number; position: number; total: number }) => void` |  |

### ExportTextOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ExportTextOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `pages?` | `number[]` |  |
| `pageBreaks?` | `boolean` | `false` leaves out the line that marks where each page starts. |

### ExtractedImage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ExtractedImage
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `index` | `number` |  |
| `name` | `string` |  |
| `isInline` | `boolean` |  |
| `ref?` | `PdfRef` |  |
| `rect` | `PdfRect` |  |
| `quad` | `[PdfPoint, PdfPoint, PdfPoint, PdfPoint]` |  |
| `matrix` | `Matrix` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `bitsPerComponent` | `number` |  |
| `colorSpace?` | `string` |  |
| `filters` | `string[]` |  |
| `format` | `PageImageFormat` |  |
| `isMask` | `boolean` |  |
| `hasMask` | `boolean` |  |
| `status` | `ExtractedImageStatus` |  |
| `data?` | `ExtractedImagePixels` |  |
| `encoded?` | `ExtractedImageEncoding` |  |
| `isRendered?` | `boolean` |  |
| `message?` | `string` |  |

### ExtractedImageEncoding

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ExtractedImageEncoding
```

| Property | Type | Description |
| --- | --- | --- |
| `mimeType` | `EncodedImageMimeType` |  |
| `filter` | `string` |  |
| `bytes` | `Uint8Array` |  |
| `decodeParms?` | `Record<string, number \| boolean>` |  |
| `jbig2Globals?` | `Uint8Array` |  |

### ExtractedImagePixels

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ExtractedImagePixels
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `rgba` | `Uint8Array` |  |

### ExtractImagesOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ExtractImagesOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `renderFallback?` | `boolean` |  |

### FieldActionEntry

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FieldActionEntry
```

| Property | Type | Description |
| --- | --- | --- |
| `trigger` | `FieldActionTrigger` |  |
| `widgetIndex?` | `number` |  |
| `action` | `FieldAction` |  |

### FieldCalculation

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FieldCalculation
```

| Property | Type | Description |
| --- | --- | --- |
| `operation` | `'SUM' \| 'AVG' \| 'PRD' \| 'MIN' \| 'MAX' \| 'CUSTOM'` |  |
| `fields` | `string[]` |  |
| `expression?` | `string` |  |

### FieldIssue

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FieldIssue
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `FormIssueCode` |  |
| `key` | `FormMessageKey` |  |
| `params` | `FormMessageParams` |  |
| `message` | `string` |  |

### FieldRange

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FieldRange
```

| Property | Type | Description |
| --- | --- | --- |
| `min?` | `number` |  |
| `max?` | `number` |  |

### FieldScriptInfo

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FieldScriptInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `status` | `'supported' \| 'unsupported' \| 'none'` |  |
| `kind` | `'none' \| 'builtin' \| 'expression' \| 'custom'` |  |
| `source` | `string` |  |

### FieldScripts

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FieldScripts
```

| Property | Type | Description |
| --- | --- | --- |
| `format?` | `string` |  |
| `keystroke?` | `string` |  |
| `validate?` | `string` |  |
| `calculate?` | `string` |  |

### FindTextOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FindTextOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `matchCase?` | `boolean` |  |
| `wholeWord?` | `boolean` |  |

### FontRegistry

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FontRegistry
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly isEmpty` | `boolean` |  |
| `readonly fontNames` | `readonly string[]` |  |
| `add` | `(source: PdfFontSource) => boolean` |  |
| `hasGlyph` | `(code: number) => boolean` |  |
| `covers` | `(text: string) => boolean` |  |
| `needsEmbedding` | `(text: string) => boolean` |  |
| `embed` | `(editor: PdfEditor \| FontSink, text: string, preferredName?: string) => EmbeddedText[]` |  |
| `measure` | `(text: string, preferredName?: string) => number` |  |

### FormFieldDraft

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormFieldDraft
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `FormFieldInput['type']` |  |
| `name?` | `string` |  |
| `options?` | `string[]` |  |

### FormFieldInput

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormFieldInput
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `type` | `FormFieldType` |  |
| `pageIndex` | `number` |  |
| `rect` | `PdfRect` |  |
| `value?` | `FormValue` |  |
| `options?` | `(FormFieldOption \| string)[]` |  |
| `tooltip?` | `string` |  |
| `isReadOnly?` | `boolean` |  |
| `isRequired?` | `boolean` |  |
| `isMultiline?` | `boolean` |  |
| `isPassword?` | `boolean` |  |
| `isComb?` | `boolean` |  |
| `maxLength?` | `number` |  |
| `isMultiSelect?` | `boolean` |  |
| `isEditable?` | `boolean` |  |
| `alignment?` | `'left' \| 'center' \| 'right'` |  |
| `fontSize?` | `number` |  |
| `borderColor?` | `string \| null` |  |
| `backgroundColor?` | `string \| null` |  |
| `format?` | `FieldFormat` |  |
| `calculation?` | `FieldCalculation` |  |
| `range?` | `FieldRange` |  |
| `radioValue?` | `string` |  |
| `isNoExport?` | `boolean` |  |
| `richText?` | `RichTextParagraph[]` |  |

### FormFieldOption

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormFieldOption
```

| Property | Type | Description |
| --- | --- | --- |
| `value` | `string` |  |
| `label` | `string` |  |

### FormFieldWidget

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormFieldWidget
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `pageIndex` | `number` |  |
| `rect` | `PdfRect` |  |
| `onValue?` | `string` |  |
| `exportValue?` | `string` |  |
| `isHidden?` | `boolean` |  |
| `tabIndex?` | `number` |  |
| `rotation?` | `90 \| 180 \| 270` |  |

### FormImportRejection

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormImportRejection
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `code` | `FormIssueCode \| 'option' \| 'type'` |  |
| `key` | `FormMessageKey` |  |
| `params` | `FormMessageParams` |  |
| `message` | `string` |  |

### FormImportResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormImportResult
```

| Property | Type | Description |
| --- | --- | --- |
| `imported` | `number` |  |
| `changed` | `string[]` |  |
| `unknown` | `string[]` |  |
| `rejected` | `FormImportRejection[]` |  |

### FormIssue

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormIssue extends FieldIssue
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `pageIndex` | `number` |  |
| `rect` | `PdfRect` |  |
| `code` | `FormIssueCode` | Inherited from FieldIssue. |
| `key` | `FormMessageKey` | Inherited from FieldIssue. |
| `params` | `FormMessageParams` | Inherited from FieldIssue. |
| `message` | `string` | Inherited from FieldIssue. |

### FormJsonOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormJsonOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `flat?` | `boolean` |  |

### FormState

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormState
```

| Property | Type | Description |
| --- | --- | --- |
| `isDirty` | `boolean` |  |
| `dirtyFields` | `string[]` |  |
| `isValid` | `boolean` |  |
| `fieldCount` | `number` |  |
| `filledCount` | `number` |  |
| `requiredCount` | `number` |  |
| `requiredFilledCount` | `number` |  |

### FormSubmitEvent

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormSubmitEvent
```

| Property | Type | Description |
| --- | --- | --- |
| `url` | `string` |  |
| `method` | `'get' \| 'post'` |  |
| `format` | `SubmitFormat` |  |
| `body` | `PdfBytes \| string` |  |
| `contentType` | `string` |  |
| `fieldNames` | `string[]` |  |
| `fieldName?` | `string` |  |

### FormSubmitPayload

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormSubmitPayload
```

| Property | Type | Description |
| --- | --- | --- |
| `url` | `string` |  |
| `method` | `'get' \| 'post'` |  |
| `format` | `SubmitFormat` |  |
| `body` | `PdfBytes \| string` |  |
| `contentType` | `string` |  |
| `fieldNames` | `string[]` |  |

### FormSync

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormSync
```

| Property | Type | Description |
| --- | --- | --- |
| `receive` | `(operations: FormSyncOperation \| FormSyncOperation[]) => void` |  |
| `merge` | `(snapshot: FormSyncSnapshot) => void` |  |
| `snapshot` | `() => FormSyncSnapshot` |  |
| `destroy` | `() => void` |  |

### FormSyncConflict

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormSyncConflict
```

| Property | Type | Description |
| --- | --- | --- |
| `field` | `string` |  |
| `operation` | `FormSyncOperation` |  |
| `winner` | `SyncClock` |  |

### FormSyncHost

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormSyncHost
```

| Property | Type | Description |
| --- | --- | --- |
| `getFormValues` | `() => Record<string, FormSyncValue>` |  |
| `setFieldValues` | `(values: Record<string, FormSyncValue>, source: 'remote') => unknown` |  |
| `subscribeFormChanges` | `(listener: (change?: { source?: string }) => void) => () => void` |  |
| `isCalculated?` | `(field: string) => boolean` |  |

### FormSyncOperation

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormSyncOperation
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `kind` | `'set'` |  |
| `field` | `string` |  |
| `value` | `FormSyncValue` |  |
| `author` | `string` |  |
| `clock` | `SyncClock` |  |

### FormSyncOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormSyncOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `actorId` | `string` |  |
| `send` | `(operations: FormSyncOperation[]) => void` |  |
| `author?` | `string` |  |
| `onConflict?` | `(conflict: FormSyncConflict) => void` |  |
| `snapshot?` | `FormSyncSnapshot` |  |

### FormSyncSnapshot

Kind: interface. Import from `@birchui/pdf`.

```ts
interface FormSyncSnapshot
```

| Property | Type | Description |
| --- | --- | --- |
| `version` | `1` |  |
| `counter` | `number` |  |
| `fields` | `{ [field: string]: { clock: SyncClock; value: FormSyncValue } }` |  |

### GeneralName

Kind: interface. Import from `@birchui/pdf`.

```ts
interface GeneralName
```

| Property | Type | Description |
| --- | --- | --- |
| `kind` | `'email' \| 'dns' \| 'directory' \| 'uri' \| 'other'` |  |
| `value` | `string` |  |

### HeaderFooterOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface HeaderFooterOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `header?` | `HeaderFooterSlots` |  |
| `footer?` | `HeaderFooterSlots` |  |
| `margin?` | `number \| PageMargins` |  |
| `fontSize?` | `number` |  |
| `color?` | `string` |  |
| `font?` | `StandardFont` |  |
| `startNumber?` | `number` |  |
| `totalPages?` | `number` |  |
| `range?` | `{ from?: number; to?: number }` |  |
| `date?` | `Date \| string` |  |
| `fileName?` | `string` |  |
| `fonts?` | `FontRegistry` |  |
| `layerKind?` | `'header' \| 'footer' \| 'pageNumbers'` | How the stamped text is marked in the page content; `header` and `footer` by default. |

### HeaderFooterSlots

Kind: interface. Import from `@birchui/pdf`.

```ts
interface HeaderFooterSlots
```

| Property | Type | Description |
| --- | --- | --- |
| `left?` | `string` |  |
| `center?` | `string` |  |
| `right?` | `string` |  |

### ImageEditResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ImageEditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `ok` | `boolean` |  |
| `reason?` | `ContentEditFailure` |  |
| `message?` | `string` |  |
| `name?` | `string` |  |
| `ref?` | `PdfRef` |  |
| `rect?` | `PdfRect` |  |
| `image?` | `PageImage` |  |

### ImagePageInput

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ImagePageInput
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `dpi?` | `number` |  |

### ImagesToPdfOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ImagesToPdfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `pageSize?` | `ImagePageSize` |  |
| `margin?` | `number` |  |
| `fit?` | `'contain' \| 'cover' \| 'none'` |  |
| `dpi?` | `number` |  |
| `metadata?` | `{ title?: string; author?: string; subject?: string; keywords?: string; creator?: string }` |  |
| `decodeImage?` | `ImageDecoder` |  |

### ImposeOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ImposeOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `layout` | `'n-up' \| 'booklet'` |  |
| `columns?` | `number` |  |
| `rows?` | `number` |  |
| `sheetSize?` | `{ width: number; height: number }` |  |
| `margin?` | `number` |  |
| `gutter?` | `number` |  |
| `rightToLeft?` | `boolean` |  |
| `password?` | `string` |  |

### InterleaveOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface InterleaveOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `reverseSecond?` | `boolean` |  |

### JpegDecodeOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface JpegDecodeOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `colorTransform?` | `boolean` |  |
| `maxPixels?` | `number` |  |

### JpegImage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface JpegImage
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `components` | `1 \| 3 \| 4` |  |
| `data` | `Uint8Array` |  |
| `isProgressive` | `boolean` |  |
| `hasAdobeMarker` | `boolean` |  |
| `colorTransform` | `boolean` |  |
| `planes` | `JpegPlane[]` |  |

### KeystrokeResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface KeystrokeResult
```

| Property | Type | Description |
| --- | --- | --- |
| `isAccepted` | `boolean` |  |
| `value` | `string` |  |
| `selStart` | `number` |  |
| `selEnd` | `number` |  |
| `key?` | `FormMessageKey` |  |

### LinearizeOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface LinearizeOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `recompress?` | `boolean` |  |

### LinkDestination

Kind: interface. Import from `@birchui/pdf`.

```ts
interface LinkDestination
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `fit?` | `LinkFit` |  |
| `left?` | `number` |  |
| `top?` | `number` |  |
| `right?` | `number` |  |
| `bottom?` | `number` |  |
| `zoom?` | `number` |  |

### MailAddress

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MailAddress
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `address` | `string` |  |

### MailAttachment

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MailAttachment
```

| Property | Type | Description |
| --- | --- | --- |
| `fileName` | `string` |  |
| `mimeType` | `string` |  |
| `data` | `Uint8Array` |  |
| `contentId?` | `string` |  |
| `isInline` | `boolean` |  |
| `embeddedMessage?` | `MailMessage` |  |

### MailConversion

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MailConversion extends MailPdfResult
```

| Property | Type | Description |
| --- | --- | --- |
| `format` | `MailFormat` |  |
| `message` | `MailMessage` |  |
| `bytes` | `PdfBytes` | Inherited from MailPdfResult. |
| `pageCount` | `number` | Inherited from MailPdfResult. |
| `substitutedCharacters` | `number` | Inherited from MailPdfResult. |
| `attachmentNames` | `string[]` | Inherited from MailPdfResult. |
| `warnings` | `MailPdfWarning[]` | Inherited from MailPdfResult. |

### MailConversionEvent

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MailConversionEvent
```

| Property | Type | Description |
| --- | --- | --- |
| `format` | `MailFormat` |  |
| `sourceFileName` | `string` |  |
| `fileName` | `string` |  |
| `pageCount` | `number` |  |
| `message` | `MailConversionSummary` |  |
| `warnings` | `MailPdfWarning[]` |  |

### MailConversionOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MailConversionOptions extends Omit<MailToPdfOptions, 'attachOriginal'>
```

| Property | Type | Description |
| --- | --- | --- |
| `attachOriginal?` | `boolean` |  |
| `labels?` | `Partial<MailPdfLabels> \| undefined` | Inherited from MailToPdfOptions. |
| `fonts?` | `FontRegistry \| readonly PdfFontSource[] \| undefined` | Inherited from MailToPdfOptions. |
| `margin?` | `number \| PageMargins \| undefined` | Inherited from MailToPdfOptions. |
| `fontFallback?` | `PdfFontFallback \| undefined` | Inherited from MailToPdfOptions. |
| `allowMissingGlyphs?` | `boolean \| undefined` | Inherited from MailToPdfOptions. |
| `pageSize?` | `MailPageSize \| undefined` | Inherited from MailToPdfOptions. |
| `fontSize?` | `number \| undefined` | Inherited from MailToPdfOptions. |
| `includeAttachments?` | `boolean \| undefined` | Inherited from MailToPdfOptions. |
| `preferPlainText?` | `boolean \| undefined` | Inherited from MailToPdfOptions. |
| `formatDate?` | `((date: Date) => string) \| undefined` | Inherited from MailToPdfOptions. |

### MailConversionSummary

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MailConversionSummary
```

| Property | Type | Description |
| --- | --- | --- |
| `subject` | `string` |  |
| `from?` | `MailAddress` |  |
| `to` | `MailAddress[]` |  |
| `cc` | `MailAddress[]` |  |
| `sentAt?` | `Date` |  |
| `attachments` | `{ fileName: string; mimeType: string; size: number; isInline: boolean }[]` |  |

### MailFileHint

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MailFileHint
```

| Property | Type | Description |
| --- | --- | --- |
| `fileName?` | `string` |  |
| `mimeType?` | `string` |  |

### MailHeader

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MailHeader
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `value` | `string` |  |

### MailMessage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MailMessage
```

| Property | Type | Description |
| --- | --- | --- |
| `format` | `MailFormat` |  |
| `subject` | `string` |  |
| `from?` | `MailAddress` |  |
| `to` | `MailAddress[]` |  |
| `cc` | `MailAddress[]` |  |
| `bcc` | `MailAddress[]` |  |
| `sentAt?` | `Date` |  |
| `text` | `string` |  |
| `html` | `string` |  |
| `headers` | `MailHeader[]` |  |
| `attachments` | `MailAttachment[]` |  |

### MailOriginalFile

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MailOriginalFile
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `fileName?` | `string` |  |

### MailPdfLabels

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MailPdfLabels
```

| Property | Type | Description |
| --- | --- | --- |
| `subject` | `string` |  |
| `from` | `string` |  |
| `to` | `string` |  |
| `cc` | `string` |  |
| `bcc` | `string` |  |
| `sent` | `string` |  |
| `attachments` | `string` |  |
| `noSubject` | `string` |  |
| `image` | `string` |  |

### MailPdfResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MailPdfResult
```

| Property | Type | Description |
| --- | --- | --- |
| `bytes` | `PdfBytes` |  |
| `pageCount` | `number` |  |
| `substitutedCharacters` | `number` |  |
| `attachmentNames` | `string[]` |  |
| `warnings` | `MailPdfWarning[]` |  |

### MailPdfWarning

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MailPdfWarning
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `MailPdfWarningCode` |  |
| `message` | `string` |  |
| `count` | `number` |  |

### MailToPdfOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MailToPdfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `pageSize?` | `MailPageSize` |  |
| `margin?` | `number \| PageMargins` |  |
| `fontSize?` | `number` |  |
| `fonts?` | `FontRegistry \| readonly PdfFontSource[]` |  |
| `fontFallback?` | `PdfFontFallback` |  |
| `allowMissingGlyphs?` | `boolean` |  |
| `includeAttachments?` | `boolean` |  |
| `attachOriginal?` | `Uint8Array \| MailOriginalFile` |  |
| `preferPlainText?` | `boolean` |  |
| `labels?` | `Partial<MailPdfLabels>` |  |
| `formatDate?` | `(date: Date) => string` |  |

### MeasureDetails

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MeasureDetails
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `PdfAnnotation['type']` |  |
| `value` | `number` |  |
| `unit` | `string` |  |
| `text` | `string` |  |
| `length?` | `number` |  |
| `perimeter?` | `number` |  |
| `area?` | `number` |  |
| `radius?` | `number` |  |
| `angle?` | `number` |  |
| `count?` | `number` |  |

### MeasureScale

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MeasureScale
```

| Property | Type | Description |
| --- | --- | --- |
| `pdfUnits` | `number` |  |
| `realUnits` | `number` |  |
| `unit` | `string` |  |
| `precision?` | `number` |  |

### MentionCandidate

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MentionCandidate
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `name` | `string` |  |
| `description?` | `string` |  |

### MentionEvent

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MentionEvent
```

| Property | Type | Description |
| --- | --- | --- |
| `user` | `MentionCandidate` |  |
| `annotation` | `PdfAnnotation` |  |
| `replyId?` | `string` |  |

### MentionOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MentionOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `search` | `(query: string, context: { signal: AbortSignal }) => MentionCandidate[] \| Promise<MentionCandidate[]>` |  |
| `onMention?` | `(event: MentionEvent) => void` |  |
| `debounce?` | `number` |  |

### MergeFileInput

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MergeFileInput
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `name?` | `string` |  |
| `pages?` | `string \| readonly number[]` |  |
| `password?` | `string` |  |

### MergeFilesOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MergeFilesOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `at?` | `number` |  |
| `bookmarkPerFile?` | `boolean` |  |
| `keepBookmarks?` | `boolean` |  |
| `keepFormFields?` | `boolean` |  |
| `signal?` | `AbortSignal` |  |
| `onProgress?` | `(progress: MergeProgress) => void \| Promise<void>` |  |

### MergeFilesResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MergeFilesResult
```

| Property | Type | Description |
| --- | --- | --- |
| `at` | `number` |  |
| `pageCount` | `number` |  |
| `documentIndexes` | `number[]` |  |
| `renamedFields` | `{ from: string; to: string }[]` |  |

### MergePdfsOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MergePdfsOptions extends Omit<MergeFilesOptions, 'at'>
```

| Property | Type | Description |
| --- | --- | --- |
| `decodeImage?` | `ImageDecoder` |  |
| `bookmarkPerFile?` | `boolean \| undefined` | Inherited from MergeFilesOptions. |
| `keepBookmarks?` | `boolean \| undefined` | Inherited from MergeFilesOptions. |
| `keepFormFields?` | `boolean \| undefined` | Inherited from MergeFilesOptions. |
| `signal?` | `AbortSignal \| undefined` | Inherited from MergeFilesOptions. |
| `onProgress?` | `((progress: MergeProgress) => void \| Promise<void>) \| undefined` | Inherited from MergeFilesOptions. |

### MergeProgress

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MergeProgress
```

| Property | Type | Description |
| --- | --- | --- |
| `done` | `number` |  |
| `total` | `number` |  |
| `name` | `string` |  |

### MissingGlyphReport

Kind: interface. Import from `@birchui/pdf`.

```ts
interface MissingGlyphReport
```

| Property | Type | Description |
| --- | --- | --- |
| `characters` | `string` |  |
| `scripts` | `TextScript[]` |  |

### NameConstraints

Kind: interface. Import from `@birchui/pdf`.

```ts
interface NameConstraints
```

| Property | Type | Description |
| --- | --- | --- |
| `permitted` | `GeneralName[]` |  |
| `excluded` | `GeneralName[]` |  |

### NamedDestination

Kind: interface. Import from `@birchui/pdf`.

```ts
interface NamedDestination extends LinkDestination
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `pageIndex` | `number` | Inherited from LinkDestination. |
| `fit?` | `LinkFit \| undefined` | Inherited from LinkDestination. |
| `left?` | `number \| undefined` | Inherited from LinkDestination. |
| `top?` | `number \| undefined` | Inherited from LinkDestination. |
| `right?` | `number \| undefined` | Inherited from LinkDestination. |
| `bottom?` | `number \| undefined` | Inherited from LinkDestination. |
| `zoom?` | `number \| undefined` | Inherited from LinkDestination. |

### ObjectEditResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ObjectEditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `ok` | `boolean` |  |
| `reason?` | `ContentEditFailure` |  |
| `message?` | `string` |  |
| `object?` | `PageObject` |  |

### OcrPageImage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface OcrPageImage
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `data` | `Uint8Array` |  |

### OcrPageOutcome

Kind: interface. Import from `@birchui/pdf`.

```ts
interface OcrPageOutcome
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `status` | `'recognized' \| 'has-text' \| 'no-text' \| 'failed'` |  |
| `words` | `number` | Words written to the invisible text layer. |
| `message?` | `string` |  |

### OcrWord

Kind: interface. Import from `@birchui/pdf`.

```ts
interface OcrWord
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `rect` | `[number, number, number, number]` |  |

### OfficeExportOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface OfficeExportOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `pages?` | `readonly number[]` | Pages to export, zero-based. Default: every page. |
| `title?` | `string` |  |

### OfficeExportSource

Kind: interface. Import from `@birchui/pdf`.

```ts
interface OfficeExportSource
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly pageCount` | `number` |  |
| `getStructuredText` | `(pageIndex: number) => PageTextStructure` |  |

### OfficeRun

Kind: interface. Import from `@birchui/pdf`.

```ts
interface OfficeRun
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `isBold?` | `boolean` |  |
| `isItalic?` | `boolean` |  |

### OpenPdfOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface OpenPdfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `limits?` | `Partial<PdfLimits>` |  |
| `fontFallback?` | `PdfFontFallback` |  |
| `allowMissingGlyphs?` | `boolean` | `false` makes `save()` reject with a `PdfMissingGlyphError` when text has no font. By default the file is saved and the result names the missing scripts in `missingGlyphs`. |
| `textRasterizer?` | `PdfTextRasterizer` | Draws annotation text no font covers as an image. The viewer sets one that uses the fonts of the browser. |
| `author?` | `string` |  |
| `createId?` | `() => string` |  |
| `now?` | `() => Date` |  |
| `annotationDefaults?` | `Partial<Record<AnnotationType, Partial<AnnotationDefaults>>>` |  |
| `historyLimit?` | `number` |  |
| `readAnnotations?` | `boolean` |  |
| `annotationScope?` | `'markup' \| 'all'` |  |
| `password?` | `string` |  |
| `fonts?` | `PdfFontSource[]` |  |
| `decodeImage?` | `ImageDecoder` |  |
| `ignorePermissions?` | `boolean` |  |
| `authorId?` | `string` |  |

### OptimizeImageOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface OptimizeImageOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `maxDpi` | `number` |  |
| `jpegQuality?` | `number` |  |

### OptimizeOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface OptimizeOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `keepVerbatim?` | `boolean` | False serialises every object anew, so the output has one spelling of stream and object syntax. |
| `objectStreams?` | `boolean` |  |
| `dedupe?` | `boolean` |  |
| `removeUnused?` | `boolean` |  |
| `recompress?` | `boolean` |  |
| `transform?` | `ObjectTransform` |  |
| `images?` | `OptimizeImageOptions` |  |
| `fonts?` | `boolean` |  |

### OptimizeReport

Kind: interface. Import from `@birchui/pdf`.

```ts
interface OptimizeReport extends Partial<DownsampleReport>, Partial<FontSubsetReport>
```

| Property | Type | Description |
| --- | --- | --- |
| `before` | `number` |  |
| `after` | `number` |  |
| `objectsBefore` | `number` |  |
| `objectsAfter` | `number` |  |
| `duplicatesMerged` | `number` |  |
| `imagesDownsampled?` | `number \| undefined` | Inherited from DownsampleReport. |
| `imagesKept?` | `number \| undefined` | Inherited from DownsampleReport. |
| `fontsSubset?` | `number \| undefined` | Inherited from FontSubsetReport. |
| `fontsKept?` | `number \| undefined` | Inherited from FontSubsetReport. |
| `fontBytesBefore?` | `number \| undefined` | Inherited from FontSubsetReport. |
| `fontBytesAfter?` | `number \| undefined` | Inherited from FontSubsetReport. |

### OptimizeResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface OptimizeResult
```

| Property | Type | Description |
| --- | --- | --- |
| `bytes` | `PdfBytes` |  |
| `report` | `OptimizeReport` |  |

### OutlineItem

Kind: interface. Import from `@birchui/pdf`.

```ts
interface OutlineItem
```

| Property | Type | Description |
| --- | --- | --- |
| `title` | `string` |  |
| `pageIndex?` | `number` |  |
| `left?` | `number` |  |
| `top?` | `number` |  |
| `zoom?` | `number` |  |
| `uri?` | `string` |  |
| `isOpen?` | `boolean` |  |
| `color?` | `string` |  |
| `isBold?` | `boolean` |  |
| `isItalic?` | `boolean` |  |
| `children?` | `OutlineItem[]` |  |

### PageBoxes

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageBoxes
```

| Property | Type | Description |
| --- | --- | --- |
| `media` | `PdfRect` |  |
| `crop` | `PdfRect` |  |
| `bleed` | `PdfRect` |  |
| `trim` | `PdfRect` |  |
| `art` | `PdfRect` |  |

### PageDecoration

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageDecoration
```

| Property | Type | Description |
| --- | --- | --- |
| `kind` | `PageLayerKind` |  |
| `pages` | `number[]` |  |
| `isOwn` | `boolean` | True when this library made the layer; `options` then holds what it was made with. |
| `options?` | `Record<string, unknown>` |  |

### PageGeometry

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageGeometry
```

| Property | Type | Description |
| --- | --- | --- |
| `points` | `PdfPoint[]` |  |
| `segments` | `PdfSegment[]` |  |
| `baselines` | `PdfSegment[]` |  |
| `textBoxes` | `PageTextBox[]` |  |
| `isTruncated` | `boolean` |  |

### PageGeometryOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageGeometryOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `maxPoints?` | `number` |  |
| `maxSegments?` | `number` |  |
| `maxTextRuns?` | `number` |  |
| `bounds?` | `PdfRect` |  |
| `includeText?` | `boolean` |  |
| `includePaths?` | `boolean` |  |
| `includeImages?` | `boolean` |  |

### PageImage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageImage
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `index` | `number` |  |
| `name` | `string` |  |
| `ref?` | `PdfRef` |  |
| `rect` | `PdfRect` |  |
| `quad` | `[PdfPoint, PdfPoint, PdfPoint, PdfPoint]` |  |
| `matrix` | `Matrix` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `filter?` | `string` |  |
| `format` | `PageImageFormat` |  |
| `bitsPerComponent` | `number` |  |
| `colorSpace?` | `string` |  |
| `isMask` | `boolean` |  |
| `hasAlpha` | `boolean` |  |
| `opacity` | `number` | Constant opacity set next to the image, 1 when none. |
| `crop?` | `[x0: number, y0: number, x1: number, y1: number]` | The shown part in image space (0 to 1 from the lower left corner), when the image is cropped. |
| `visibleRect` | `PdfRect` | Bounding box of the shown part on the page. |

### PageLabelRange

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageLabelRange
```

| Property | Type | Description |
| --- | --- | --- |
| `startPage` | `number` |  |
| `style` | `PageLabelStyle` |  |
| `prefix?` | `string` |  |
| `start?` | `number` |  |

### PageMargins

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageMargins
```

| Property | Type | Description |
| --- | --- | --- |
| `top?` | `number` |  |
| `bottom?` | `number` |  |
| `left?` | `number` |  |
| `right?` | `number` |  |

### PageNumberOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageNumberOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `format?` | `string` |  |
| `position?` | `PageNumberPosition` |  |
| `startNumber?` | `number` |  |
| `pages?` | `number[]` |  |
| `fontSize?` | `number` |  |
| `color?` | `string` |  |
| `margin?` | `number` |  |
| `font?` | `StandardFont` |  |
| `fonts?` | `FontRegistry` |  |

### PageObject

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageObject
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `kind` | `PageObjectKind` |  |
| `index` | `number` | Operation that paints the object, and the first operation that belongs to it. |
| `firstIndex` | `number` |  |
| `order` | `number` | Position in paint order, 0 is painted first. |
| `rect` | `PdfRect` |  |
| `operator` | `string` |  |
| `label` | `string` |  |
| `matrix` | `Matrix` |  |
| `hasClip?` | `boolean` |  |
| `isInvisible?` | `boolean` |  |
| `layer?` | `PageObjectLayer` |  |

### PageRedactionImage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageRedactionImage extends RedactionImageRequest
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `ref` | `PdfRef` | Inherited from RedactionImageRequest. |
| `name` | `string` | Inherited from RedactionImageRequest. |
| `role` | `"image" \| "mask" \| "softMask"` | Inherited from RedactionImageRequest. |
| `rect` | `PdfRect` | Inherited from RedactionImageRequest. |
| `matrix` | `Matrix` | Inherited from RedactionImageRequest. |
| `data` | `Uint8Array<ArrayBufferLike>` | Inherited from RedactionImageInfo. |
| `filter` | `string` | Inherited from RedactionImageInfo. |
| `width` | `number` | Inherited from RedactionImageInfo. |
| `height` | `number` | Inherited from RedactionImageInfo. |
| `bitsPerComponent` | `number` | Inherited from RedactionImageInfo. |
| `colorSpace?` | `string \| undefined` | Inherited from RedactionImageInfo. |
| `isMask` | `boolean` | Inherited from RedactionImageInfo. |
| `decode?` | `number[] \| undefined` | Inherited from RedactionImageInfo. |
| `decodeParms?` | `Record<string, number \| boolean> \| undefined` | Inherited from RedactionImageInfo. |
| `jbig2Globals?` | `Uint8Array<ArrayBufferLike> \| undefined` | Inherited from RedactionImageInfo. |

### PageSync

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageSync
```

| Property | Type | Description |
| --- | --- | --- |
| `receive` | `(operations: PageSyncOperation \| PageSyncOperation[]) => void` |  |
| `merge` | `(snapshot: PageSyncSnapshot) => void` |  |
| `snapshot` | `() => PageSyncSnapshot` |  |
| `pageIds` | `() => (string \| undefined)[]` |  |
| `destroy` | `() => void` |  |

### PageSyncConflict

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageSyncConflict
```

| Property | Type | Description |
| --- | --- | --- |
| `pageId` | `string` |  |
| `reason` | `'older-write' \| 'removed'` |  |
| `operation` | `PageSyncOperation` |  |
| `winner` | `SyncClock` |  |

### PageSyncHost

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageSyncHost
```

| Property | Type | Description |
| --- | --- | --- |
| `getPages` | `() => PageSyncPage[]` |  |
| `movePages` | `(indices: number[], target: number) => void` |  |
| `rotatePages` | `(indices: number[], degrees: number) => void` |  |
| `deletePages` | `(indices: number[]) => void` |  |
| `insertBlankPage` | `(at: number, size?: PageSyncSize) => number` |  |
| `subscribePageChanges` | `(listener: () => void) => () => void` |  |

### PageSyncOperation

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageSyncOperation
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `kind` | `PageSyncOperationKind` |  |
| `pageId` | `string` |  |
| `position?` | `string` |  |
| `rotation?` | `number` |  |
| `size?` | `PageSyncSize` |  |
| `author` | `string` |  |
| `clock` | `SyncClock` |  |

### PageSyncOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageSyncOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `actorId` | `string` |  |
| `send` | `(operations: PageSyncOperation[]) => void` |  |
| `author?` | `string` |  |
| `onConflict?` | `(conflict: PageSyncConflict) => void` |  |
| `onApply?` | `() => void` |  |
| `snapshot?` | `PageSyncSnapshot` |  |

### PageSyncPage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageSyncPage
```

| Property | Type | Description |
| --- | --- | --- |
| `key` | `number \| string` |  |
| `kind` | `string` |  |
| `sourceIndex` | `number` |  |
| `rotation` | `number` |  |
| `width` | `number` |  |
| `height` | `number` |  |

### PageSyncSize

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageSyncSize
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |

### PageSyncSnapshot

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageSyncSnapshot
```

| Property | Type | Description |
| --- | --- | --- |
| `version` | `1` |  |
| `counter` | `number` |  |
| `pages` | `PageSyncSnapshotEntry[]` |  |

### PageSyncSnapshotEntry

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageSyncSnapshotEntry
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `position?` | `{ clock: SyncClock; value: string }` |  |
| `rotation?` | `{ clock: SyncClock; value: number }` |  |
| `removed?` | `SyncClock` |  |
| `size?` | `PageSyncSize` |  |

### PageTabOrder

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageTabOrder
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `mode` | `TabOrderMode` |  |
| `widgets` | `TabOrderEntry[]` |  |

### PageTextBox

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageTextBox
```

| Property | Type | Description |
| --- | --- | --- |
| `rect` | `PdfRect` |  |
| `quad` | `PdfQuad` |  |

### PageTextItem

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageTextItem
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `rect` | `PdfRect` |  |
| `quad` | `PdfQuad` |  |
| `baseline` | `[PdfPoint, PdfPoint]` |  |
| `fontName?` | `string` |  |
| `fontSize` | `number` |  |
| `isBold` | `boolean` |  |
| `isItalic` | `boolean` |  |
| `rotation` | `number` |  |
| `direction` | `PageTextDirection` |  |
| `lineIndex` | `number` |  |
| `hasSpaceAfter` | `boolean` |  |
| `charQuads?` | `PdfQuad[]` |  |

### PageTextLine

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageTextLine
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `rect` | `PdfRect` |  |
| `quad` | `PdfQuad` |  |
| `baseline` | `[PdfPoint, PdfPoint]` |  |
| `fontSize` | `number` |  |
| `rotation` | `number` |  |
| `direction` | `PageTextDirection` |  |
| `items` | `PageTextItem[]` |  |

### PageTextStructure

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PageTextStructure
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `lines` | `PageTextLine[]` |  |
| `items` | `PageTextItem[]` |  |
| `sequence?` | `(PageTextLine \| PageTextMark)[]` | With `markedContent` and content order: lines and marked-content boundaries as they follow each other. |

### ParagraphEditOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ParagraphEditOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `fonts?` | `FontRegistry` |  |
| `width?` | `number` |  |
| `pushBelow?` | `boolean` | Move the text, images and shapes under the paragraph down when it needs more lines than before. |

### ParagraphEditResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ParagraphEditResult extends TextEditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `lines?` | `string[]` |  |
| `rect?` | `PdfRect` |  |
| `overflow?` | `number` |  |
| `pushed?` | `number` | How many objects under the paragraph were moved down to make room. |
| `ok` | `boolean` | Inherited from TextEditResult. |
| `reason?` | `ContentEditFailure \| undefined` | Inherited from TextEditResult. |
| `message?` | `string \| undefined` | Inherited from TextEditResult. |
| `usedFont?` | `"original" \| "embedded" \| "standard" \| undefined` | Inherited from TextEditResult. |
| `fontNames?` | `string[] \| undefined` | Inherited from TextEditResult. |
| `missing?` | `string \| undefined` | Inherited from TextEditResult. |
| `widthChange?` | `number \| undefined` | Inherited from TextEditResult. |

### PdfAConversionOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfAConversionOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `keepAttachments?` | `boolean` |  |
| `fonts?` | `Readonly<Record<string, Uint8Array>>` |  |

### PdfAConversionResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfAConversionResult
```

| Property | Type | Description |
| --- | --- | --- |
| `bytes` | `PdfBytes` |  |
| `isConformant` | `boolean` |  |
| `removed` | `string[]` |  |
| `remaining` | `ArchiveFinding[]` |  |
| `fonts` | `PdfAFontReplacement[]` |  |
| `validation` | `PdfAValidation` |  |

### PdfAFontReplacement

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfAFontReplacement
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `replacement` | `string` |  |
| `glyphs` | `number` |  |
| `mismatchedWidths` | `number` |  |

### PdfAnnotation

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfAnnotation
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `type` | `AnnotationType` |  |
| `pageIndex` | `number` |  |
| `rect` | `PdfRect` |  |
| `color` | `string` |  |
| `opacity` | `number` |  |
| `strokeWidth` | `number` |  |
| `author` | `string` |  |
| `createdAt` | `string` |  |
| `modifiedAt` | `string` |  |
| `contents?` | `string` |  |
| `replies?` | `AnnotationReply[]` |  |
| `status?` | `ReviewStatus` |  |
| `statusAuthor?` | `string` |  |
| `statusModifiedAt?` | `string` |  |
| `replacedQuadPoints?` | `number[]` |  |
| `fillColor?` | `string` |  |
| `dashed?` | `boolean` |  |
| `borderStyle?` | `BorderStyle` |  |
| `rotation?` | `number` |  |
| `quadPoints?` | `number[]` |  |
| `inkList?` | `PdfPoint[][]` |  |
| `vertices?` | `PdfPoint[]` |  |
| `line?` | `[PdfPoint, PdfPoint]` |  |
| `lineEndings?` | `[LineEnding, LineEnding]` |  |
| `text?` | `string` |  |
| `fontSize?` | `number` |  |
| `fontColor?` | `string` |  |
| `textAlign?` | `'left' \| 'center' \| 'right'` |  |
| `fontFamily?` | `AnnotationFont` |  |
| `calloutLine?` | `PdfPoint[]` |  |
| `groupId?` | `string` |  |
| `icon?` | `NoteIcon` |  |
| `stamp?` | `BuiltInStamp \| string` |  |
| `stampLabel?` | `string` |  |
| `image?` | `AnnotationImage` |  |
| `signatureKind?` | `'drawn' \| 'typed' \| 'image'` |  |
| `measureScale?` | `MeasureScale` |  |
| `overlayText?` | `string` |  |
| `url?` | `string` |  |
| `destinationPage?` | `number` |  |
| `isLocked?` | `boolean` |  |
| `isHidden?` | `boolean` |  |
| `isReadOnly?` | `boolean` |  |
| `isContentsLocked?` | `boolean` |  |
| `isNoView?` | `boolean` |  |
| `isPrintable?` | `boolean` |  |
| `richText?` | `RichTextParagraph[]` |  |
| `action?` | `LinkAction` |  |
| `highlightMode?` | `LinkHighlightMode` |  |
| `label?` | `string` |  |
| `iconName?` | `string` |  |
| `attachment?` | `AnnotationAttachment` |  |
| `customData?` | `Record<string, unknown>` |  |

### PdfAttachment

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfAttachment extends FileSpecInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `source` | `'document' \| 'annotation'` |  |
| `pageIndex?` | `number` |  |
| `name` | `string` | Inherited from FileSpecInfo. |
| `description?` | `string \| undefined` | Inherited from FileSpecInfo. |
| `mimeType?` | `string \| undefined` | Inherited from FileSpecInfo. |
| `size` | `number` | Inherited from FileSpecInfo. |
| `created?` | `Date \| undefined` | Inherited from FileSpecInfo. |
| `modified?` | `Date \| undefined` | Inherited from FileSpecInfo. |
| `relationship?` | `AttachmentRelationship \| undefined` | Inherited from FileSpecInfo. |
| `checksum?` | `string \| undefined` | Inherited from FileSpecInfo. |
| `isChecksumValid?` | `boolean \| undefined` | Inherited from FileSpecInfo. |
| `data` | `Uint8Array<ArrayBufferLike>` | Inherited from FileSpecInfo. |

### PdfAValidation

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfAValidation
```

| Property | Type | Description |
| --- | --- | --- |
| `profile` | `'PDF/A-2b'` |  |
| `validator` | `'built-in'` |  |
| `isValid` | `boolean` |  |
| `violations` | `PdfAViolation[]` |  |
| `rulesChecked` | `PdfARule[]` |  |

### PdfAViolation

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfAViolation
```

| Property | Type | Description |
| --- | --- | --- |
| `rule` | `PdfARule` |  |
| `clause` | `string` |  |
| `severity` | `'error' \| 'warning'` |  |
| `message` | `string` |  |
| `pageIndex?` | `number` |  |
| `object?` | `number` |  |

### PdfCertificateInfo

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfCertificateInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `subject` | `PdfDistinguishedName` |  |
| `issuer` | `PdfDistinguishedName` |  |
| `serialNumber` | `string` |  |
| `notBefore` | `string` |  |
| `notAfter` | `string` |  |
| `publicKeyAlgorithm` | `'RSA' \| 'EC' \| 'unknown'` |  |
| `publicKeyBits?` | `number` |  |
| `curve?` | `'P-256' \| 'P-384' \| 'P-521'` |  |
| `isCertificateAuthority` | `boolean` |  |
| `isSelfIssued` | `boolean` |  |
| `der` | `Uint8Array` |  |
| `revocation?` | `RevocationStatus` |  |
| `revocationDetails?` | `PdfRevocationDetails` |  |

### PdfCertificationInfo

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfCertificationInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `level` | `1 \| 2 \| 3` |  |
| `permission` | `PdfCertificationPermission` |  |

### PdfCollection

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfCollection
```

| Property | Type | Description |
| --- | --- | --- |
| `view` | `PdfCollectionView` |  |
| `initialDocument?` | `string` |  |
| `fields` | `PdfCollectionField[]` |  |
| `sort?` | `PdfCollectionSort[]` |  |
| `items` | `PdfCollectionItem[]` |  |

### PdfCollectionField

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfCollectionField
```

| Property | Type | Description |
| --- | --- | --- |
| `key` | `string` |  |
| `name` | `string` |  |
| `type` | `PdfCollectionFieldType` |  |
| `order` | `number` |  |
| `isVisible` | `boolean` |  |

### PdfCollectionItem

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfCollectionItem extends PdfAttachment
```

| Property | Type | Description |
| --- | --- | --- |
| `values` | `Record<string, PdfCollectionValue>` |  |
| `source` | `"document" \| "annotation"` | Inherited from PdfAttachment. |
| `pageIndex?` | `number \| undefined` | Inherited from PdfAttachment. |
| `name` | `string` | Inherited from FileSpecInfo. |
| `description?` | `string \| undefined` | Inherited from FileSpecInfo. |
| `mimeType?` | `string \| undefined` | Inherited from FileSpecInfo. |
| `size` | `number` | Inherited from FileSpecInfo. |
| `created?` | `Date \| undefined` | Inherited from FileSpecInfo. |
| `modified?` | `Date \| undefined` | Inherited from FileSpecInfo. |
| `relationship?` | `AttachmentRelationship \| undefined` | Inherited from FileSpecInfo. |
| `checksum?` | `string \| undefined` | Inherited from FileSpecInfo. |
| `isChecksumValid?` | `boolean \| undefined` | Inherited from FileSpecInfo. |
| `data` | `Uint8Array<ArrayBufferLike>` | Inherited from FileSpecInfo. |

### PdfCollectionSort

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfCollectionSort
```

| Property | Type | Description |
| --- | --- | --- |
| `key` | `string` |  |
| `isAscending` | `boolean` |  |

### PdfComparison

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfComparison
```

| Property | Type | Description |
| --- | --- | --- |
| `pages` | `PdfPageComparison[]` |  |
| `changes` | `PdfTextChange[]` |  |
| `summary` | `PdfComparisonSummary` |  |
| `annotations?` | `{ a: AnnotationInput[]; b: AnnotationInput[] }` |  |

### PdfComparisonSummary

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfComparisonSummary
```

| Property | Type | Description |
| --- | --- | --- |
| `pageCountA` | `number` |  |
| `pageCountB` | `number` |  |
| `pagesUnchanged` | `number` |  |
| `pagesChanged` | `number` |  |
| `pagesAdded` | `number` |  |
| `pagesRemoved` | `number` |  |
| `pagesMoved` | `number` |  |
| `insertions` | `number` |  |
| `deletions` | `number` |  |
| `moves` | `number` |  |
| `wordsInserted` | `number` |  |
| `wordsDeleted` | `number` |  |
| `wordsMoved` | `number` |  |
| `isIdentical` | `boolean` |  |

### PdfDistinguishedName

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfDistinguishedName
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `commonName?` | `string` |  |
| `organization?` | `string` |  |
| `organizationalUnit?` | `string` |  |
| `country?` | `string` |  |
| `email?` | `string` |  |

### PdfDocument

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfDocument
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly pageCount` | `number` |  |
| `readonly isModified` | `boolean` |  |
| `readonly isEncrypted` | `boolean` |  |
| `readonly isLocked` | `boolean` |  |
| `readonly hasSignatures` | `boolean` |  |
| `readonly certification` | `PdfCertificationInfo \| undefined` |  |
| `readonly permissions` | `PdfPermissions` |  |
| `readonly encryption` | `PdfEncryptionInfo \| undefined` |  |
| `isAllowed` | `(permission: PdfPermissionName) => boolean` |  |
| `encrypt` | `(options: EncryptOptions) => void` |  |
| `decrypt` | `() => void` |  |
| `mergeEncryptedDocument` | `(data: Uint8Array \| ArrayBuffer, password?: string, at?: number) => Promise<number>` |  |
| `on` | `<K extends keyof PdfDocumentEvents & string>(event: K, listener: Listener<PdfDocumentEvents[K]>) => () => void` |  |
| `getPages` | `() => PdfPageSummary[]` |  |
| `setAuthor` | `(author: string) => void` |  |
| `getAnnotations` | `(pageIndex?: number) => PdfAnnotation[]` |  |
| `addAnnotation` | `(input: AnnotationInput) => PdfAnnotation` |  |
| `addAnnotations` | `(inputs: AnnotationInput[]) => PdfAnnotation[]` |  |
| `updateAnnotation` | `(id: string, patch: AnnotationPatch) => PdfAnnotation \| undefined` |  |
| `removeAnnotation` | `(id: string \| string[]) => PdfAnnotation[]` |  |
| `addReply` | `(id: string, reply: string \| { contents: string; author?: string; id?: string }) => AnnotationReply \| undefined` |  |
| `updateReply` | `(id: string, replyId: string, contents: string) => AnnotationReply \| undefined` |  |
| `removeReply` | `(id: string, replyId: string) => boolean` |  |
| `addTextMarkup` | `(type: TextMarkupType, pageIndex: number, quads: readonly PdfQuad[], extra?: Partial<Omit<AnnotationInput, 'type' \| 'pageIndex' \| 'quadPoints'>>) => PdfAnnotation \| undefined` |  |
| `uprightPlacement` | `(pageIndex: number, rect: PdfRect) => { rect: PdfRect; rotation: number \| undefined }` |  |
| `getNamedDestinations` | `() => NamedDestination[]` |  |
| `getAnnotationAttachment` | `(id: string) => AnnotationAttachmentFile \| undefined` |  |
| `exportAnnotationsFdf` | `(options?: { fileName?: string; includeAppearances?: boolean }) => PdfBytes` |  |
| `importAnnotationsFdf` | `(data: Uint8Array \| ArrayBuffer, options?: { replace?: boolean }) => { annotations: number }` |  |
| `applyRemoteChanges` | `(changes: { upsert: PdfAnnotation[]; remove: string[] }) => void` |  |
| `subscribeAnnotationChanges` | `(listener: (changes: AnnotationChangeSet) => void) => () => void` |  |
| `getFormFields` | `() => PdfFormField[]` |  |
| `getFormField` | `(name: string) => PdfFormField \| undefined` |  |
| `getFormValues` | `() => Record<string, FormValue>` |  |
| `setFormValue` | `(name: string, value: FormValue) => string[]` |  |
| `setFormValues` | `(values: Record<string, FormValue>) => string[]` |  |
| `validateFormField` | `(name: string, value?: FormValue) => string \| undefined` |  |
| `validateFormFieldIssue` | `(name: string, value?: FormValue) => FieldIssue \| undefined` |  |
| `validateForm` | `() => FormIssue[]` |  |
| `getFormState` | `() => FormState` |  |
| `describeFieldScripts` | `(name: string) => FieldScriptReport \| undefined` |  |
| `filterKeystroke` | `(name: string, currentValue: string, change: string, selStart: number, selEnd?: number) => KeystrokeResult` |  |
| `getFieldActions` | `(name: string) => FieldActionEntry[]` |  |
| `resetForm` | `(names?: readonly string[], options?: { exclude?: boolean }) => string[]` |  |
| `buildSubmitPayload` | `(action: SubmitFormAction) => Promise<FormSubmitPayload>` |  |
| `submitForm` | `(action: SubmitFormAction, fieldName?: string) => Promise<FormSubmitPayload>` |  |
| `exportFormFdf` | `(fileName?: string) => PdfBytes` |  |
| `importFormFdf` | `(data: Uint8Array \| ArrayBuffer) => FormImportResult` |  |
| `exportFormXfdf` | `(fileName?: string) => string` |  |
| `importFormXfdf` | `(xml: string) => FormImportResult` |  |
| `exportFormJson` | `(options?: FormJsonOptions) => FormJson` |  |
| `importFormJson` | `(json: unknown) => FormImportResult` |  |
| `exportFormXml` | `() => string` |  |
| `importFormXml` | `(xml: string) => FormImportResult` |  |
| `addFormField` | `(input: FormFieldInput) => PdfFormField` |  |
| `detectFormFields` | `(pageIndexes?: readonly number[]) => DetectedField[]` | Proposes fields for blank lines, empty boxes and tick squares of flat pages; nothing is changed. |
| `addDetectedFields` | `(fields?: readonly DetectedField[]) => PdfFormField[]` | Adds the proposed fields (default: those of every page) as one undo step. |
| `updateFormField` | `(name: string, patch: FormFieldPatch) => PdfFormField \| undefined` |  |
| `updateFormFields` | `(names: readonly string[], patch: FormFieldPatch) => PdfFormField[]` |  |
| `removeFormField` | `(name: string) => boolean` |  |
| `duplicateField` | `(name: string, options?: DuplicateFieldOptions) => PdfFormField \| undefined` |  |
| `alignFields` | `(targets: readonly FormFieldTarget[], mode: FieldAlignment) => PdfFormField[]` |  |
| `distributeFields` | `(targets: readonly FormFieldTarget[], direction: 'horizontal' \| 'vertical') => PdfFormField[]` |  |
| `sizeFields` | `(targets: readonly FormFieldTarget[], mode: 'width' \| 'height' \| 'both') => PdfFormField[]` |  |
| `getCalculationOrder` | `() => string[]` |  |
| `setCalculationOrder` | `(names: readonly string[]) => string[]` |  |
| `setFieldCalculation` | `(name: string, calculation: SimpleCalculation \| null) => PdfFormField \| undefined` |  |
| `getSignatureFields` | `() => SignatureFieldInfo[]` |  |
| `fillSignatureField` | `(name: string, signature: FieldSignatureInput) => PdfAnnotation` |  |
| `getTabOrder` | `(pageIndex: number) => PageTabOrder` |  |
| `setTabOrder` | `(pageIndex: number, mode: TabOrderMode) => PageTabOrder` |  |
| `setFieldTabOrder` | `(pageIndex: number, widgetIds: string[]) => PageTabOrder` |  |
| `getSignatures` | `() => Promise<(SignatureInfo & { fieldName: string })[]>` |  |
| `movePage` | `(from: number, to: number) => void` |  |
| `movePages` | `(indices: number[], target: number) => void` |  |
| `rotatePages` | `(indices: number[], degrees?: number) => void` |  |
| `deletePages` | `(indices: number[]) => void` |  |
| `insertBlankPage` | `(at: number, size?: { width: number; height: number }) => number` |  |
| `mergeDocument` | `(data: Uint8Array \| ArrayBuffer, at?: number) => number` |  |
| `extractPages` | `(indices: number[], options?: { deleteExtracted?: boolean }) => Promise<PdfBytes>` |  |
| `replacePages` | `(indices: number[], source: Uint8Array \| ArrayBuffer, sourceIndices?: readonly number[]) => number` |  |
| `interleaveDocument` | `(data: Uint8Array \| ArrayBuffer, options?: InterleaveOptions) => number` |  |
| `mergeFiles` | `(inputs: readonly MergeFileInput[], options?: MergeFilesOptions) => Promise<MergeFilesResult>` |  |
| `findBlankPages` | `(pages?: number[], options?: BlankScanOptions & { analyzeImages?: boolean }) => number[]` |  |
| `deleteBlankPages` | `(pages?: number[], options?: BlankScanOptions & { analyzeImages?: boolean }) => number[]` |  |
| `detectTextRotation` | `(pageIndex: number) => number \| undefined` |  |
| `autoRotatePages` | `(pages?: number[]) => number[]` |  |
| `addPageNumbers` | `(options?: PageNumberOptions) => number` |  |
| `removePageNumbers` | `(pages?: number[]) => number` |  |
| `findPageNumbers` | `(pages?: number[]) => number[]` |  |
| `impose` | `(options: ImposeOptions) => Promise<PdfBytes>` |  |
| `extractText` | `(pageIndex: number) => string` |  |
| `findText` | `(query: string \| RegExp, options?: { pages?: number[]; caseSensitive?: boolean; wholeWord?: boolean }) => (TextMatch & { pageIndex: number })[]` |  |
| `markRedactions` | `(query: RedactionQuery, options?: RedactionSearchOptions) => PdfAnnotation[]` |  |
| `applyRedactions` | `(ids?: string[], options?: ApplyRedactionsOptions) => number` |  |
| `applyRedactionsAsync` | `(ids?: string[], options?: ApplyRedactionsAsyncOptions) => Promise<number>` |  |
| `getRedactionImages` | `(ids?: string[]) => PageRedactionImage[]` |  |
| `getPageText` | `(pageIndex: number) => ComparablePageText` |  |
| `getStructuredText` | `(pageIndex: number, options?: PageTextOptions) => PageTextStructure` |  |
| `checkAccessibility` | `() => AccessibilityReport` |  |
| `getFigures` | `() => PdfFigure[]` |  |
| `setAlternateText` | `(figureId: string, alternateText: string) => boolean` | Sets the alternate text of a figure of the structure tree; an empty string removes it. |
| `setLanguage` | `(language: string) => void` |  |
| `getLayoutBlocks` | `(options?: OfficeExportOptions) => OfficeBlock[]` | The text of the pages as headings, paragraphs, list items and tables, read from the layout. |
| `exportDocx` | `(options?: OfficeExportOptions) => PdfBytes` |  |
| `exportTablesXlsx` | `(options?: OfficeExportOptions) => PdfBytes` |  |
| `extractTextItems` | `(pageIndex: number, options?: PageTextOptions) => PageTextItem[]` |  |
| `getPageGeometry` | `(pageIndex: number, options?: PageGeometryOptions) => PageGeometry` |  |
| `compareWith` | `(other: CompareInput, options?: ComparePdfOptions & { password?: string }) => Promise<PdfComparison>` |  |
| `getAppliedRedactions` | `(pageIndex: number) => RedactionArea[]` |  |
| `undo` | `() => boolean` |  |
| `redo` | `() => boolean` |  |
| `canUndo` | `() => boolean` |  |
| `canRedo` | `() => boolean` |  |
| `canSaveIncrementally` | `() => boolean` |  |
| `loadFallbackFonts` | `(text: string) => Promise<boolean>` |  |
| `addTextLayer` | `(pageIndex: number, words: readonly TextLayerWord[]) => TextLayerResult` |  |
| `recognizeText` | `(options: RecognizeTextOptions) => Promise<RecognizedPage[]>` |  |
| `save` | `(options?: SaveOptions) => Promise<SaveResult>` |  |
| `exportXfdf` | `(fileName?: string) => string` |  |
| `importXfdf` | `(xml: string, options?: { replace?: boolean }) => { annotations: number; fields: number }` |  |
| `exportAnnotationsJson` | `() => AnnotationsJson` |  |
| `importAnnotationsJson` | `(json: unknown, options?: { replace?: boolean }) => number` |  |
| `getMetadata` | `() => PdfMetadata` |  |
| `setMetadata` | `(patch: PdfMetadataPatch) => void` |  |
| `getInitialView` | `() => PdfInitialView` |  |
| `setInitialView` | `(view: PdfInitialView) => void` |  |
| `getOutline` | `() => OutlineItem[]` |  |
| `setOutline` | `(items: OutlineItem[]) => void` |  |
| `getAttachments` | `() => PdfAttachment[]` |  |
| `addAttachment` | `(input: AttachmentInput \| (Omit<AttachmentInput, 'name'> & { fileName: string })) => void` |  |
| `removeAttachment` | `(fileName: string) => boolean` |  |
| `getCollection` | `() => PdfCollection \| undefined` |  |
| `addWatermark` | `(options: (StampTextOptions \| StampImageOptions) & { pages?: number[] }) => void` |  |
| `addHeaderFooter` | `(options: HeaderFooterOptions & { pages?: number[] }) => void` |  |
| `addBatesNumbers` | `(options: BatesOptions & { pages?: number[] }) => void` |  |
| `cropPages` | `(indices: number[], box: PdfRect \| null, options?: CropPagesOptions) => void` |  |
| `getPageBoxes` | `(pageIndex: number) => PageBoxes` |  |
| `setPageBoxes` | `(indices: number[], boxes: PageBoxesPatch) => void` |  |
| `resizePages` | `(indices: number[], options: ResizePagesOptions) => void` |  |
| `reversePages` | `(indices?: number[]) => void` |  |
| `insertPagesFrom` | `(data: Uint8Array \| ArrayBuffer, pageIndexes: readonly number[], at?: number) => number` |  |
| `insertImagePages` | `(images: readonly (Uint8Array \| ImagePageInput)[], at?: number, options?: ImagesToPdfOptions) => Promise<number>` |  |
| `duplicatePages` | `(indices: number[], at?: number) => Promise<number>` |  |
| `split` | `(options: SplitOptions, naming?: SplitNaming) => Promise<SplitPart[]>` |  |
| `flatten` | `(mode?: FlattenMode) => void` |  |
| `addPageText` | `(pageIndex: number, options: AddTextOptions) => AddTextResult` |  |
| `addPageImage` | `(pageIndex: number, options: AddImageOptions) => ImageEditResult` |  |
| `getTextRuns` | `(pageIndex: number) => TextRun[]` |  |
| `editPageText` | `(pageIndex: number, run: TextRun, text: string) => TextEditResult` |  |
| `getTextParagraphs` | `(pageIndex: number) => TextParagraph[]` |  |
| `editPageParagraph` | `(pageIndex: number, paragraph: TextParagraph, text: string, options?: { width?: number; pushBelow?: boolean }) => ParagraphEditResult` |  |
| `deletePageText` | `(pageIndex: number, run: TextRun) => TextEditResult` |  |
| `movePageText` | `(pageIndex: number, run: TextRun, move: TextMove) => TextMoveResult` |  |
| `getPageImages` | `(pageIndex: number) => PageImage[]` |  |
| `extractImages` | `(pageIndex: number) => ExtractedImage[]` |  |
| `prepareImage` | `(data: Uint8Array, options?: PrepareImageOptions) => Promise<AnnotationImage>` |  |
| `movePageImage` | `(pageIndex: number, image: PageImage \| string, move: ImageMove) => ImageEditResult` |  |
| `replacePageImage` | `(pageIndex: number, image: PageImage \| string, data: Uint8Array) => ImageEditResult` |  |
| `deletePageImage` | `(pageIndex: number, image: PageImage \| string) => ImageEditResult` |  |
| `rotatePageImage` | `(pageIndex: number, image: PageImage \| string, degrees: number) => ImageEditResult` |  |
| `setPageImageOpacity` | `(pageIndex: number, image: PageImage \| string, opacity: number) => ImageEditResult` |  |
| `cropPageImage` | `(pageIndex: number, image: PageImage \| string, crop: [x0: number, y0: number, x1: number, y1: number] \| null) => ImageEditResult` |  |
| `getSuppliedFontNames` | `() => string[]` |  |
| `addPageMark` | `(pageIndex: number, options: AddMarkOptions) => ImageEditResult` |  |
| `getPageObjects` | `(pageIndex: number) => PageObject[]` |  |
| `movePagePath` | `(pageIndex: number, object: PageObject \| string, move: { dx: number; dy: number }) => ObjectEditResult` |  |
| `deletePagePath` | `(pageIndex: number, object: PageObject \| string) => ObjectEditResult` |  |
| `reorderPageObject` | `(pageIndex: number, object: PageObject \| string, to: ObjectOrder) => ObjectEditResult` |  |
| `restylePageText` | `(pageIndex: number, run: TextRun, style: TextStyle) => RestyleResult` |  |
| `findEditableText` | `(query: string, options?: FindTextOptions & { pages?: number[] }) => (EditableTextMatch & { pageIndex: number })[]` |  |
| `replaceText` | `(query: string, replacement: string, options?: FindTextOptions & { pages?: number[]; matches?: readonly { pageIndex: number; id: string }[] }) => ReplaceTextResult & { pages: number[] }` |  |
| `replaceScannedText` | `(pageIndex: number, run: TextRun, text: string, options?: { background?: string; color?: string; fontSize?: number; padding?: number }) => AddTextResult` |  |
| `getPageDecorations` | `(pages?: number[]) => PageDecoration[]` |  |
| `removePageDecorations` | `(kinds: PageLayerKind \| readonly PageLayerKind[], pages?: number[]) => number` |  |
| `addBackground` | `(options: BackgroundOptions & { pages?: number[] }) => void` |  |
| `getPageLabels` | `() => string[]` |  |
| `getPageLabelRanges` | `() => PageLabelRange[]` |  |
| `setPageLabels` | `(ranges: PageLabelRange[]) => void` |  |
| `verifySignatures` | `(options?: VerifySignaturesOptions) => Promise<PdfSignatureVerification[]>` |  |

### PdfDocumentEvents

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfDocumentEvents
```

| Property | Type | Description |
| --- | --- | --- |
| `annotationAdd` | `{ annotations: PdfAnnotation[]; source: ChangeSource }` |  |
| `annotationChange` | `{ changes: { before: PdfAnnotation; after: PdfAnnotation }[]; source: ChangeSource }` |  |
| `annotationRemove` | `{ annotations: PdfAnnotation[]; source: ChangeSource }` |  |
| `formFieldChange` | `{ name: string; value: FormValue; previousValue: FormValue; source: ChangeSource }` |  |
| `formFieldsChange` | `{ added: string[]; changed: string[]; removed: string[]; source: ChangeSource }` |  |
| `formSubmit` | `{ action: SubmitFormAction; payload: FormSubmitPayload; fieldName?: string }` |  |
| `formReset` | `{ names: string[]; changed: string[]; source: ChangeSource }` |  |
| `pagesChange` | `{ pages: PdfPageSummary[]; reason: PagesChangeReason }` |  |
| `historyChange` | `{ canUndo: boolean; canRedo: boolean; undoLabel?: string; redoLabel?: string }` |  |
| `documentChange` | `{ reason: string }` |  |
| `fontMissing` | `MissingGlyphReport` |  |
| `formFieldReject` | `{ name: string; value: FormValue; issue: FieldIssue; source: ChangeSource }` |  |

### PdfEncryptionInfo

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfEncryptionInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `algorithm` | `EncryptionAlgorithm` |  |
| `revision` | `number` |  |
| `isOwner` | `boolean` |  |
| `encryptsMetadata` | `boolean` |  |

### PdfFigure

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfFigure
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` | Stable while the structure tree is not rewritten: the object number of the structure element. |
| `pageIndex?` | `number` |  |
| `alternateText?` | `string` |  |
| `actualText?` | `string` |  |
| `rect?` | `PdfRect` |  |

### PdfFontSource

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfFontSource
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `data` | `Uint8Array` |  |

### PdfFormField

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfFormField
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `type` | `FormFieldType` |  |
| `value` | `FormValue` |  |
| `defaultValue` | `FormValue` |  |
| `widgets` | `FormFieldWidget[]` |  |
| `options?` | `FormFieldOption[]` |  |
| `tooltip?` | `string` |  |
| `isReadOnly` | `boolean` |  |
| `isRequired` | `boolean` |  |
| `isMultiline?` | `boolean` |  |
| `isPassword?` | `boolean` |  |
| `isComb?` | `boolean` |  |
| `maxLength?` | `number` |  |
| `isMultiSelect?` | `boolean` |  |
| `isEditable?` | `boolean` |  |
| `alignment?` | `'left' \| 'center' \| 'right'` |  |
| `fontSize?` | `number` |  |
| `borderColor?` | `string \| null` |  |
| `backgroundColor?` | `string \| null` |  |
| `format?` | `FieldFormat` |  |
| `calculation?` | `FieldCalculation` |  |
| `range?` | `FieldRange` |  |
| `signature?` | `SignatureInfo` |  |
| `scripts?` | `FieldScripts` |  |
| `isNoExport?` | `boolean` |  |
| `isNoToggleToOff?` | `boolean` |  |
| `isRadiosInUnison?` | `boolean` |  |
| `isRichText?` | `boolean` |  |
| `richText?` | `RichTextParagraph[]` |  |
| `actions?` | `FieldActionEntry[]` |  |
| `signatureLock?` | `SignatureFieldLock` |  |
| `barcode?` | `BarcodeFieldInfo` |  |

### PdfInitialView

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfInitialView
```

| Property | Type | Description |
| --- | --- | --- |
| `pageMode?` | `PdfInitialPageMode` |  |
| `pageLayout?` | `PdfInitialPageLayout` |  |
| `openPage?` | `number` | Page shown when the document opens, from 0. |
| `zoom?` | `number \| 'fit-page' \| 'fit-width'` | Zoom when the document opens: a factor (1 is 100%) or a fit mode. |
| `displayDocTitle?` | `boolean` | Show the document title instead of the file name in the window title. |

### PdfLayer

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfLayer
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `name` | `string` |  |
| `isVisible` | `boolean` |  |
| `depth` | `number` |  |
| `groups` | `string[]` |  |
| `radioGroup` | `string[]` |  |

### PdfLimits

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfLimits
```

| Property | Type | Description |
| --- | --- | --- |
| `maxStreamBytes` | `number` |  |
| `maxExpansionRatio` | `number` |  |
| `maxTotalDecodedBytes` | `number` |  |
| `maxFilterChain` | `number` |  |
| `maxImagePixels` | `number` |  |
| `maxNestingDepth` | `number` |  |
| `maxTreeDepth` | `number` |  |
| `maxGraphicsStateDepth` | `number` |  |
| `maxContentOperations` | `number` |  |
| `maxPageContentBytes` | `number` |  |

### PdfMetadata

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfMetadata
```

| Property | Type | Description |
| --- | --- | --- |
| `title?` | `string` |  |
| `author?` | `string` |  |
| `subject?` | `string` |  |
| `keywords?` | `string` |  |
| `creator?` | `string` |  |
| `producer?` | `string` |  |
| `created?` | `Date` |  |
| `modified?` | `Date` |  |
| `trapped?` | `boolean` |  |
| `custom` | `Record<string, string>` |  |
| `xmp?` | `string` |  |

### PdfMetadataPatch

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfMetadataPatch
```

| Property | Type | Description |
| --- | --- | --- |
| `title?` | `string \| null` |  |
| `author?` | `string \| null` |  |
| `subject?` | `string \| null` |  |
| `keywords?` | `string \| null` |  |
| `creator?` | `string \| null` |  |
| `producer?` | `string \| null` |  |
| `created?` | `Date \| null` |  |
| `modified?` | `Date \| null` |  |
| `trapped?` | `boolean \| null` |  |
| `custom?` | `Record<string, string \| null>` |  |

### PdfModificationReport

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfModificationReport
```

| Property | Type | Description |
| --- | --- | --- |
| `status` | `'none' \| 'allowed' \| 'disallowed' \| 'unknown'` |  |
| `changes` | `PdfRevisionChange[]` |  |
| `warnings?` | `PdfModificationWarning[]` |  |

### PdfModificationWarning

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfModificationWarning
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `'annotation-covers-content'` |  |
| `objectNumber` | `number` |  |
| `pageIndex` | `number` |  |
| `coveredRatio` | `number` |  |

### PdfPageComparison

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfPageComparison
```

| Property | Type | Description |
| --- | --- | --- |
| `status` | `PageComparisonStatus` |  |
| `pageIndexA?` | `number` |  |
| `pageIndexB?` | `number` |  |
| `similarity` | `number` |  |
| `changes` | `PdfTextChange[]` |  |

### PdfPageSummary

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfPageSummary
```

| Property | Type | Description |
| --- | --- | --- |
| `index` | `number` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `rotation` | `number` |  |
| `box` | `PdfRect` |  |
| `kind` | `PageSourceKind` |  |
| `sourceIndex` | `number` |  |
| `documentIndex` | `number` |  |
| `key` | `number` |  |

### PdfPermissions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfPermissions
```

| Property | Type | Description |
| --- | --- | --- |
| `print` | `boolean` |  |
| `printHighQuality` | `boolean` |  |
| `modify` | `boolean` |  |
| `copy` | `boolean` |  |
| `annotate` | `boolean` |  |
| `fillForms` | `boolean` |  |
| `extractForAccessibility` | `boolean` |  |
| `assemble` | `boolean` |  |

### PdfPoint

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfPoint
```

| Property | Type | Description |
| --- | --- | --- |
| `x` | `number` |  |
| `y` | `number` |  |

### PdfRangeLoader

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfRangeLoader
```

| Property | Type | Description |
| --- | --- | --- |
| `length` | `number` |  |
| `read` | `(begin: number, end: number) => Promise<Uint8Array>` |  |
| `initialData?` | `Uint8Array` |  |

### PdfRangeSource

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfRangeSource
```

| Property | Type | Description |
| --- | --- | --- |
| `rangeLoader` | `PdfRangeLoader` |  |

### PdfRenderer

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfRenderer
```

| Property | Type | Description |
| --- | --- | --- |
| `getDocument` | `(source: RendererDocumentSource) => RendererLoadingTask` |  |
| `AnnotationMode?` | `{ DISABLE: number; ENABLE?: number }` |  |
| `RangeTransport?` | `new (length: number, initialData: Uint8Array \| null) => RendererRangeTransport` |  |
| `readonly mode?` | `'worker' \| 'main'` |  |
| `destroy?` | `() => void` |  |

### PdfRenderOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfRenderOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `renderLimits?` | `Partial<RenderLimits>` |  |
| `maxRenderMs?` | `number` |  |
| `substituteFont?` | `SubstituteFontProvider` |  |
| `standardFonts?` | `boolean` | Draw fonts a document does not embed from the bundled substitute outlines, loaded on first use. On by default; `false` leaves that text to the fonts of the device. |
| `predefinedCMaps?` | `boolean` | Read fonts encoded with a predefined CJK CMap through the bundled tables, loaded per character collection on first use. On by default; `false` leaves such fonts undrawn when they are embedded. |

### PdfRevisionChange

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfRevisionChange
```

| Property | Type | Description |
| --- | --- | --- |
| `objectNumber` | `number` |  |
| `change` | `'added' \| 'changed' \| 'removed'` |  |
| `kind` | `RevisionChangeKind` |  |
| `ownerObjectNumber?` | `number` |  |
| `pageIndex?` | `number` |  |
| `coversContent?` | `boolean` |  |
| `coveredRatio?` | `number` |  |

### PdfRevocationDetails

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfRevocationDetails
```

| Property | Type | Description |
| --- | --- | --- |
| `status` | `RevocationStatus` |  |
| `source?` | `'ocsp' \| 'crl' \| 'callback'` |  |
| `revokedAt?` | `string` |  |
| `reason?` | `string` |  |
| `thisUpdate?` | `string` |  |
| `nextUpdate?` | `string` |  |

### PdfSignatureChain

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfSignatureChain
```

| Property | Type | Description |
| --- | --- | --- |
| `status` | `ChainStatus \| 'unknown'` |  |
| `certificates` | `PdfCertificateInfo[]` |  |
| `problems` | `ChainProblem[]` | Constraint violations of the chain: key usage, CA flag, path length, name constraints, validity of issuers. |

### PdfSignatureTimestamp

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfSignatureTimestamp
```

| Property | Type | Description |
| --- | --- | --- |
| `time?` | `string` |  |
| `isValid` | `boolean` |  |
| `authority?` | `string` |  |
| `policy?` | `string` |  |
| `serialNumber?` | `string` |  |
| `error?` | `string` |  |
| `chain?` | `PdfSignatureChain` |  |
| `revocation?` | `RevocationStatus` |  |

### PdfSignatureVerification

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfSignatureVerification
```

| Property | Type | Description |
| --- | --- | --- |
| `fieldName` | `string` |  |
| `type` | `'signature' \| 'certification' \| 'timestamp'` |  |
| `subFilter?` | `string` |  |
| `signerName?` | `string` |  |
| `reason?` | `string` |  |
| `location?` | `string` |  |
| `contactInfo?` | `string` |  |
| `signedAt?` | `string` |  |
| `signedAtSource?` | `'timestamp' \| 'signedAttribute' \| 'dictionary'` |  |
| `byteRange` | `number[]` |  |
| `coversWholeFile` | `boolean` |  |
| `laterChanges` | `'none' \| 'signatures-only' \| 'allowed' \| 'disallowed' \| 'unknown'` |  |
| `integrity` | `'intact' \| 'modified' \| 'unsupported'` |  |
| `signature` | `CheckResult` |  |
| `signingCertificate` | `SigningCertificateCheck` |  |
| `digestAlgorithm?` | `HashName` |  |
| `signatureAlgorithm?` | `string` |  |
| `certificate?` | `PdfCertificateInfo` |  |
| `chain` | `PdfSignatureChain` |  |
| `isCertificateValidAtSigning?` | `boolean` |  |
| `isCertificateValidNow?` | `boolean` |  |
| `revocation` | `RevocationStatus` |  |
| `certificationLevel?` | `1 \| 2 \| 3` |  |
| `certification?` | `PdfCertificationPermission` |  |
| `padesLevel?` | `PadesLevel` |  |
| `modification` | `PdfModificationReport` |  |
| `timestamp?` | `PdfSignatureTimestamp` |  |
| `isValid` | `boolean` |  |
| `isTrusted` | `boolean` |  |
| `summary` | `PdfSignatureSummary` |  |
| `expiredTrustLists?` | `string[]` | Names of the trust lists that were not used because they are past their expiry date. |
| `warnings` | `PdfSignatureWarning[]` |  |
| `error?` | `string` |  |

### PdfSignatureWarning

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfSignatureWarning
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `'annotation-covers-content'` |  |
| `message` | `string` |  |
| `pageIndex` | `number` |  |
| `objectNumber` | `number` |  |
| `coveredRatio` | `number` |  |

### PdfTabInfo

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfTabInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `fileName` | `string` |  |
| `isActive` | `boolean` |  |
| `isModified` | `boolean` |  |
| `pageCount` | `number` |  |

### PdfTextChange

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfTextChange
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `TextChangeType` |  |
| `text` | `string` |  |
| `pageIndexA?` | `number` |  |
| `pageIndexB?` | `number` |  |
| `rects` | `PdfRect[]` |  |
| `fromRects?` | `PdfRect[]` |  |
| `wordCount` | `number` |  |

### PdfTextRasterizer

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfTextRasterizer
```

Draws text the document has no font for. The viewer supplies one that uses a canvas and the fonts of the browser.

| Property | Type | Description |
| --- | --- | --- |
| `measure` | `(text: string, style: RasterTextStyle) => number` | Advance width of the text in points. |
| `rasterize` | `(text: string, style: RasterTextStyle) => RasterizedText \| undefined` |  |

### PdfTrustList

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfTrustList
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `expires` | `Date` |  |
| `issued?` | `Date` |  |
| `certificates` | `Uint8Array[]` | DER bytes of the certificates that could be read. |
| `entries` | `PdfCertificateInfo[]` |  |
| `rejected` | `number` | Certificates of the input that are not readable X.509 certificates. |

### PdfTrustListInput

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfTrustListInput
```

A list of trust anchors a host distributes, with the date after which it must be fetched again.

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `expires` | `string \| Date` | ISO 8601 date or `Date`. After it the list is not used. |
| `issued?` | `string \| Date` |  |
| `certificates` | `(string \| Uint8Array)[]` | PEM text (one or several certificates) or DER bytes. |

### PdfUrlSource

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfUrlSource
```

| Property | Type | Description |
| --- | --- | --- |
| `url` | `string` |  |
| `httpHeaders?` | `Record<string, string>` |  |
| `withCredentials?` | `boolean` |  |

### PdfUser

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfUser
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `id?` | `string` |  |
| `isAdmin?` | `boolean` |  |

### PdfViewerApi

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfViewerApi extends Widget<PdfViewerOptions, PdfViewerEvents>
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly ready` | `Promise<void>` |  |
| `load` | `(source: PdfSource \| PdfProgressiveSource, options?: { fileName?: string; password?: string }) => Promise<void>` |  |
| `isEditable` | `() => boolean` |  |
| `openTab` | `(source: PdfSource \| PdfProgressiveSource, options?: { fileName?: string; password?: string }) => Promise<string>` |  |
| `closeTab` | `(id: string) => boolean` |  |
| `activateTab` | `(id: string) => boolean` |  |
| `getTabs` | `() => PdfTabInfo[]` |  |
| `getViewState` | `() => PdfViewState` |  |
| `setViewState` | `(state: Partial<PdfViewState>) => void` |  |
| `runCommand` | `(command: ViewerCommand) => boolean` |  |
| `getCommands` | `() => ViewerCommandInfo[]` |  |
| `openCommandPalette` | `() => void` |  |
| `getLayers` | `() => Promise<PdfLayer[]>` |  |
| `setLayerVisibility` | `(id: string, isVisible: boolean) => Promise<void>` |  |
| `getPageCount` | `() => number` |  |
| `getPages` | `() => PdfPageSummary[]` |  |
| `getCurrentPage` | `() => number` |  |
| `goToPage` | `(pageIndex: number, options?: { point?: PdfPoint }) => void` |  |
| `nextPage` | `() => void` |  |
| `previousPage` | `() => void` |  |
| `getZoom` | `() => number` |  |
| `setZoom` | `(zoom: ZoomValue) => void` |  |
| `zoomIn` | `() => void` |  |
| `zoomOut` | `() => void` |  |
| `getRotation` | `() => number` |  |
| `rotateView` | `(delta?: number) => void` |  |
| `search` | `(query: string, options?: SearchOptions) => Promise<{ total: number }>` |  |
| `searchNext` | `() => void` |  |
| `searchPrevious` | `() => void` |  |
| `clearSearch` | `() => void` |  |
| `print` | `(options?: PrintOptions) => Promise<void>` |  |
| `getScrollMode` | `() => ScrollMode` |  |
| `setScrollMode` | `(mode: ScrollMode) => void` |  |
| `getSpread` | `() => SpreadMode` |  |
| `setSpread` | `(spread: SpreadMode) => void` |  |
| `getPageLabel` | `(pageIndex: number) => string` |  |
| `enterPresentation` | `() => void` |  |
| `exitPresentation` | `() => void` |  |
| `toggleFullscreen` | `() => void` |  |
| `zoomToRect` | `(pageIndex: number, rect: PdfRect) => void` |  |
| `getRenderStats` | `() => RenderStats` |  |
| `download` | `(fileName?: string) => Promise<void>` |  |
| `save` | `(options?: SaveOptions) => Promise<SaveResult>` |  |
| `isModified` | `() => boolean` |  |
| `getTool` | `() => ViewerTool` |  |
| `setTool` | `(tool: ViewerTool, options?: { stamp?: BuiltInStamp \| string; field?: FormFieldDraft }) => void` |  |
| `getAnnotations` | `(pageIndex?: number) => PdfAnnotation[]` |  |
| `getAnnotation` | `(id: string) => PdfAnnotation \| undefined` |  |
| `addAnnotation` | `(input: AnnotationInput) => PdfAnnotation` |  |
| `addAnnotations` | `(inputs: AnnotationInput[]) => PdfAnnotation[]` |  |
| `addTextMarkup` | `(type: TextMarkupType, pageIndex: number, rects: PdfRect[], options?: Partial<AnnotationInput>) => PdfAnnotation` |  |
| `updateAnnotation` | `(id: string, patch: AnnotationPatch) => PdfAnnotation \| undefined` |  |
| `removeAnnotation` | `(id: string \| string[]) => void` |  |
| `selectAnnotation` | `(id: string \| null) => void` |  |
| `getSelectedAnnotation` | `() => PdfAnnotation \| undefined` |  |
| `getSelectedAnnotations` | `() => PdfAnnotation[]` |  |
| `selectAnnotations` | `(ids: string[]) => void` |  |
| `addReply` | `(annotationId: string, reply: { contents: string; author?: string }) => AnnotationReply \| undefined` |  |
| `updateReply` | `(annotationId: string, replyId: string, contents: string) => AnnotationReply \| undefined` |  |
| `removeReply` | `(annotationId: string, replyId: string) => boolean` |  |
| `setAuthor` | `(author: string) => void` |  |
| `undo` | `() => boolean` |  |
| `redo` | `() => boolean` |  |
| `canUndo` | `() => boolean` |  |
| `canRedo` | `() => boolean` |  |
| `markRedactions` | `(query: RedactionQuery, options?: RedactionSearchOptions) => PdfAnnotation[]` |  |
| `applyRedactions` | `(ids?: string[]) => number` |  |
| `applyRedactionsAsync` | `(ids?: string[]) => Promise<number>` |  |
| `getCollaborators` | `() => PresenceState[]` |  |
| `getSyncSnapshot` | `() => SyncSnapshot \| undefined` |  |
| `mergeSyncSnapshot` | `(snapshot: SyncSnapshot) => void` |  |
| `getFormFields` | `() => PdfFormField[]` |  |
| `getFormValues` | `() => Record<string, FormValue>` |  |
| `setFormValue` | `(name: string, value: FormValue) => void` |  |
| `setFormValues` | `(values: Record<string, FormValue>) => void` |  |
| `resetForm` | `(names?: string[]) => void` |  |
| `validateForm` | `() => FormIssue[]` |  |
| `exportFormData` | `(format: 'fdf') => PdfBytes \| (format: 'xfdf' \| 'json' \| 'xml') => string` |  |
| `importFormData` | `(data: Uint8Array \| ArrayBuffer \| string \| Record<string, unknown>, format?: FormDataFormat) => FormImportResult` |  |
| `downloadFormData` | `(format: FormDataFormat) => void` |  |
| `addFormField` | `(input: FormFieldInput) => PdfFormField` |  |
| `detectFormFields` | `(pageIndexes?: readonly number[]) => DetectedField[]` |  |
| `checkAccessibility` | `() => AccessibilityReport` |  |
| `getFigures` | `() => PdfFigure[]` |  |
| `setAlternateText` | `(figureId: string, alternateText: string) => Promise<boolean>` |  |
| `setLanguage` | `(language: string) => Promise<void>` |  |
| `addDetectedFields` | `(fields?: readonly DetectedField[]) => PdfFormField[]` |  |
| `updateFormField` | `(name: string, patch: FormFieldPatch) => PdfFormField \| undefined` |  |
| `removeFormField` | `(name: string) => boolean` |  |
| `getSignatures` | `() => Promise<(SignatureInfo & { fieldName: string })[]>` |  |
| `verifySignatures` | `() => Promise<PdfSignatureVerification[]>` |  |
| `signDocument` | `(options: SignPdfOptions) => Promise<PdfBytes>` |  |
| `compareWith` | `(other: PdfSource, options?: { fileName?: string; password?: string; view?: 'text' \| 'visual' }) => Promise<void>` |  |
| `movePage` | `(from: number, to: number) => void` |  |
| `movePages` | `(indices: number[], target: number) => void` |  |
| `reversePages` | `(indices?: number[]) => void` |  |
| `duplicatePages` | `(indices: number[]) => Promise<number>` |  |
| `insertPagesFrom` | `(source: PdfSource, pageIndexes: number[], at?: number) => Promise<number>` |  |
| `insertImagePages` | `(images: (Uint8Array \| ImagePageInput)[], at?: number, options?: ImagesToPdfOptions) => Promise<number>` |  |
| `resizePages` | `(indices: number[], options: ResizePagesOptions) => Promise<void>` |  |
| `getPageBoxes` | `(pageIndex: number) => PageBoxes` |  |
| `setPageBoxes` | `(indices: number[], boxes: PageBoxesPatch) => Promise<void>` |  |
| `splitDocument` | `(options: SplitOptions) => Promise<SplitPart[]>` |  |
| `openPageOrganizer` | `() => void` |  |
| `closePageOrganizer` | `() => void` |  |
| `rotatePages` | `(indices: number[], degrees?: number) => void` |  |
| `deletePages` | `(indices: number[]) => void` |  |
| `insertBlankPage` | `(at: number, size?: { width: number; height: number }) => number` |  |
| `mergeDocument` | `(source: PdfSource, at?: number) => Promise<number>` |  |
| `extractPages` | `(indices: number[], options?: { deleteExtracted?: boolean }) => Promise<PdfBytes>` |  |
| `replacePages` | `(indices: number[], source: PdfSource, sourceIndices?: number[]) => Promise<number>` |  |
| `interleaveDocument` | `(source: PdfSource, options?: InterleaveOptions) => Promise<number>` |  |
| `mergeFiles` | `(inputs: MergeFileInput[], options?: MergeFilesOptions) => Promise<MergeFilesResult>` |  |
| `openMergeDialog` | `() => void` |  |
| `findBlankPages` | `(pages?: number[], options?: BlankScanOptions & { analyzeImages?: boolean }) => number[]` |  |
| `deleteBlankPages` | `(pages?: number[], options?: BlankScanOptions & { analyzeImages?: boolean }) => number[]` |  |
| `detectTextRotation` | `(pageIndex: number) => number \| undefined` |  |
| `autoRotatePages` | `(pages?: number[]) => number[]` |  |
| `addPageNumbers` | `(options?: PageNumberOptions) => Promise<number>` |  |
| `removePageNumbers` | `(pages?: number[]) => Promise<number>` |  |
| `imposePages` | `(options: ImposeOptions) => Promise<PdfBytes>` |  |
| `getPageText` | `(pageIndex: number) => Promise<string>` |  |
| `recognizeText` | `(request?: RecognizeTextRequest) => Promise<OcrPageOutcome[]>` |  |
| `getOcrState` | `(pageIndex: number) => OcrPageState \| undefined` |  |
| `exportPageImages` | `(options?: ExportPageImagesOptions) => Promise<ExportedPageFile[]>` |  |
| `exportText` | `(options?: ExportTextOptions) => string` |  |
| `exportDocx` | `(options?: { pages?: number[] }) => Promise<Uint8Array>` | A Word document with the text of the pages as headings, paragraphs, lists and tables. |
| `exportTablesXlsx` | `(options?: { pages?: number[] }) => Promise<Uint8Array>` | An Excel workbook with one sheet per table found on the pages; rejects when there is none. |
| `optimizeCopy` | `(preset?: OptimizePreset) => Promise<{ bytes: PdfBytes; before: number; after: number }>` |  |
| `sanitize` | `(options?: SanitizeOptions) => Promise<SanitizeReport>` |  |
| `getInitialView` | `() => PdfInitialView` |  |
| `setInitialView` | `(view: PdfInitialView) => Promise<void>` |  |
| `getPageTextItems` | `(pageIndex: number) => PageTextItem[]` |  |
| `readAloud` | `(options?: ReadAloudOptions) => ReadAloudHandle` |  |
| `stopReadAloud` | `() => void` |  |
| `captureRegion` | `(pageIndex: number, rect: PdfRect, options?: { scale?: number }) => Promise<Blob>` |  |
| `exportXfdf` | `() => string` |  |
| `importXfdf` | `(xml: string, options?: { replace?: boolean }) => number` |  |
| `exportAnnotationsFdf` | `(options?: { includeAppearances?: boolean }) => PdfBytes` |  |
| `importAnnotationsFdf` | `(data: Uint8Array \| ArrayBuffer, options?: { replace?: boolean }) => number` |  |
| `getAnnotationPresets` | `() => AnnotationPreset[]` |  |
| `setAnnotationPresets` | `(presets: AnnotationPreset[]) => void` |  |
| `exportAnnotationsJson` | `() => AnnotationsJson` |  |
| `importAnnotationsJson` | `(json: unknown, options?: { replace?: boolean }) => number` |  |
| `addSignature` | `(draft: SignatureDraft, placement: { pageIndex: number; rect: PdfRect }) => PdfAnnotation` |  |
| `openSidebar` | `(panel?: SidebarPanel) => void` |  |
| `closeSidebar` | `() => void` |  |
| `scrollToAnnotation` | `(id: string) => void` |  |
| `canEditAnnotation` | `(id: string) => boolean` |  |
| `getPermissions` | `() => PdfPermissions` |  |
| `isAllowed` | `(permission: PdfPermissionName) => boolean` |  |
| `getEncryption` | `() => PdfEncryptionInfo \| undefined` |  |
| `addWatermark` | `(options: (StampTextOptions \| StampImageOptions) & { pages?: number[] }) => Promise<void>` |  |
| `addHeaderFooter` | `(options: HeaderFooterOptions & { pages?: number[] }) => Promise<void>` |  |
| `addBatesNumbers` | `(options?: BatesOptions & { pages?: number[] }) => Promise<void>` |  |
| `cropPages` | `(indices: number[], box: PdfRect \| null, options?: CropPagesOptions) => Promise<void>` |  |
| `flatten` | `(mode?: FlattenMode) => Promise<void>` |  |
| `getOutline` | `() => OutlineItem[]` |  |
| `setOutline` | `(items: OutlineItem[]) => Promise<void>` |  |
| `getMetadata` | `() => PdfMetadata` |  |
| `setMetadata` | `(patch: PdfMetadataPatch) => Promise<void>` |  |
| `getAttachments` | `() => PdfAttachment[]` |  |
| `addAttachment` | `(input: AttachmentInput) => Promise<void>` |  |
| `removeAttachment` | `(fileName: string) => Promise<boolean>` |  |
| `openAttachment` | `(fileName: string) => boolean` |  |
| `getCollection` | `() => PdfCollection \| undefined` |  |
| `getPageLabels` | `() => string[]` |  |
| `setPageLabels` | `(ranges: PageLabelRange[]) => Promise<void>` |  |
| `getTabOrder` | `(pageIndex: number) => PageTabOrder` |  |
| `setTabOrder` | `(pageIndex: number, mode: TabOrderMode) => PageTabOrder` |  |
| `setFieldTabOrder` | `(pageIndex: number, widgetIds: string[]) => PageTabOrder` |  |
| `exportCommentSummary` | `(options: CommentSummaryOptions & { format: 'pdf' }) => PdfBytes \| (options: CommentSummaryOptions & { format: 'html' \| 'csv' }) => string` |  |
| `downloadCommentSummary` | `(options: CommentSummaryOptions) => void` |  |
| `getTextRuns` | `(pageIndex: number) => TextRun[]` |  |
| `editPageText` | `(pageIndex: number, run: TextRun, text: string) => Promise<TextEditResult>` |  |
| `getTextParagraphs` | `(pageIndex: number) => TextParagraph[]` |  |
| `editPageParagraph` | `(pageIndex: number, paragraph: TextParagraph, text: string, options?: { width?: number; pushBelow?: boolean }) => Promise<ParagraphEditResult>` |  |
| `deletePageText` | `(pageIndex: number, run: TextRun) => Promise<TextEditResult>` |  |
| `movePageText` | `(pageIndex: number, run: TextRun, move: TextMove) => Promise<TextMoveResult>` |  |
| `addPageText` | `(pageIndex: number, options: Omit<AddTextOptions, 'fonts'>) => Promise<AddTextResult>` |  |
| `getPageImages` | `(pageIndex: number) => PageImage[]` |  |
| `extractImages` | `(pageIndex: number, options?: ExtractImagesOptions) => Promise<ExtractedImage[]>` |  |
| `prepareImage` | `(data: Uint8Array, options?: PrepareImageOptions) => Promise<AnnotationImage>` |  |
| `addPageImage` | `(pageIndex: number, options: AddImageOptions) => Promise<ImageEditResult>` |  |
| `movePageImage` | `(pageIndex: number, image: PageImage \| string, move: ImageMove) => Promise<ImageEditResult>` |  |
| `replacePageImage` | `(pageIndex: number, image: PageImage \| string, data: Uint8Array) => Promise<ImageEditResult>` |  |
| `deletePageImage` | `(pageIndex: number, image: PageImage \| string) => Promise<ImageEditResult>` |  |
| `rotatePageImage` | `(pageIndex: number, image: PageImage \| string, degrees: number) => Promise<ImageEditResult>` |  |
| `setPageImageOpacity` | `(pageIndex: number, image: PageImage \| string, opacity: number) => Promise<ImageEditResult>` |  |
| `cropPageImage` | `(pageIndex: number, image: PageImage \| string, crop: [x0: number, y0: number, x1: number, y1: number] \| null) => Promise<ImageEditResult>` |  |
| `getSuppliedFontNames` | `() => string[]` |  |
| `addPageMark` | `(pageIndex: number, options: AddMarkOptions) => Promise<ImageEditResult>` |  |
| `getPageObjects` | `(pageIndex: number) => PageObject[]` |  |
| `movePagePath` | `(pageIndex: number, object: PageObject \| string, move: { dx: number; dy: number }) => Promise<ObjectEditResult>` |  |
| `deletePagePath` | `(pageIndex: number, object: PageObject \| string) => Promise<ObjectEditResult>` |  |
| `reorderPageObject` | `(pageIndex: number, object: PageObject \| string, to: ObjectOrder) => Promise<ObjectEditResult>` |  |
| `restylePageText` | `(pageIndex: number, run: TextRun, style: TextStyle) => Promise<RestyleResult>` |  |
| `findEditableText` | `(query: string, options?: FindTextOptions & { pages?: number[] }) => (EditableTextMatch & { pageIndex: number })[]` |  |
| `replaceText` | `(query: string, replacement: string, options?: FindTextOptions & { pages?: number[]; matches?: readonly { pageIndex: number; id: string }[] }) => Promise<ReplaceTextResult & { pages: number[] }>` |  |
| `replaceScannedText` | `(pageIndex: number, run: TextRun, text: string, options?: { background?: string; color?: string; fontSize?: number; padding?: number }) => Promise<AddTextResult>` |  |
| `getPageDecorations` | `(pages?: number[]) => PageDecoration[]` |  |
| `removePageDecorations` | `(kinds: PageLayerKind \| readonly PageLayerKind[], pages?: number[]) => Promise<number>` |  |
| `addBackground` | `(options: BackgroundOptions & { pages?: number[] }) => Promise<void>` |  |
| `getAnnotationAttachment` | `(id: string) => AnnotationAttachmentFile \| undefined` |  |
| `downloadAnnotationAttachment` | `(id: string) => boolean` |  |
| `followLink` | `(id: string) => boolean` |  |
| `readonly element` | `HTMLElement` | Inherited from Widget. |
| `update` | `(options: Partial<PdfViewerOptions>) => void` | Inherited from Widget. |
| `on` | `<K extends keyof TEvents & string>(event: K, listener: Listener<TEvents[K]>) => () => void` | Inherited from Widget. |
| `destroy` | `() => void` | Inherited from Widget. |

### PdfViewerEvents

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfViewerEvents
```

| Property | Type | Description |
| --- | --- | --- |
| `documentLoad` | `{ pageCount: number; fileName?: string; title?: string }` |  |
| `documentPreview` | `{ pageCount: number; fileName?: string }` |  |
| `layersChange` | `{ layers: PdfLayer[] }` |  |
| `viewStateChange` | `{ state: PdfViewState }` |  |
| `tabChange` | `{ tabs: PdfTabInfo[]; activeId: string \| undefined }` |  |
| `documentError` | `{ error: unknown; message: string }` |  |
| `pageChange` | `{ pageIndex: number; previousPageIndex: number; pageCount: number }` |  |
| `zoomChange` | `{ zoom: number; mode: ZoomValue }` |  |
| `annotationPresetsChange` | `{ presets: AnnotationPreset[] }` |  |
| `annotationAdd` | `{ annotations: PdfAnnotation[]; source: ChangeSource }` |  |
| `annotationChange` | `{ changes: { before: PdfAnnotation; after: PdfAnnotation }[]; source: ChangeSource }` |  |
| `annotationRemove` | `{ annotations: PdfAnnotation[]; source: ChangeSource }` |  |
| `annotationSelect` | `{ annotation: PdfAnnotation \| null; annotations: PdfAnnotation[] }` |  |
| `layoutChange` | `{ scrollMode: ScrollMode; spread: SpreadMode }` |  |
| `presentationChange` | `{ isPresenting: boolean }` |  |
| `printProgress` | `{ page: number; total: number; isDone: boolean; isCancelled: boolean }` |  |
| `formFieldChange` | `{ name: string; value: FormValue; previousValue: FormValue; source: ChangeSource }` |  |
| `pagesChange` | `{ pages: PdfPageSummary[]; reason: string }` |  |
| `documentChange` | `{ reason: string }` |  |
| `fontMissing` | `MissingGlyphReport` |  |
| `toolChange` | `{ tool: ViewerTool }` |  |
| `searchResult` | `{ query: string; total: number; current: number }` |  |
| `historyChange` | `{ canUndo: boolean; canRedo: boolean }` |  |
| `save` | `{ bytes: PdfBytes; mode: 'incremental' \| 'full'; fileName: string }` |  |
| `formValidation` | `{ issues: FormIssue[]; isValid: boolean }` |  |
| `formSubmit` | `FormSubmitEvent` |  |
| `formReset` | `{ names: string[]; changed: string[] }` |  |
| `formDataExport` | `{ format: FormDataFormat; data: Uint8Array \| string; fileName: string }` |  |
| `pagesSplit` | `{ parts: SplitPart[] }` |  |
| `filesMerge` | `{ files: string[]; pageCount: number; result: 'inserted' \| 'new'; bytes?: PdfBytes }` |  |
| `mailConversion` | `MailConversionEvent` |  |
| `attachmentOpen` | `AttachmentOpenEvent` |  |
| `textRecognition` | `{ pages: OcrPageOutcome[]; isCancelled: boolean }` |  |
| `pagesExport` | `{ format: 'png' \| 'jpeg'; files: ExportedPageFile[] }` |  |
| `textExport` | `{ text: string; pages: number[] }` |  |
| `officeExport` | `{ format: 'docx' \| 'xlsx'; bytes: Uint8Array; pages: number[]; tables: number }` |  |
| `fillInitialsChange` | `{ initials: string }` |  |
| `organizerSecondChange` | `{ bytes: Uint8Array; fileName: string; pageCount: number }` |  |
| `compareReport` | `{ format: CompareReportFormat; report: string; summary: PdfComparisonSummary }` |  |
| `documentSanitize` | `{ report: SanitizeReport }` |  |

### PdfViewerOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfViewerOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `document?` | `PdfSource \| PdfProgressiveSource` |  |
| `rangeChunkSize?` | `number` |  |
| `fileName?` | `string` |  |
| `password?` | `string` |  |
| `allowFetch?` | `boolean` |  |
| `fetchDocument?` | `RendererFetchDocument` |  |
| `renderer?` | `PdfRendererSource` |  |
| `worker?` | `PdfWorkerSource` |  |
| `renderOptions?` | `PdfRenderOptions` |  |
| `renderPage?` | `(context: RenderPageContext) => Promise<void> \| void` |  |
| `licenseKey?` | `string` |  |
| `injectStyles?` | `boolean` |  |
| `theme?` | `'light' \| 'dark' \| 'auto'` |  |
| `invertPagesInDark?` | `boolean` |  |
| `height?` | `number \| string` |  |
| `ariaLabel?` | `string` |  |
| `toolbar?` | `boolean \| ToolbarItem[]` |  |
| `toolbarPreset?` | `ToolbarPreset` |  |
| `initialViewState?` | `Partial<PdfViewState>` |  |
| `shortcuts?` | `ShortcutOverrides` |  |
| `tools?` | `ViewerTool[]` |  |
| `sidebar?` | `false \| SidebarPanel` |  |
| `sidebarPanels?` | `SidebarPanel[]` |  |
| `isSidebarOpen?` | `boolean` |  |
| `initialPage?` | `number` |  |
| `zoom?` | `ZoomValue` |  |
| `minZoom?` | `number` |  |
| `maxZoom?` | `number` |  |
| `spread?` | `SpreadMode` |  |
| `scrollMode?` | `ScrollMode` |  |
| `pageDirection?` | `'ltr' \| 'rtl'` |  |
| `toolGroup?` | `ToolGroup` |  |
| `author?` | `string` |  |
| `currentUser?` | `string \| PdfUser` |  |
| `canEdit?` | `(annotation: PdfAnnotation, user: PdfUser) => boolean` |  |
| `readOnly?` | `boolean` |  |
| `annotationSync?` | `AnnotationSyncChannel` |  |
| `ignorePermissions?` | `boolean` |  |
| `locale?` | `string` |  |
| `localeText?` | `LocaleTextInput` |  |
| `rtl?` | `boolean` |  |
| `onPasswordRequest?` | `(request: { isRetry: boolean; fileName: string; }) => string \| undefined \| null \| Promise<string \| undefined \| null>` |  |
| `signatureStorage?` | `SignatureStorage` |  |
| `ocr?` | `ViewerOcrOptions` |  |
| `trustedCertificates?` | `(Uint8Array \| string)[]` |  |
| `trustLists?` | `PdfTrustList[]` | Trust lists read with `loadTrustList`; a list past its expiry date is not used. |
| `allowFileDrop?` | `boolean` |  |
| `fileConverters?` | `Record<string, PdfFileConverter>` |  |
| `fillInitials?` | `string` |  |
| `welcome?` | `boolean` |  |
| `convertMail?` | `boolean \| MailConversionOptions` |  |
| `decodeImage?` | `ImageDecoder` |  |
| `tabs?` | `boolean` |  |
| `printResolution?` | `number` |  |
| `snapping?` | `boolean` |  |
| `keepToolSelected?` | `boolean` |  |
| `pixelRatio?` | `number` |  |
| `maxRenderPixels?` | `number` |  |
| `placeholders?` | `boolean` |  |
| `enableForms?` | `boolean` |  |
| `enablePageTools?` | `boolean` |  |
| `enableFormDesigner?` | `boolean` |  |
| `highlightRequiredFields?` | `boolean` |  |
| `tool?` | `ViewerTool` |  |
| `annotationDefaults?` | `Partial<Record<AnnotationType, Partial<AnnotationDefaults>>>` |  |
| `annotationPresets?` | `AnnotationPreset[]` |  |
| `fonts?` | `PdfFontSource[]` |  |
| `fontFallback?` | `PdfFontFallback` |  |
| `mentions?` | `MentionOptions` |  |
| `allowMissingGlyphs?` | `boolean` |  |
| `textRasterizer?` | `PdfTextRasterizer \| false` | How annotation text is saved when no supplied font has its characters. By default the viewer draws it with the fonts of the browser and stores the drawing in the appearance, so the save never fails; `false` turns that off. |
| `annotationScope?` | `'markup' \| 'all'` |  |
| `stamps?` | `StampDefinition[]` |  |
| `onStampsChange?` | `(stamps: StampDefinition[]) => void` | Called with the whole list when a stamp is created or deleted in the stamp gallery. |
| `labels?` | `Partial<Record<LabelKey, string>> & { tools?: Partial<Record<ViewerTool, string>> }` |  |
| `maxCanvasPixels?` | `number` |  |
| `pageGap?` | `number` |  |
| `createId?` | `() => string` |  |
| `now?` | `() => Date` |  |

### PdfViewState

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PdfViewState
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `zoom` | `ZoomValue` |  |
| `scrollMode` | `ScrollMode` |  |
| `spread` | `SpreadMode` |  |
| `rotation` | `number` |  |
| `sidebar` | `{ isOpen: boolean; panel: SidebarPanel }` |  |
| `scrollOffset` | `{ x: number; y: number }` |  |

### PixelBuffer

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PixelBuffer
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| Uint8ClampedArray` |  |
| `width` | `number` |  |
| `height` | `number` |  |

### PixelDiffOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PixelDiffOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `tolerance?` | `number` |  |
| `color?` | `readonly [number, number, number]` |  |
| `padding?` | `readonly [number, number, number, number]` |  |
| `cellSize?` | `number` |  |
| `mergeDistance?` | `number` |  |
| `minRegionPixels?` | `number` |  |
| `maxRegions?` | `number` |  |

### PixelDiffRegion

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PixelDiffRegion
```

| Property | Type | Description |
| --- | --- | --- |
| `x` | `number` |  |
| `y` | `number` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `changedPixels` | `number` |  |

### PixelDiffResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PixelDiffResult
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `mask` | `Uint8ClampedArray<ArrayBuffer>` |  |
| `changedPixels` | `number` |  |
| `changedRatio` | `number` |  |
| `regions` | `PixelDiffRegion[]` |  |

### Pkcs12Contents

Kind: interface. Import from `@birchui/pdf`.

```ts
interface Pkcs12Contents
```

| Property | Type | Description |
| --- | --- | --- |
| `privateKey` | `Uint8Array` |  |
| `privateKeyPem` | `string` |  |
| `certificate` | `Uint8Array` |  |
| `chain` | `Uint8Array[]` |  |
| `friendlyName?` | `string` |  |

### PrepareImageOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PrepareImageOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `decodeImage?` | `ImageDecoder` |  |
| `mimeType?` | `string` |  |

### PresenceState

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PresenceState
```

| Property | Type | Description |
| --- | --- | --- |
| `actorId` | `string` |  |
| `name` | `string` |  |
| `color` | `string` |  |
| `pageIndex?` | `number` |  |
| `point?` | `PdfPoint` |  |
| `selection?` | `string[]` |  |
| `viewPageIndex?` | `number` |  |

### PresenceTracker

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PresenceTracker
```

| Property | Type | Description |
| --- | --- | --- |
| `receive` | `(message: PresenceMessage) => void` |  |
| `list` | `() => PresenceState[]` |  |
| `get` | `(actorId: string) => PresenceState \| undefined` |  |
| `prune` | `(now?: number) => string[]` |  |
| `clear` | `() => void` |  |

### PrintOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface PrintOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `pages?` | `'all' \| 'current' \| number[] \| string` |  |
| `resolution?` | `number` |  |
| `annotations?` | `boolean` |  |
| `mode?` | `PrintMode` |  |
| `scale?` | `PrintScale` | Size on paper: the size of the page, fitted to the paper, or a percentage. Anything but `'actual'` prints as images. |

### RasterizedText

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RasterizedText
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` | Bitmap size in pixels. |
| `height` | `number` |  |
| `coverage` | `Uint8Array` | One byte of ink coverage per pixel, rows from the top. |
| `scale` | `number` | Pixels per point. |
| `originX` | `number` | Pixels from the left edge of the bitmap to the text origin. |
| `baseline` | `number` | Pixels from the top edge of the bitmap to the baseline. |

### RasterTextStyle

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RasterTextStyle
```

| Property | Type | Description |
| --- | --- | --- |
| `fontSize` | `number` |  |

### ReadAloudChunk

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ReadAloudChunk
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `text` | `string` |  |
| `quads` | `PdfQuad[]` |  |

### ReadAloudHandle

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ReadAloudHandle
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly isPaused` | `boolean` |  |
| `readonly isStopped` | `boolean` |  |
| `readonly finished` | `Promise<void>` |  |
| `pause` | `() => void` |  |
| `resume` | `() => void` |  |
| `stop` | `() => void` |  |

### ReadAloudOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ReadAloudOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `fromPage?` | `number` |  |
| `onText?` | `(chunk: ReadAloudChunk) => void \| Promise<void>` |  |
| `lang?` | `string` |  |
| `rate?` | `number` |  |

### RecognizedPage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RecognizedPage extends TextLayerResult
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `status` | `'recognized' \| 'has-text' \| 'no-image' \| 'no-words'` |  |
| `words` | `number` | Inherited from TextLayerResult. |
| `skippedWords` | `number` | Inherited from TextLayerResult. |

### RecognizeTextOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RecognizeTextOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `recognizeText` | `RecognizeTextCallback` |  |
| `pages?` | `number[]` |  |
| `includePagesWithText?` | `boolean` |  |
| `renderPage?` | `(pageIndex: number) => RenderedPageImage \| undefined \| Promise<RenderedPageImage \| undefined>` |  |

### RecognizeTextRequest

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RecognizeTextRequest
```

| Property | Type | Description |
| --- | --- | --- |
| `pages?` | `number[]` | Pages to work on, from 0. All pages by default. |
| `includePagesWithText?` | `boolean` | Also recognise pages that already have text. |
| `language?` | `string` |  |
| `signal?` | `AbortSignal` |  |
| `onProgress?` | `(progress: { pageIndex: number; position: number; total: number; progress: number }) => void` |  |

### RedactionArea

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RedactionArea
```

| Property | Type | Description |
| --- | --- | --- |
| `rect` | `PdfRect` |  |
| `fillColor?` | `string` |  |
| `overlayText?` | `string` |  |

### RedactionImageInfo

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RedactionImageInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `filter` | `string` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `bitsPerComponent` | `number` |  |
| `colorSpace?` | `string` |  |
| `isMask` | `boolean` |  |
| `decode?` | `number[]` |  |
| `decodeParms?` | `Record<string, number \| boolean>` |  |
| `jbig2Globals?` | `Uint8Array` |  |

### RedactionImageOutcome

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RedactionImageOutcome
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `action` | `'modified' \| 'removed'` |  |
| `filter?` | `string` |  |
| `decodedBy?` | `'package' \| 'callback'` |  |
| `reason?` | `RedactionImageRemovalReason` |  |
| `message?` | `string` |  |

### RedactionImageRequest

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RedactionImageRequest extends RedactionImageInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `ref` | `PdfRef` |  |
| `name` | `string` |  |
| `role` | `'image' \| 'softMask' \| 'mask'` |  |
| `rect` | `PdfRect` |  |
| `matrix` | `Matrix` |  |
| `data` | `Uint8Array<ArrayBufferLike>` | Inherited from RedactionImageInfo. |
| `filter` | `string` | Inherited from RedactionImageInfo. |
| `width` | `number` | Inherited from RedactionImageInfo. |
| `height` | `number` | Inherited from RedactionImageInfo. |
| `bitsPerComponent` | `number` | Inherited from RedactionImageInfo. |
| `colorSpace?` | `string \| undefined` | Inherited from RedactionImageInfo. |
| `isMask` | `boolean` | Inherited from RedactionImageInfo. |
| `decode?` | `number[] \| undefined` | Inherited from RedactionImageInfo. |
| `decodeParms?` | `Record<string, number \| boolean> \| undefined` | Inherited from RedactionImageInfo. |
| `jbig2Globals?` | `Uint8Array<ArrayBufferLike> \| undefined` | Inherited from RedactionImageInfo. |

### RedactionReport

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RedactionReport
```

| Property | Type | Description |
| --- | --- | --- |
| `glyphsRemoved` | `number` |  |
| `removedText` | `string` |  |
| `imagesRemoved` | `number` |  |
| `imagesModified` | `number` |  |
| `pathsRemoved` | `number` |  |
| `formsRewritten` | `number` |  |
| `images` | `RedactionImageOutcome[]` |  |

### RedactionSearchOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RedactionSearchOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `pages?` | `number[]` |  |
| `caseSensitive?` | `boolean` |  |
| `wholeWord?` | `boolean` |  |
| `overlayText?` | `string` |  |
| `fillColor?` | `string` |  |

### RemoteAnnotationChanges

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RemoteAnnotationChanges
```

| Property | Type | Description |
| --- | --- | --- |
| `upsert` | `PdfAnnotation[]` |  |
| `remove` | `string[]` |  |

### RenderedPageImage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RenderedPageImage
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `data` | `Uint8Array` |  |
| `matrix` | `Matrix` |  |

### RendererDocument

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RendererDocument
```

| Property | Type | Description |
| --- | --- | --- |
| `numPages` | `number` |  |
| `getPage` | `(pageNumber: number) => Promise<RendererPage>` |  |
| `getOutline` | `() => Promise<RendererOutlineItem[] \| null>` |  |
| `getDestination` | `(id: string) => Promise<unknown[] \| null>` |  |
| `getPageIndex` | `(ref: unknown) => Promise<number>` |  |
| `getPageLabels?` | `() => Promise<string[] \| null>` |  |
| `getMetadata?` | `() => Promise<{ info?: Record<string, unknown> } \| null>` |  |
| `getAttachments?` | `() => Promise<Record<string, { filename?: string; content?: Uint8Array; description?: string }> \| null>` |  |
| `getData?` | `() => Promise<Uint8Array>` |  |
| `getOptionalContentConfig?` | `(params?: { intent?: string }) => Promise<RendererOptionalContentConfig>` |  |
| `destroy` | `() => Promise<void>` |  |

### RendererDocumentSource

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RendererDocumentSource
```

| Property | Type | Description |
| --- | --- | --- |
| `data?` | `Uint8Array` |  |
| `url?` | `string` |  |
| `httpHeaders?` | `Record<string, string>` |  |
| `withCredentials?` | `boolean` |  |
| `range?` | `RendererRangeTransport` |  |
| `length?` | `number` |  |
| `password?` | `string` |  |
| `rangeChunkSize?` | `number` |  |
| `allowFetch?` | `boolean` |  |
| `fetchDocument?` | `RendererFetchDocument` |  |

### RendererFetchReply

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RendererFetchReply
```

| Property | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array \| ArrayBuffer` |  |
| `total?` | `number` |  |

### RendererFetchRequest

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RendererFetchRequest
```

| Property | Type | Description |
| --- | --- | --- |
| `url` | `string` |  |
| `range?` | `{ begin: number; end: number }` |  |
| `headers?` | `Record<string, string>` |  |
| `withCredentials` | `boolean` |  |
| `signal` | `AbortSignal` |  |

### RendererLoadingTask

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RendererLoadingTask
```

| Property | Type | Description |
| --- | --- | --- |
| `promise` | `Promise<RendererDocument>` |  |
| `destroy` | `() => Promise<void>` |  |
| `onPassword?` | `(update: (password: string) => void, reason: number) => void` |  |

### RendererPage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RendererPage
```

| Property | Type | Description |
| --- | --- | --- |
| `view` | `number[]` |  |
| `rotate` | `number` |  |
| `getViewport` | `(params: { scale: number; rotation?: number; offsetX?: number; offsetY?: number }) => RendererViewport` |  |
| `render` | `(params: { canvas?: HTMLCanvasElement \| OffscreenCanvas \| null; canvasContext?: CanvasRenderingContext2D \| OffscreenCanvasRenderingContext2D; viewport: RendererViewport; transform?: number[]; annotationMode?: number; background?: string \| null; intent?: string; optionalContentConfigPromise?: Promise<RendererOptionalContentConfig \| null \| undefined>; }) => RendererRenderTask` |  |
| `getTextContent` | `(params?: { includeMarkedContent?: boolean }) => Promise<RendererTextContent>` |  |
| `getStructTree?` | `() => Promise<RendererStructNode \| null \| undefined>` |  |
| `getAnnotations?` | `(params?: { intent?: string }) => Promise<RendererLinkAnnotation[]>` |  |
| `cleanup?` | `() => void` |  |

### RenderPageContext

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RenderPageContext
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `canvas` | `HTMLCanvasElement` |  |
| `viewport` | `RendererViewport` |  |
| `scale` | `number` |  |
| `pixelRatio` | `number` |  |
| `area?` | `{ x: number; y: number; width: number; height: number }` |  |
| `signal` | `AbortSignal` |  |
| `defaultRender` | `() => Promise<void>` |  |

### RenderStats

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RenderStats
```

| Property | Type | Description |
| --- | --- | --- |
| `views` | `number` |  |
| `renderedViews` | `number` |  |
| `canvasPixels` | `number` |  |
| `queued` | `number` |  |
| `thumbnails` | `number` |  |
| `thumbnailPixels` | `number` |  |
| `renderMode` | `'worker' \| 'main'` |  |

### ReplaceTextResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ReplaceTextResult
```

| Property | Type | Description |
| --- | --- | --- |
| `replaced` | `number` |  |
| `failed` | `{ id: string; text: string; reason: ContentEditFailure; message: string }[]` |  |

### ResetFormAction

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ResetFormAction
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'resetForm'` |  |
| `fields` | `string[]` |  |
| `isExclude` | `boolean` |  |

### ResizePagesOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ResizePagesOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `anchor?` | `PageAnchor` |  |
| `scaleContent` | `boolean` |  |
| `fit?` | `'fit' \| 'fill'` |  |
| `margin?` | `number` |  |

### RestyleResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RestyleResult extends TextEditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `rect?` | `PdfRect` |  |
| `isSynthetic?` | `boolean` |  |
| `ok` | `boolean` | Inherited from TextEditResult. |
| `reason?` | `ContentEditFailure \| undefined` | Inherited from TextEditResult. |
| `message?` | `string \| undefined` | Inherited from TextEditResult. |
| `usedFont?` | `"original" \| "embedded" \| "standard" \| undefined` | Inherited from TextEditResult. |
| `fontNames?` | `string[] \| undefined` | Inherited from TextEditResult. |
| `missing?` | `string \| undefined` | Inherited from TextEditResult. |
| `widthChange?` | `number \| undefined` | Inherited from TextEditResult. |

### RevocationAnswer

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RevocationAnswer
```

| Property | Type | Description |
| --- | --- | --- |
| `status` | `'good' \| 'revoked' \| 'unknown'` |  |
| `revokedAt?` | `Date \| string` |  |
| `reason?` | `string` |  |

### RichTextDefaults

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RichTextDefaults
```

| Property | Type | Description |
| --- | --- | --- |
| `fontSize` | `number` |  |
| `color` | `string` |  |
| `fontFamily` | `string` |  |
| `align` | `RichTextAlign` |  |

### RichTextLine

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RichTextLine
```

| Property | Type | Description |
| --- | --- | --- |
| `pieces` | `{ text: string; style: ResolvedStyle; width: number }[]` |  |
| `width` | `number` |  |
| `fontSize` | `number` |  |
| `align` | `RichTextAlign` |  |

### RichTextParagraph

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RichTextParagraph
```

| Property | Type | Description |
| --- | --- | --- |
| `runs` | `RichTextRun[]` |  |
| `align?` | `RichTextAlign` |  |

### RichTextRun

Kind: interface. Import from `@birchui/pdf`.

```ts
interface RichTextRun
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `bold?` | `boolean` |  |
| `italic?` | `boolean` |  |
| `underline?` | `boolean` |  |
| `strikethrough?` | `boolean` |  |
| `color?` | `string` |  |
| `fontSize?` | `number` |  |
| `fontFamily?` | `string` |  |

### SanitizeOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SanitizeOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `metadata?` | `boolean` | Document information, XMP packets and private application data. |
| `hiddenLayers?` | `boolean` | Layers that are switched off, together with the page content that belongs to them. |
| `attachments?` | `boolean` | Embedded files and file attachment annotations. |
| `scripts?` | `boolean` | JavaScript, open actions and additional actions. |
| `comments?` | `boolean` | Every annotation except links and form fields. |

### SanitizeReport

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SanitizeReport
```

| Property | Type | Description |
| --- | --- | --- |
| `metadata` | `number` |  |
| `hiddenLayers` | `number` |  |
| `attachments` | `number` |  |
| `scripts` | `number` |  |
| `comments` | `number` |  |
| `before` | `number` |  |
| `after` | `number` |  |

### SanitizeResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SanitizeResult
```

| Property | Type | Description |
| --- | --- | --- |
| `bytes` | `PdfBytes` |  |
| `report` | `SanitizeReport` |  |

### SavedSignature

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SavedSignature
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `draft` | `SignatureDraft` |  |
| `createdAt` | `string` |  |

### SaveOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SaveOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `allowMissingGlyphs?` | `boolean` |  |
| `objectStreams?` | `boolean` |  |
| `mode?` | `SaveMode` |  |
| `compress?` | `boolean` |  |
| `flatten?` | `FlattenMode` |  |
| `linearize?` | `boolean` |  |

### SaveResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SaveResult
```

| Property | Type | Description |
| --- | --- | --- |
| `bytes` | `PdfBytes` |  |
| `mode` | `'incremental' \| 'full'` |  |
| `redactions` | `RedactionReport[]` |  |
| `missingGlyphs?` | `MissingGlyphReport` | Characters that were written without a glyph, and their scripts; absent when every character was drawn. |

### SearchOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SearchOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `caseSensitive?` | `boolean` |  |
| `wholeWord?` | `boolean` |  |
| `diacriticSensitive?` | `boolean` |  |
| `regex?` | `boolean` |  |

### Shortcut

Kind: interface. Import from `@birchui/pdf`.

```ts
interface Shortcut
```

| Property | Type | Description |
| --- | --- | --- |
| `keys` | `string` |  |
| `command` | `ViewerCommand` |  |
| `description` | `string` |  |

### SignatureAppearanceOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SignatureAppearanceOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `text?` | `string[]` |  |
| `image?` | `Uint8Array` |  |
| `showDate?` | `boolean` |  |
| `showReason?` | `boolean` |  |
| `showLocation?` | `boolean` |  |
| `fontSize?` | `number` |  |
| `textColor?` | `[number, number, number]` |  |
| `borderColor?` | `[number, number, number] \| null` |  |
| `borderWidth?` | `number` |  |
| `backgroundColor?` | `[number, number, number] \| null` |  |

### SignatureDraft

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SignatureDraft
```

| Property | Type | Description |
| --- | --- | --- |
| `kind` | `'drawn' \| 'typed' \| 'image'` |  |
| `inkList?` | `PdfPoint[][]` |  |
| `text?` | `string` |  |
| `image?` | `{ data: Uint8Array; mimeType: 'image/png' \| 'image/jpeg'; width: number; height: number }` |  |

### SignatureFieldInfo

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SignatureFieldInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `pageIndex` | `number` |  |
| `rect` | `PdfRect` |  |
| `isSigned` | `boolean` |  |
| `isRequired` | `boolean` |  |
| `isReadOnly` | `boolean` |  |
| `lock?` | `SignatureFieldLock` |  |

### SignatureFieldLock

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SignatureFieldLock
```

| Property | Type | Description |
| --- | --- | --- |
| `action` | `'all' \| 'include' \| 'exclude'` |  |
| `fields` | `string[]` |  |

### SignatureFieldPlacement

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SignatureFieldPlacement
```

| Property | Type | Description |
| --- | --- | --- |
| `name?` | `string` |  |
| `pageIndex` | `number` |  |
| `rect` | `[number, number, number, number]` |  |

### SignatureInfo

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SignatureInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `signerName?` | `string` |  |
| `signedAt?` | `string` |  |
| `reason?` | `string` |  |
| `location?` | `string` |  |
| `filter?` | `string` |  |
| `subFilter?` | `string` |  |
| `byteRange?` | `number[]` |  |
| `coversWholeFile` | `boolean` |  |
| `hasLaterChanges` | `boolean` |  |
| `integrity` | `'unchecked' \| 'intact' \| 'modified' \| 'unsupported'` |  |

### SignatureStorage

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SignatureStorage
```

| Property | Type | Description |
| --- | --- | --- |
| `load` | `() => SavedSignature[] \| Promise<SavedSignature[]>` |  |
| `save` | `(signatures: SavedSignature[]) => void \| Promise<void>` |  |

### SignDigestInfo

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SignDigestInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `algorithm` | `'RSASSA-PKCS1-v1_5' \| 'ECDSA'` |  |
| `hash` | `HashName` |  |
| `curve?` | `'P-256' \| 'P-384' \| 'P-521'` |  |
| `signedAttributes` | `Uint8Array` |  |

### SignPdfOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SignPdfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `certificate?` | `Uint8Array \| string` |  |
| `certificateChain?` | `(Uint8Array \| string)[]` |  |
| `privateKey?` | `string \| CryptoKey` |  |
| `signDigest?` | `SignDigestCallback` |  |
| `pkcs12?` | `Uint8Array \| ArrayBuffer` |  |
| `pkcs12Password?` | `string` |  |
| `timestamp?` | `TimestampCallback` |  |
| `reason?` | `string` |  |
| `location?` | `string` |  |
| `contactInfo?` | `string` |  |
| `name?` | `string` |  |
| `field?` | `string \| SignatureFieldPlacement` |  |
| `appearance?` | `SignatureAppearanceOptions \| false` |  |
| `certificationLevel?` | `1 \| 2 \| 3` |  |
| `certify?` | `PdfCertificationPermission` |  |
| `subFilter?` | `PdfSignatureSubFilter` |  |
| `signedAt?` | `Date` |  |
| `placeholderSize?` | `number` |  |
| `password?` | `string` |  |
| `lockFields?` | `PdfFieldLock` |  |

### SplitNaming

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SplitNaming
```

| Property | Type | Description |
| --- | --- | --- |
| `baseName?` | `string` |  |

### SplitPart

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SplitPart
```

| Property | Type | Description |
| --- | --- | --- |
| `bytes` | `PdfBytes` |  |
| `pageIndexes` | `number[]` |  |
| `name` | `string` |  |
| `title?` | `string` |  |

### StampDefinition

Kind: interface. Import from `@birchui/pdf`.

```ts
interface StampDefinition
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `label` | `string \| ((context: DynamicStampContext) => string)` |  |
| `color?` | `string` |  |
| `subtitle?` | `string \| ((context: DynamicStampContext) => string)` | A function, or text in which `{name}` and `{date}` stand for the current user and the date and time. |
| `isUserMade?` | `boolean` | Set on stamps made in the stamp gallery; these can be deleted there. |

### StampImageOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface StampImageOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `rect?` | `PdfRect` |  |
| `position?` | `StampPosition` |  |
| `width?` | `number` |  |
| `height?` | `number` |  |
| `opacity?` | `number` |  |
| `rotation?` | `number` |  |
| `layer?` | `'over' \| 'under'` |  |
| `margin?` | `number` |  |

### StampTextOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface StampTextOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `position?` | `StampPosition` |  |
| `fontSize?` | `number` |  |
| `color?` | `string` |  |
| `opacity?` | `number` |  |
| `rotation?` | `number` |  |
| `font?` | `StandardFont` |  |
| `layer?` | `'over' \| 'under'` |  |
| `margin?` | `number` |  |
| `fonts?` | `FontRegistry` |  |

### SubmitFormAction

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SubmitFormAction
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'submitForm'` |  |
| `url` | `string` |  |
| `flags` | `number` |  |
| `format` | `SubmitFormat` |  |
| `method` | `'get' \| 'post'` |  |
| `fields` | `string[]` |  |
| `isExclude` | `boolean` |  |
| `includeEmpty` | `boolean` |  |

### SyncableDocument

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SyncableDocument
```

| Property | Type | Description |
| --- | --- | --- |
| `on` | `(event: DocumentSyncEvent, listener: (payload: object) => void) => () => void` |  |
| `getFormValues` | `() => Record<string, FormSyncValue>` |  |
| `setFormValues` | `(values: Record<string, FormSyncValue>) => unknown` |  |
| `getFormField?` | `(name: string) => { calculation?: unknown; scripts?: { calculate?: string } } \| undefined` |  |
| `getPages` | `() => PageSyncPage[]` |  |
| `movePages` | `(indices: number[], target: number) => void` |  |
| `rotatePages` | `(indices: number[], degrees?: number) => void` |  |
| `deletePages` | `(indices: number[]) => void` |  |
| `insertBlankPage` | `(at: number, size?: PageSyncSize) => number` |  |

### SyncAnnotationChanges

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SyncAnnotationChanges
```

| Property | Type | Description |
| --- | --- | --- |
| `added` | `PdfAnnotation[]` |  |
| `changed` | `{ before: PdfAnnotation; after: PdfAnnotation }[]` |  |
| `removed` | `PdfAnnotation[]` |  |
| `source` | `string` |  |

### SyncChannelOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SyncChannelOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `actorId?` | `string` |  |
| `color?` | `string` |  |
| `channels?` | `readonly SyncChannelName[]` |  |
| `snapshot?` | `SyncSnapshot` |  |
| `presenceTimeout?` | `number` |  |
| `onConflict?` | `(conflict: SyncConflict) => void` |  |
| `onPresenceChange?` | `(collaborators: PresenceState[]) => void` |  |

### SyncClock

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SyncClock
```

| Property | Type | Description |
| --- | --- | --- |
| `counter` | `number` |  |
| `actor` | `string` |  |

### SyncConflict

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SyncConflict
```

| Property | Type | Description |
| --- | --- | --- |
| `annotationId` | `string` |  |
| `reason` | `'older-write' \| 'removed'` |  |
| `keys` | `string[]` |  |
| `operation` | `SyncOperation` |  |
| `winner` | `SyncClock` |  |

### SyncOperation

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SyncOperation
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `kind` | `SyncOperationKind` |  |
| `annotationId` | `string` |  |
| `payload` | `{ [key: string]: SyncJson }` |  |
| `author` | `string` |  |
| `clock` | `SyncClock` |  |

### SyncSnapshot

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SyncSnapshot
```

| Property | Type | Description |
| --- | --- | --- |
| `version` | `1` |  |
| `counter` | `number` |  |
| `entries` | `SyncSnapshotEntry[]` |  |
| `forms?` | `FormSyncSnapshot` |  |
| `pages?` | `PageSyncSnapshot` |  |

### SyncSnapshotEntry

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SyncSnapshotEntry
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `added?` | `SyncClock` |  |
| `removed?` | `SyncClock` |  |
| `groups` | `{ [group: string]: { clock: SyncClock; values: { [key: string]: SyncJson } } }` |  |
| `replies` | `{ [replyId: string]: { clock: SyncClock; added?: SyncClock; removed?: SyncClock; reply?: { [key: string]: SyncJson }; }; }` |  |

### SyncTransport

Kind: interface. Import from `@birchui/pdf`.

```ts
interface SyncTransport
```

| Property | Type | Description |
| --- | --- | --- |
| `actorId?` | `string` |  |
| `send` | `(message: SyncMessage) => void` |  |
| `subscribe` | `(receive: (message: SyncMessage) => void) => (() => void) \| void` |  |

### TextEditResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface TextEditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `ok` | `boolean` |  |
| `reason?` | `ContentEditFailure` |  |
| `message?` | `string` |  |
| `usedFont?` | `'original' \| 'embedded' \| 'standard'` |  |
| `fontNames?` | `string[]` |  |
| `missing?` | `string` |  |
| `widthChange?` | `number` |  |

### TextLayerResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface TextLayerResult
```

| Property | Type | Description |
| --- | --- | --- |
| `words` | `number` |  |
| `skippedWords` | `number` |  |

### TextLayerWord

Kind: interface. Import from `@birchui/pdf`.

```ts
interface TextLayerWord
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `rect` | `PdfRect` |  |
| `rotation?` | `TextLayerRotation` | Direction of the baseline in page space, counter-clockwise in degrees. Left out, the word reads upright on the page as it is displayed, so it follows the rotation of the page. |

### TextMatch

Kind: interface. Import from `@birchui/pdf`.

```ts
interface TextMatch
```

| Property | Type | Description |
| --- | --- | --- |
| `start` | `number` |  |
| `end` | `number` |  |
| `text` | `string` |  |
| `rects` | `PdfRect[]` |  |

### TextMove

Kind: interface. Import from `@birchui/pdf`.

```ts
interface TextMove
```

| Property | Type | Description |
| --- | --- | --- |
| `dx` | `number` |  |
| `dy` | `number` |  |

### TextMoveResult

Kind: interface. Import from `@birchui/pdf`.

```ts
interface TextMoveResult extends TextEditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `run?` | `TextRun` |  |
| `ok` | `boolean` | Inherited from TextEditResult. |
| `reason?` | `ContentEditFailure \| undefined` | Inherited from TextEditResult. |
| `message?` | `string \| undefined` | Inherited from TextEditResult. |
| `usedFont?` | `"original" \| "embedded" \| "standard" \| undefined` | Inherited from TextEditResult. |
| `fontNames?` | `string[] \| undefined` | Inherited from TextEditResult. |
| `missing?` | `string \| undefined` | Inherited from TextEditResult. |
| `widthChange?` | `number \| undefined` | Inherited from TextEditResult. |

### TextParagraph

Kind: interface. Import from `@birchui/pdf`.

```ts
interface TextParagraph
```

| Property | Type | Description |
| --- | --- | --- |
| `index` | `number` |  |
| `text` | `string` |  |
| `lines` | `string[]` |  |
| `runs` | `TextRun[]` |  |
| `rect` | `PdfRect` |  |
| `fontName` | `string` |  |
| `baseFont?` | `string` |  |
| `fontSize` | `number` |  |
| `lineHeight` | `number` |  |
| `alignment` | `ParagraphAlignment` | How the lines sit in the block. A rewritten paragraph keeps it. |

### TextRun

Kind: interface. Import from `@birchui/pdf`.

```ts
interface TextRun
```

| Property | Type | Description |
| --- | --- | --- |
| `index` | `number` |  |
| `operator` | `string` |  |
| `text` | `string` |  |
| `rect` | `PdfRect` |  |
| `fontName` | `string` |  |
| `fontSize` | `number` |  |
| `baseFont?` | `string` |  |
| `origin` | `PdfPoint` |  |
| `matrix` | `Matrix` |  |
| `advance` | `number` |  |
| `isInvisible?` | `boolean` | Drawn with the invisible render mode, as a text layer over a scan is. |

### TextStyle

Kind: interface. Import from `@birchui/pdf`.

```ts
interface TextStyle
```

| Property | Type | Description |
| --- | --- | --- |
| `font?` | `string` | A standard font, or the name of a supplied font. |
| `fontSize?` | `number` |  |
| `color?` | `string` |  |
| `isBold?` | `boolean` |  |
| `isItalic?` | `boolean` |  |

### TimestampRequestInfo

Kind: interface. Import from `@birchui/pdf`.

```ts
interface TimestampRequestInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `hash` | `'SHA-256'` |  |
| `digest` | `Uint8Array` |  |

### ValidationDataRequest

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ValidationDataRequest
```

| Property | Type | Description |
| --- | --- | --- |
| `certificate` | `PdfCertificateInfo` |  |
| `issuer` | `PdfCertificateInfo` |  |
| `ocspUrls` | `string[]` |  |
| `crlUrls` | `string[]` |  |

### ValidationDataResponse

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ValidationDataResponse
```

| Property | Type | Description |
| --- | --- | --- |
| `ocsp?` | `Uint8Array` |  |
| `crl?` | `Uint8Array` |  |

### VerifySignaturesOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface VerifySignaturesOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `trustedRoots?` | `(Uint8Array \| string)[]` |  |
| `trustLists?` | `PdfTrustList[]` | Trust lists from `loadTrustList`. A list past its expiry date is not used and is named in the result. |
| `now?` | `Date` |  |
| `password?` | `string` |  |
| `ocsps?` | `Uint8Array[]` |  |
| `crls?` | `Uint8Array[]` |  |
| `checkRevocation?` | `RevocationCallback` |  |
| `requireRevocation?` | `boolean` |  |
| `limits?` | `Partial<PdfLimits>` |  |

### ViewerCommandInfo

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ViewerCommandInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `ViewerCommand` |  |
| `label` | `string` |  |
| `shortcut?` | `string` |  |
| `isEnabled` | `boolean` |  |

### ViewerOcrOptions

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ViewerOcrOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `model?` | `Uint8Array \| (() => Uint8Array \| Promise<Uint8Array>)` | The recognition model shipped as `@birchui/pdf/assets/ocr/latin.lqocr`: its bytes, or a function that loads them. The viewer never fetches it; it is read the first time text recognition runs. |
| `worker?` | `boolean \| OcrWorkerLike \| (() => OcrWorkerLike)` | `true` starts the packaged worker, or pass a worker running `@birchui/pdf/ocr-worker` or a function creating one. |
| `engine?` | `ViewerOcrEngine` | An engine of your own instead of the packaged one; `model` and `worker` are then ignored. |
| `languages?` | `string[]` | Languages offered in the dialog. Read from the model by default. |
| `dpi?` | `number` | Resolution pages are rendered at for recognition. 200 by default. |
| `banner?` | `boolean` | `false` hides the banner offered on scanned pages. |

### XfdfImport

Kind: interface. Import from `@birchui/pdf`.

```ts
interface XfdfImport
```

| Property | Type | Description |
| --- | --- | --- |
| `annotations` | `AnnotationInput[]` |  |
| `fields` | `Record<string, FormValue>` |  |

### ZipEntry

Kind: interface. Import from `@birchui/pdf`.

```ts
interface ZipEntry
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `bytes` | `Uint8Array` |  |
| `modified?` | `Date` |  |

### AccessibilityCode

Kind: type. Import from `@birchui/pdf`.

```ts
type AccessibilityCode =
  | 'no-title'
  | 'title-not-shown'
  | 'no-language'
  | 'not-tagged'
  | 'figure-without-alt'
  | 'untagged-content'
  | 'reading-order'
  | 'page-without-text'
  | 'field-without-tooltip'
  | 'tab-order'
  | 'no-bookmarks';
```

### AnnotationFont

Kind: type. Import from `@birchui/pdf`.

```ts
type AnnotationFont = 'Helvetica' | 'Times' | 'Courier';
```

### AnnotationInput

Kind: type. Import from `@birchui/pdf`.

```ts
type AnnotationInput = Partial<Omit<PdfAnnotation, 'type' | 'pageIndex'>> &
  Pick<PdfAnnotation, 'type' | 'pageIndex'>;
```

### AnnotationPatch

Kind: type. Import from `@birchui/pdf`.

```ts
type AnnotationPatch = Partial<Omit<PdfAnnotation, 'id'>>;
```

### AnnotationType

Kind: type. Import from `@birchui/pdf`.

```ts
type AnnotationType =
  | TextMarkupType
  | ShapeType
  | MeasurementType
  | 'note'
  | 'caret'
  | 'freeText'
  | 'ink'
  | 'stamp'
  | 'image'
  | 'signature'
  | 'redaction'
  | 'link'
  | MediaAnnotationType;
```

### ArchiveRule

Kind: type. Import from `@birchui/pdf`.

```ts
type ArchiveRule =
  | 'encryption'
  | 'fonts'
  | 'metadata'
  | 'output-intent'
  | 'javascript'
  | 'launch-action'
  | 'embedded-files'
  | 'transparency'
  | 'lzw'
  | 'file-id';
```

### ArchiveSeverity

Kind: type. Import from `@birchui/pdf`.

```ts
type ArchiveSeverity = 'error' | 'warning' | 'info';
```

### AsyncRedactionImageDecoder

Kind: type. Import from `@birchui/pdf`.

```ts
type AsyncRedactionImageDecoder = (
  image: PageRedactionImage,
) => DecodedRedactionImage | undefined | Promise<DecodedRedactionImage | undefined>;
```

### AttachmentInput

Kind: type. Import from `@birchui/pdf`.

```ts
type AttachmentInput = FileSpecInput;
```

### AttachmentRelationship

Kind: type. Import from `@birchui/pdf`.

```ts
type AttachmentRelationship =
  'Source' | 'Data' | 'Alternative' | 'Supplement' | 'EncryptedPayload' | 'FormData' | 'Schema' | 'Unspecified';
```

### BorderStyle

Kind: type. Import from `@birchui/pdf`.

```ts
type BorderStyle = 'solid' | 'dashed' | 'dotted' | 'cloudy';
```

### BuiltInStamp

Kind: type. Import from `@birchui/pdf`.

```ts
type BuiltInStamp =
  'Approved' | 'Draft' | 'Confidential' | 'Final' | 'NotApproved' | 'ForComment' | 'Void' | 'Received';
```

### ChainProblemCode

Kind: type. Import from `@birchui/pdf`.

```ts
type ChainProblemCode =
  'ca-not-valid-at-signing' | 'not-a-ca' | 'key-usage' | 'path-length' | 'name-constraints';
```

### ChainStatus

Kind: type. Import from `@birchui/pdf`.

```ts
type ChainStatus = 'trusted' | 'untrusted' | 'self-signed' | 'incomplete';
```

### ChangeSource

Kind: type. Import from `@birchui/pdf`.

```ts
type ChangeSource = 'user' | 'api' | 'history' | 'import' | 'remote';
```

### CheckResult

Kind: type. Import from `@birchui/pdf`.

```ts
type CheckResult = 'valid' | 'invalid' | 'unsupported';
```

### CommentSort

Kind: type. Import from `@birchui/pdf`.

```ts
type CommentSort = 'page' | 'date' | 'author' | 'type';
```

### CommentSummaryFormat

Kind: type. Import from `@birchui/pdf`.

```ts
type CommentSummaryFormat = 'pdf' | 'html' | 'csv';
```

### CompareInput

Kind: type. Import from `@birchui/pdf`.

```ts
type CompareInput = Uint8Array | ArrayBuffer | ComparableDocument;
```

### CompareReportFormat

Kind: type. Import from `@birchui/pdf`.

```ts
type CompareReportFormat = 'html' | 'csv' | 'json';
```

### ContentEditFailure

Kind: type. Import from `@birchui/pdf`.

```ts
type ContentEditFailure =
  | 'stale-hit'
  | 'unsupported-font'
  | 'missing-glyphs'
  | 'empty-text'
  | 'unsupported-image'
  | 'not-invertible'
  | 'unsupported-object';
```

### DocCommandId

Kind: type. Import from `@birchui/pdf`.

```ts
type DocCommandId =
  | 'fullscreen'
  | 'openFile'
  | 'properties'
  | 'calibrate'
  | 'contentAddImage'
  | 'contentReplaceImage'
  | 'contentDeleteImage'
  | 'contentRotateImageLeft'
  | 'contentRotateImageRight'
  | 'contentImageProperties'
  | 'contentTextStyle'
  | 'findReplace'
  | 'pageObjectsPanel'
  | 'pageDecorations'
  | 'background'
  | 'imagesToPdf'
  | 'watermark'
  | 'headerFooter'
  | 'bates'
  | 'fieldsPanel'
  | 'formCheck'
  | 'detectFields'
  | 'accessibilityCheck'
  | 'formImport'
  | 'formExportFdf'
  | 'formExportXfdf'
  | 'formExportJson'
  | 'formExportXml'
  | 'searchRedact'
  | 'applyRedactions'
  | 'signDocument'
  | 'signaturesPanel'
  | 'security'
  | 'sanitize'
  | 'recognizeText'
  | 'optimize'
  | 'compare'
  | 'exportImages'
  | 'exportText'
  | 'flattenAnnotations'
  | 'flattenForms'
  | 'flattenAll'
  | 'attachmentsPanel';
```

### DocumentChangeReason

Kind: type. Import from `@birchui/pdf`.

```ts
type DocumentChangeReason =
  | 'metadata'
  | 'outline'
  | 'attachments'
  | 'watermark'
  | 'headerFooter'
  | 'bates'
  | 'crop'
  | 'pageLabels'
  | 'pageText'
  | 'pageImage'
  | 'pageObject'
  | 'background'
  | 'flatten'
  | 'history';
```

### EncodedImageMimeType

Kind: type. Import from `@birchui/pdf`.

```ts
type EncodedImageMimeType = 'image/jpeg' | 'image/jp2' | 'image/x-jbig2' | 'image/g3fax';
```

### EncryptionAlgorithm

Kind: type. Import from `@birchui/pdf`.

```ts
type EncryptionAlgorithm = 'rc4-40' | 'rc4-128' | 'aes-128' | 'aes-256';
```

### ExtractedImageStatus

Kind: type. Import from `@birchui/pdf`.

```ts
type ExtractedImageStatus = 'decoded' | 'encoded-only' | 'unsupported';
```

### FieldAction

Kind: type. Import from `@birchui/pdf`.

```ts
type FieldAction =
  | SubmitFormAction
  | ResetFormAction
  | { type: 'javaScript'; script: string }
  | { type: 'named'; name: string }
  | { type: 'goTo'; pageIndex?: number; destination?: string }
  | { type: 'uri'; uri: string }
  | { type: 'hide'; fields: string[]; isHidden: boolean }
  | { type: 'other'; subtype: string };
```

### FieldActionTrigger

Kind: type. Import from `@birchui/pdf`.

```ts
type FieldActionTrigger =
  | 'activate'
  | 'mouseUp'
  | 'mouseDown'
  | 'mouseEnter'
  | 'mouseExit'
  | 'focus'
  | 'blur'
  | 'keystroke'
  | 'format'
  | 'validate'
  | 'calculate';
```

### FieldAlignment

Kind: type. Import from `@birchui/pdf`.

```ts
type FieldAlignment = 'left' | 'right' | 'top' | 'bottom' | 'center' | 'middle';
```

### FieldFormat

Kind: type. Import from `@birchui/pdf`.

```ts
type FieldFormat =
  | {
      kind: 'number';
      decimals: number;
      separatorStyle: number;
      negativeStyle: number;
      currency: string;
      isCurrencyPrepended: boolean;
    }
  | { kind: 'percent'; decimals: number; separatorStyle: number }
  | { kind: 'date'; pattern: string }
  | { kind: 'time'; pattern: string }
  | { kind: 'special'; mask: 'zip' | 'zip4' | 'phone' | 'ssn' }
  | { kind: 'mask'; mask: string };
```

### FieldScriptReport

Kind: type. Import from `@birchui/pdf`.

```ts
type FieldScriptReport = Record<FieldScriptTrigger, FieldScriptInfo>;
```

### FieldScriptTrigger

Kind: type. Import from `@birchui/pdf`.

```ts
type FieldScriptTrigger = keyof FieldScripts;
```

### FieldSignatureInput

Kind: type. Import from `@birchui/pdf`.

```ts
type FieldSignatureInput =
  | { kind: 'image'; image: AnnotationImage }
  | { kind: 'drawn'; inkList: PdfPoint[][]; strokeWidth?: number; color?: string }
  | { kind: 'typed'; text: string };
```

### FileAttachmentIcon

Kind: type. Import from `@birchui/pdf`.

```ts
type FileAttachmentIcon = 'PushPin' | 'Paperclip' | 'Graph' | 'Tag';
```

### FlattenMode

Kind: type. Import from `@birchui/pdf`.

```ts
type FlattenMode = 'forms' | 'annotations' | 'all';
```

### FormDataFormat

Kind: type. Import from `@birchui/pdf`.

```ts
type FormDataFormat = 'fdf' | 'xfdf' | 'json' | 'xml';
```

### FormFieldPatch

Kind: type. Import from `@birchui/pdf`.

```ts
type FormFieldPatch = Partial<Omit<FormFieldInput, 'name' | 'type'>> & { widgetIndex?: number };
```

### FormFieldTarget

Kind: type. Import from `@birchui/pdf`.

```ts
type FormFieldTarget = string | { name: string; widgetIndex?: number };
```

### FormFieldType

Kind: type. Import from `@birchui/pdf`.

```ts
type FormFieldType = 'text' | 'checkbox' | 'radio' | 'combo' | 'list' | 'signature' | 'button';
```

### FormIssueCode

Kind: type. Import from `@birchui/pdf`.

```ts
type FormIssueCode = 'required' | 'format' | 'range' | 'script' | 'maxLength' | 'pattern';
```

### FormJson

Kind: type. Import from `@birchui/pdf`.

```ts
type FormJson = { [name: string]: FormJsonValue };
```

### FormJsonValue

Kind: type. Import from `@birchui/pdf`.

```ts
type FormJsonValue = string | boolean | null | string[] | FormJson;
```

### FormMessageKey

Kind: type. Import from `@birchui/pdf`.

```ts
type FormMessageKey =
  | 'required'
  | 'maxLength'
  | 'number'
  | 'rangeMin'
  | 'rangeMax'
  | 'date'
  | 'time'
  | 'special'
  | 'mask'
  | 'script'
  | 'option'
  | 'readOnlyType';
```

### FormMessageParams

Kind: type. Import from `@birchui/pdf`.

```ts
type FormMessageParams = Record<string, string | number>;
```

### FormSyncValue

Kind: type. Import from `@birchui/pdf`.

```ts
type FormSyncValue = string | string[] | boolean | null;
```

### FormValue

Kind: type. Import from `@birchui/pdf`.

```ts
type FormValue = string | string[] | boolean | null;
```

### HashName

Kind: type. Import from `@birchui/pdf`.

```ts
type HashName = 'SHA-1' | 'SHA-256' | 'SHA-384' | 'SHA-512';
```

### ImageDecoder

Kind: type. Import from `@birchui/pdf`.

```ts
type ImageDecoder = (
  bytes: Uint8Array,
  mimeType: string,
) => DecodedImage | undefined | Promise<DecodedImage | undefined>;
```

### ImageFileFormat

Kind: type. Import from `@birchui/pdf`.

```ts
type ImageFileFormat = 'png' | 'jpeg' | 'gif' | 'bmp' | 'tiff' | 'webp' | 'svg';
```

### ImageMove

Kind: type. Import from `@birchui/pdf`.

```ts
type ImageMove = { dx: number; dy: number } | { rect: PdfRect } | { matrix: Matrix };
```

### ImagePageSize

Kind: type. Import from `@birchui/pdf`.

```ts
type ImagePageSize = 'image' | 'a4' | 'letter' | { width: number; height: number };
```

### KeyUsage

Kind: type. Import from `@birchui/pdf`.

```ts
type KeyUsage =
  | 'digitalSignature'
  | 'nonRepudiation'
  | 'keyEncipherment'
  | 'dataEncipherment'
  | 'keyAgreement'
  | 'keyCertSign'
  | 'cRLSign'
  | 'encipherOnly'
  | 'decipherOnly';
```

### LineEnding

Kind: type. Import from `@birchui/pdf`.

```ts
type LineEnding = 'none' | 'openArrow' | 'closedArrow' | 'circle' | 'square' | 'diamond' | 'butt';
```

### LinkAction

Kind: type. Import from `@birchui/pdf`.

```ts
type LinkAction =
  | { kind: 'uri'; uri: string }
  | ({ kind: 'goto' } & LinkDestination)
  | { kind: 'named'; name: string }
  | { kind: 'other'; actionType: string; name?: string };
```

### LinkFit

Kind: type. Import from `@birchui/pdf`.

```ts
type LinkFit = 'page' | 'width' | 'height' | 'box' | 'boxWidth' | 'boxHeight' | 'point' | 'rect';
```

### LinkHighlightMode

Kind: type. Import from `@birchui/pdf`.

```ts
type LinkHighlightMode = 'none' | 'invert' | 'outline' | 'push';
```

### MailFormat

Kind: type. Import from `@birchui/pdf`.

```ts
type MailFormat = 'msg' | 'eml';
```

### MailPageSize

Kind: type. Import from `@birchui/pdf`.

```ts
type MailPageSize = 'a4' | 'letter' | { width: number; height: number };
```

### MailPdfWarningCode

Kind: type. Import from `@birchui/pdf`.

```ts
type MailPdfWarningCode =
  | 'substituted-characters'
  | 'remote-image'
  | 'missing-image'
  | 'unsupported-image'
  | 'unsafe-link'
  | 'embedded-message-converted';
```

### Measurable

Kind: type. Import from `@birchui/pdf`.

```ts
type Measurable = Pick<PdfAnnotation, 'type' | 'line' | 'vertices' | 'measureScale'> &
  Partial<Pick<PdfAnnotation, 'label' | 'rect'>>;
```

### MeasurementType

Kind: type. Import from `@birchui/pdf`.

```ts
type MeasurementType = 'distance' | 'perimeter' | 'area' | 'count' | 'arc' | 'angle';
```

### MediaAnnotationType

Kind: type. Import from `@birchui/pdf`.

```ts
type MediaAnnotationType = 'fileAttachment' | 'sound' | 'movie' | 'screen' | 'richMedia' | 'media3d';
```

### NoteIcon

Kind: type. Import from `@birchui/pdf`.

```ts
type NoteIcon = 'comment' | 'note' | 'key' | 'help' | 'paragraph' | 'insert';
```

### ObjectOrder

Kind: type. Import from `@birchui/pdf`.

```ts
type ObjectOrder = 'front' | 'forward' | 'backward' | 'back';
```

### OcrPageState

Kind: type. Import from `@birchui/pdf`.

```ts
type OcrPageState = 'running' | 'recognized' | 'failed' | 'no-text';
```

### OfficeBlock

Kind: type. Import from `@birchui/pdf`.

```ts
type OfficeBlock =
  | { kind: 'heading'; level: 1 | 2 | 3; runs: OfficeRun[]; pageIndex: number }
  | { kind: 'paragraph'; runs: OfficeRun[]; pageIndex: number }
  | { kind: 'list'; isOrdered: boolean; marker: string; runs: OfficeRun[]; pageIndex: number }
  | { kind: 'table'; rows: string[][]; pageIndex: number };
```

### OptimizePreset

Kind: type. Import from `@birchui/pdf`.

```ts
type OptimizePreset = 'lossless' | 'balanced' | 'smallest';
```

### PadesLevel

Kind: type. Import from `@birchui/pdf`.

```ts
type PadesLevel = 'B-B' | 'B-T' | 'B-LT' | 'B-LTA' | 'not-pades';
```

### PageAnchor

Kind: type. Import from `@birchui/pdf`.

```ts
type PageAnchor =
  | 'center'
  | 'top-left'
  | 'top-center'
  | 'top-right'
  | 'center-left'
  | 'center-right'
  | 'bottom-left'
  | 'bottom-center'
  | 'bottom-right';
```

### PageBoxesPatch

Kind: type. Import from `@birchui/pdf`.

```ts
type PageBoxesPatch = { media?: PdfRect } & Partial<Record<Exclude<PageBoxKey, 'media'>, PdfRect | null>>;
```

### PageBoxKey

Kind: type. Import from `@birchui/pdf`.

```ts
type PageBoxKey = keyof PageBoxes;
```

### PageCommandId

Kind: type. Import from `@birchui/pdf`.

```ts
type PageCommandId =
  | 'pagesOrganize'
  | 'pagesMerge'
  | 'pagesInsertBlank'
  | 'pagesInsertPdf'
  | 'pagesInsertImages'
  | 'pagesInsertClipboard'
  | 'pagesDelete'
  | 'pagesRotateLeft'
  | 'pagesRotateRight'
  | 'pagesDuplicate'
  | 'pagesExtract'
  | 'pagesSplit'
  | 'pagesReplace'
  | 'pagesMove'
  | 'pagesReverse'
  | 'pagesCrop'
  | 'pagesResize'
  | 'pagesNumbers'
  | 'pagesRemoveNumbers'
  | 'pagesLabels'
  | 'pagesBoxes'
  | 'pagesDeleteBlank'
  | 'pagesAutoRotate'
  | 'pagesInterleave'
  | 'pagesImpose'
  | 'pagesOptimize';
```

### PageComparisonStatus

Kind: type. Import from `@birchui/pdf`.

```ts
type PageComparisonStatus = 'unchanged' | 'changed' | 'added' | 'removed' | 'moved';
```

### PageImageFormat

Kind: type. Import from `@birchui/pdf`.

```ts
type PageImageFormat = 'raw' | 'jpeg' | 'jpeg2000' | 'jbig2' | 'ccitt' | 'unknown';
```

### PageLabelStyle

Kind: type. Import from `@birchui/pdf`.

```ts
type PageLabelStyle = 'decimal' | 'roman-upper' | 'roman-lower' | 'alpha-upper' | 'alpha-lower' | 'none';
```

### PageLayerKind

Kind: type. Import from `@birchui/pdf`.

```ts
type PageLayerKind = 'watermark' | 'header' | 'footer' | 'background' | 'pageNumbers' | 'bates';
```

### PageMarkKind

Kind: type. Import from `@birchui/pdf`.

```ts
type PageMarkKind = 'tick' | 'cross' | 'dot' | 'circle';
```

### PageNumberPosition

Kind: type. Import from `@birchui/pdf`.

```ts
type PageNumberPosition =
  'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
```

### PageObjectKind

Kind: type. Import from `@birchui/pdf`.

```ts
type PageObjectKind = 'text' | 'image' | 'path' | 'form' | 'shading' | 'inlineImage';
```

### PageObjectLayer

Kind: type. Import from `@birchui/pdf`.

```ts
type PageObjectLayer = 'watermark' | 'header' | 'footer' | 'background' | 'pageNumbers' | 'bates';
```

### PagesChangeReason

Kind: type. Import from `@birchui/pdf`.

```ts
type PagesChangeReason =
  'move' | 'rotate' | 'delete' | 'insert' | 'merge' | 'history' | 'redaction' | 'crop' | 'content';
```

### PageSelector

Kind: type. Import from `@birchui/pdf`.

```ts
type PageSelector = 'all' | 'odd' | 'even' | string;
```

### PageSourceKind

Kind: type. Import from `@birchui/pdf`.

```ts
type PageSourceKind = 'original' | 'merged' | 'blank';
```

### PageSyncOperationKind

Kind: type. Import from `@birchui/pdf`.

```ts
type PageSyncOperationKind = 'insert' | 'move' | 'rotate' | 'delete';
```

### PageTextDirection

Kind: type. Import from `@birchui/pdf`.

```ts
type PageTextDirection = 'ltr' | 'rtl' | 'ttb';
```

### PageTextOptions

Kind: type. Import from `@birchui/pdf`.

```ts
type PageTextOptions = Omit<StructuredTextOptions, 'exclude'>;
```

### PageTextOrder

Kind: type. Import from `@birchui/pdf`.

```ts
type PageTextOrder = 'reading' | 'content';
```

### PdfARule

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfARule =
  | 'header'
  | 'encryption'
  | 'file-id'
  | 'stream'
  | 'output-intent'
  | 'device-colour'
  | 'transparency'
  | 'image'
  | 'content'
  | 'xobject'
  | 'fonts'
  | 'annotations'
  | 'actions'
  | 'metadata'
  | 'forms'
  | 'embedded-files';
```

### PdfBytes

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfBytes = Uint8Array<ArrayBuffer>;
```

### PdfCertificationPermission

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfCertificationPermission = 'no-changes' | 'form-filling' | 'annotations-and-forms';
```

### PdfCollectionFieldType

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfCollectionFieldType =
  'text' | 'date' | 'number' | 'fileName' | 'description' | 'modified' | 'created' | 'size' | 'compressedSize';
```

### PdfCollectionValue

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfCollectionValue = string | number | Date;
```

### PdfCollectionView

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfCollectionView = 'details' | 'tile' | 'hidden';
```

### PdfFieldLock

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfFieldLock = 'all' | { include: string[] } | { exclude: string[] };
```

### PdfFieldType

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfFieldType = FormFieldType | 'barcode';
```

### PdfFileConverter

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfFileConverter = (
  data: Uint8Array,
  file: { name: string; type: string },
) => Promise<Uint8Array | ArrayBuffer | undefined> | Uint8Array | ArrayBuffer | undefined;
```

Turns the bytes of a file of another format into the bytes of a PDF; see the `fileConverters` option.

### PdfFontFallback

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfFontFallback = (
  script: TextScript,
  characters: string,
) => Uint8Array | PdfFontSource | undefined | Promise<Uint8Array | PdfFontSource | undefined>;
```

### PdfInitialPageLayout

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfInitialPageLayout =
  'single' | 'continuous' | 'two-column' | 'two-column-cover' | 'two-page' | 'two-page-cover';
```

### PdfInitialPageMode

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfInitialPageMode = 'none' | 'outlines' | 'thumbnails' | 'fullscreen' | 'layers' | 'attachments';
```

### PdfLimitName

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfLimitName = keyof PdfLimits;
```

### PdfPermissionName

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfPermissionName = keyof PdfPermissions | 'changeSecurity';
```

### PdfProgressiveSource

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfProgressiveSource = PdfUrlSource | PdfRangeSource;
```

### PdfQuad

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfQuad = [bottomLeft: PdfPoint, bottomRight: PdfPoint, topRight: PdfPoint, topLeft: PdfPoint];
```

### PdfRect

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfRect = [x1: number, y1: number, x2: number, y2: number];
```

### PdfRendererSource

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfRendererSource = PdfRenderer | (() => PdfRenderer | Promise<PdfRenderer>);
```

### PdfSegment

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfSegment = [x1: number, y1: number, x2: number, y2: number];
```

### PdfSignatureSubFilter

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfSignatureSubFilter = 'adbe.pkcs7.detached' | 'ETSI.CAdES.detached';
```

### PdfSignatureSummary

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfSignatureSummary =
  'trusted' | 'valid-untrusted' | 'changed-after-signing' | 'revoked' | 'invalid' | 'unsupported';
```

### PdfSource

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfSource = Uint8Array | ArrayBuffer | Blob;
```

### PdfViewerLabels

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfViewerLabels = Record<LabelKey, string> & { tools: Record<ViewerTool, string> };
```

### PdfWorkerSource

Kind: type. Import from `@birchui/pdf`.

```ts
type PdfWorkerSource = boolean | Worker | (() => Worker);
```

### Pkcs12ErrorReason

Kind: type. Import from `@birchui/pdf`.

```ts
type Pkcs12ErrorReason = 'password-incorrect' | 'unsupported' | 'malformed';
```

### PresenceMessage

Kind: type. Import from `@birchui/pdf`.

```ts
type PresenceMessage =
  { type: 'presence'; state: PresenceState; sentAt: number } | { type: 'leave'; actorId: string; sentAt: number };
```

### PrintMode

Kind: type. Import from `@birchui/pdf`.

```ts
type PrintMode = 'auto' | 'vector' | 'raster';
```

### PrintScale

Kind: type. Import from `@birchui/pdf`.

```ts
type PrintScale = 'actual' | 'fit' | number;
```

### RecognizeTextCallback

Kind: type. Import from `@birchui/pdf`.

```ts
type RecognizeTextCallback = (image: OcrPageImage) => OcrWord[] | Promise<OcrWord[]>;
```

### RedactionImageDecoder

Kind: type. Import from `@birchui/pdf`.

```ts
type RedactionImageDecoder = (image: PageRedactionImage) => DecodedRedactionImage | undefined;
```

### RedactionImageRemovalReason

Kind: type. Import from `@birchui/pdf`.

```ts
type RedactionImageRemovalReason = 'covered' | 'undecodable' | 'mask-undecodable' | 'inline-image';
```

### RedactionPattern

Kind: type. Import from `@birchui/pdf`.

```ts
type RedactionPattern = RedactionPatternName;
```

### RedactionPatternName

Kind: type. Import from `@birchui/pdf`.

```ts
type RedactionPatternName = keyof typeof REDACTION_PATTERNS;
```

### RedactionQuery

Kind: type. Import from `@birchui/pdf`.

```ts
type RedactionQuery =
  | string
  | RegExp
  | { text: string; matchCase?: boolean; wholeWord?: boolean }
  | { pattern: RegExp }
  | { preset: RedactionPatternName };
```

### RendererFetchDocument

Kind: type. Import from `@birchui/pdf`.

```ts
type RendererFetchDocument = (request: RendererFetchRequest) => Promise<RendererFetchReply>;
```

### ReplyInput

Kind: type. Import from `@birchui/pdf`.

```ts
type ReplyInput = string | (Partial<AnnotationReply> & { contents: string });
```

### ReviewStatus

Kind: type. Import from `@birchui/pdf`.

```ts
type ReviewStatus = 'none' | 'accepted' | 'rejected' | 'cancelled' | 'completed';
```

### RevisionChangeKind

Kind: type. Import from `@birchui/pdf`.

```ts
type RevisionChangeKind =
  'form' | 'annotation' | 'signature' | 'timestamp' | 'dss' | 'appearance' | 'metadata' | 'other';
```

### RevocationCallback

Kind: type. Import from `@birchui/pdf`.

```ts
type RevocationCallback = (
  certificate: PdfCertificateInfo,
  issuer: PdfCertificateInfo,
) => RevocationAnswer | Promise<RevocationAnswer>;
```

### RevocationStatus

Kind: type. Import from `@birchui/pdf`.

```ts
type RevocationStatus = 'good' | 'revoked' | 'unknown' | 'not-checked';
```

### RichTextAlign

Kind: type. Import from `@birchui/pdf`.

```ts
type RichTextAlign = 'left' | 'center' | 'right';
```

### SaveMode

Kind: type. Import from `@birchui/pdf`.

```ts
type SaveMode = 'auto' | 'incremental' | 'full';
```

### ScrollMode

Kind: type. Import from `@birchui/pdf`.

```ts
type ScrollMode = 'vertical' | 'horizontal' | 'page';
```

### ShapeType

Kind: type. Import from `@birchui/pdf`.

```ts
type ShapeType = 'rectangle' | 'ellipse' | 'line' | 'arrow' | 'polygon' | 'polyline';
```

### ShortcutOverrides

Kind: type. Import from `@birchui/pdf`.

```ts
type ShortcutOverrides = Partial<Record<ViewerCommand, string | string[] | false>>;
```

### SidebarPanel

Kind: type. Import from `@birchui/pdf`.

```ts
type SidebarPanel =
  | 'thumbnails'
  | 'outline'
  | 'annotations'
  | 'fields'
  | 'search'
  | 'redaction'
  | 'attachments'
  | 'signatures'
  | 'layers'
  | 'objects';
```

### SignDigestCallback

Kind: type. Import from `@birchui/pdf`.

```ts
type SignDigestCallback = (digest: PdfBytes, info: SignDigestInfo) => Promise<Uint8Array> | Uint8Array;
```

### SimpleCalculation

Kind: type. Import from `@birchui/pdf`.

```ts
type SimpleCalculation =
  { op: 'sum' | 'product' | 'average' | 'min' | 'max'; fields: string[] } | { expression: string };
```

### SplitOptions

Kind: type. Import from `@birchui/pdf`.

```ts
type SplitOptions =
  | { ranges: string | readonly (readonly [number, number])[] }
  | { every: number }
  | { byBookmark: { level?: number } }
  | { maxBytes: number }
  | { byBlankPages: true };
```

### SpreadMode

Kind: type. Import from `@birchui/pdf`.

```ts
type SpreadMode = 'none' | 'odd' | 'even';
```

### StampPosition

Kind: type. Import from `@birchui/pdf`.

```ts
type StampPosition = PageAnchor | { x: number; y: number };
```

### StandardFont

Kind: type. Import from `@birchui/pdf`.

```ts
type StandardFont =
  | 'Helvetica'
  | 'Helvetica-Bold'
  | 'Helvetica-Oblique'
  | 'Helvetica-BoldOblique'
  | 'Times-Roman'
  | 'Times-Bold'
  | 'Times-Italic'
  | 'Times-BoldItalic'
  | 'Courier'
  | 'Courier-Bold'
  | 'Courier-Oblique'
  | 'Courier-BoldOblique'
  | 'Symbol'
  | 'ZapfDingbats';
```

### StandardFontName

Kind: type. Import from `@birchui/pdf`.

```ts
type StandardFontName =
  | 'Helvetica'
  | 'Helvetica-Bold'
  | 'Helvetica-Oblique'
  | 'Helvetica-BoldOblique'
  | 'Times-Roman'
  | 'Times-Bold'
  | 'Times-Italic'
  | 'Times-BoldItalic'
  | 'Courier'
  | 'Courier-Bold'
  | 'Courier-Oblique'
  | 'Courier-BoldOblique';
```

### SubmitFormat

Kind: type. Import from `@birchui/pdf`.

```ts
type SubmitFormat = 'fdf' | 'xfdf' | 'html' | 'pdf';
```

### SyncChannelName

Kind: type. Import from `@birchui/pdf`.

```ts
type SyncChannelName = SyncMessage['channel'];
```

### SyncJson

Kind: type. Import from `@birchui/pdf`.

```ts
type SyncJson = string | number | boolean | null | SyncJson[] | { [key: string]: SyncJson };
```

### SyncMessage

Kind: type. Import from `@birchui/pdf`.

```ts
type SyncMessage =
  | { channel: 'annotations'; operations: SyncOperation[] }
  | { channel: 'forms'; operations: FormSyncOperation[] }
  | { channel: 'pages'; operations: PageSyncOperation[] }
  | { channel: 'presence'; message: PresenceMessage };
```

### SyncOperationKind

Kind: type. Import from `@birchui/pdf`.

```ts
type SyncOperationKind = 'add' | 'update' | 'remove' | 'reply-add' | 'reply-update' | 'reply-remove';
```

### TabOrderMode

Kind: type. Import from `@birchui/pdf`.

```ts
type TabOrderMode = 'row' | 'column' | 'structure' | 'manual' | 'unspecified';
```

### TextChangeType

Kind: type. Import from `@birchui/pdf`.

```ts
type TextChangeType = 'inserted' | 'deleted' | 'moved';
```

### TextLayerRotation

Kind: type. Import from `@birchui/pdf`.

```ts
type TextLayerRotation = 0 | 90 | 180 | 270;
```

### TextMarkupType

Kind: type. Import from `@birchui/pdf`.

```ts
type TextMarkupType = 'highlight' | 'underline' | 'strikeout' | 'squiggly';
```

### TimestampCallback

Kind: type. Import from `@birchui/pdf`.

```ts
type TimestampCallback = (data: Uint8Array, info: TimestampRequestInfo) => Promise<Uint8Array> | Uint8Array;
```

### ToolbarItem

Kind: type. Import from `@birchui/pdf`.

```ts
type ToolbarItem = ToolbarItemName | CustomToolbarItem;
```

### ToolbarItemName

Kind: type. Import from `@birchui/pdf`.

```ts
type ToolbarItemName =
  | 'sidebar'
  | 'pageNavigation'
  | 'zoom'
  | 'rotate'
  | 'view'
  | 'pointer'
  | 'search'
  | 'tools'
  | 'undoRedo'
  | 'print'
  | 'download'
  | 'theme'
  | 'menu'
  | 'separator'
  | 'spacer';
```

### ToolbarPreset

Kind: type. Import from `@birchui/pdf`.

```ts
type ToolbarPreset = 'viewer' | 'reviewer' | 'editor' | 'form-filler' | 'full';
```

### ToolbarTab

Kind: type. Import from `@birchui/pdf`.

```ts
type ToolbarTab = 'view' | 'comment' | 'edit' | 'pages' | 'forms' | 'protect' | 'tools';
```

### ToolGroup

Kind: type. Import from `@birchui/pdf`.

```ts
type ToolGroup = ToolbarTab | 'annotate' | 'shapes' | 'insert' | 'measure' | 'redact' | 'content';
```

### ValidationDataCallback

Kind: type. Import from `@birchui/pdf`.

```ts
type ValidationDataCallback = (
  request: ValidationDataRequest,
) => ValidationDataResponse | undefined | Promise<ValidationDataResponse | undefined>;
```

### ViewerCommand

Kind: type. Import from `@birchui/pdf`.

```ts
type ViewerCommand =
  | PageCommandId
  | DocCommandId
  | 'zoomIn'
  | 'zoomOut'
  | 'zoomReset'
  | 'fitWidth'
  | 'fitPage'
  | 'nextPage'
  | 'previousPage'
  | 'firstPage'
  | 'lastPage'
  | 'find'
  | 'findNext'
  | 'findPrevious'
  | 'print'
  | 'download'
  | 'rotateClockwise'
  | 'rotateCounterClockwise'
  | 'undo'
  | 'redo'
  | 'deleteSelection'
  | 'escape'
  | 'toggleSidebar'
  | 'selectAll'
  | 'copy'
  | 'cut'
  | 'paste'
  | 'duplicate'
  | 'bringForward'
  | 'sendBackward'
  | 'bringToFront'
  | 'sendToBack'
  | 'presentation'
  | 'shortcutHelp'
  | 'contextMenu'
  | 'focusToolbar'
  | 'placeAtCenter'
  | 'commandPalette'
  | 'readAloud'
  | 'snapshotPage'
  | `tool:${ViewerTool}`
  | 'tool:select'
  | 'tool:pan'
  | 'tool:marqueeZoom'
  | 'tool:eraser'
  | 'tool:stamp'
  | 'tool:highlight'
  | 'tool:underline'
  | 'tool:strikeout'
  | 'tool:note'
  | 'tool:freeText'
  | 'tool:ink'
  | 'tool:rectangle'
  | 'tool:ellipse'
  | 'tool:line'
  | 'tool:arrow'
  | 'tool:redaction';
```

### ViewerOcrEngine

Kind: type. Import from `@birchui/pdf`.

```ts
type ViewerOcrEngine = Pick<OcrEngine, 'recognizePage'>;
```

### ViewerTool

Kind: type. Import from `@birchui/pdf`.

```ts
type ViewerTool =
  | 'select'
  | 'pan'
  | 'marqueeZoom'
  | 'snapshot'
  | TextMarkupType
  | 'insertText'
  | 'replaceText'
  | 'note'
  | 'freeText'
  | 'callout'
  | 'ink'
  | 'eraser'
  | 'rectangle'
  | 'ellipse'
  | 'cloud'
  | 'line'
  | 'arrow'
  | 'polygon'
  | 'polyline'
  | 'distance'
  | 'perimeter'
  | 'area'
  | 'stamp'
  | 'image'
  | 'signature'
  | 'redaction'
  | 'formField'
  | 'editText'
  | 'addText'
  | 'editImage'
  | 'count'
  | 'arc'
  | 'angle'
  | 'link';
```

### ZoomValue

Kind: type. Import from `@birchui/pdf`.

```ts
type ZoomValue = number | 'fit-width' | 'fit-page' | 'auto';
```

## @birchui/pdf/engine

### addDocumentTimestamp

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function addDocumentTimestamp(data: Uint8Array | ArrayBuffer, options: AddDocumentTimestampOptions): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options` | `AddDocumentTimestampOptions` |  |

### addValidationData

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function addValidationData(data: Uint8Array | ArrayBuffer, options: AddValidationDataOptions = {}): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `AddValidationDataOptions` |  |

### analyzeLayout

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function analyzeLayout(source: OfficeExportSource, options: OfficeExportOptions = {}): OfficeBlock[]
```

Reads the text of the pages as headings, paragraphs, list items and tables. Every line of the page text ends up in
exactly one block, in reading order, so the text of the blocks equals the page text apart from white space.

| Parameter | Type | Description |
| --- | --- | --- |
| `source` | `OfficeExportSource` |  |
| `options?` | `OfficeExportOptions` |  |

### angleBetween

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function angleBetween(a: PdfPoint, vertex: PdfPoint, b: PdfPoint): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `a` | `PdfPoint` |  |
| `vertex` | `PdfPoint` |  |
| `b` | `PdfPoint` |  |

### annotationBounds

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function annotationBounds(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>): PdfRect
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'rect' \| 'rotation'>` |  |

### annotationCorners

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function annotationCorners(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>): PdfPoint[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'rect' \| 'rotation'>` |  |

### annotationFlags

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function annotationFlags(annotation: Pick< PdfAnnotation, 'isHidden' | 'isLocked' | 'isReadOnly' | 'isContentsLocked' | 'isNoView' | 'isPrintable' >, extra = 0): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick< PdfAnnotation, 'isHidden' \| 'isLocked' \| 'isReadOnly' \| 'isContentsLocked' \| 'isNoView' \| 'isPrintable' >` |  |
| `extra?` | `unknown` |  |

### annotationInputFromPreset

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function annotationInputFromPreset(preset: AnnotationPreset, placement: Partial<Omit<AnnotationInput, 'type'>> & { pageIndex: number }): AnnotationInput
```

| Parameter | Type | Description |
| --- | --- | --- |
| `preset` | `AnnotationPreset` |  |
| `placement` | `Partial<Omit<AnnotationInput, 'type'>> & { pageIndex: number }` |  |

### annotationPermissions

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function annotationPermissions(annotation: PdfAnnotation, user: AnnotationUser | string, options: AnnotationPermissionOptions = {}): AnnotationPermissions
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `PdfAnnotation` |  |
| `user` | `AnnotationUser \| string` |  |
| `options?` | `AnnotationPermissionOptions` |  |

### annotationPresetsFromJson

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function annotationPresetsFromJson(value: unknown): AnnotationPreset[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `unknown` |  |

### annotationPresetsToJson

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function annotationPresetsToJson(presets: readonly AnnotationPreset[]): AnnotationPresetsJson
```

| Parameter | Type | Description |
| --- | --- | --- |
| `presets` | `readonly AnnotationPreset[]` |  |

### annotationRichDefaults

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function annotationRichDefaults(annotation: Pick<PdfAnnotation, 'fontSize' | 'fontColor' | 'color' | 'fontFamily' | 'textAlign'>): RichTextDefaults
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'fontSize' \| 'fontColor' \| 'color' \| 'fontFamily' \| 'textAlign'>` |  |

### annotationsFromJson

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function annotationsFromJson(value: unknown): AnnotationInput[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `unknown` |  |

### annotationsToFdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function annotationsToFdf(annotations: readonly PdfAnnotation[], options: AnnotationsFdfOptions = {}): Uint8Array
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotations` | `readonly PdfAnnotation[]` |  |
| `options?` | `AnnotationsFdfOptions` |  |

### annotationsToJson

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function annotationsToJson(annotations: readonly PdfAnnotation[]): AnnotationsJson
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotations` | `readonly PdfAnnotation[]` |  |

### annotationsToXfdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function annotationsToXfdf(annotations: readonly PdfAnnotation[], fields: readonly PdfFormField[] = [], fileName?: string): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotations` | `readonly PdfAnnotation[]` |  |
| `fields?` | `readonly PdfFormField[]` |  |
| `fileName?` | `string` |  |

### arcPoints

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function arcPoints(points: readonly PdfPoint[], segments = 48): PdfPoint[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `points` | `readonly PdfPoint[]` |  |
| `segments?` | `unknown` |  |

### arcThrough

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function arcThrough(start: PdfPoint, through: PdfPoint, end: PdfPoint): ArcGeometry | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `start` | `PdfPoint` |  |
| `through` | `PdfPoint` |  |
| `end` | `PdfPoint` |  |

### blocksText

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function blocksText(blocks: readonly OfficeBlock[]): string
```

The text of the blocks, one block per line; cells of a table row are separated by tabs.

| Parameter | Type | Description |
| --- | --- | --- |
| `blocks` | `readonly OfficeBlock[]` |  |

### blocksToDocx

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function blocksToDocx(blocks: readonly OfficeBlock[], options: { title?: string } = {}): PdfBytes
```

Writes the blocks as a Word document: heading styles, bulleted and numbered lists, and bordered tables.

| Parameter | Type | Description |
| --- | --- | --- |
| `blocks` | `readonly OfficeBlock[]` |  |
| `options?` | `{ title?: string }` |  |

### bookletOrder

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function bookletOrder(pageCount: number, isRightToLeft = false): number[][]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `pageCount` | `number` |  |
| `isRightToLeft?` | `unknown` |  |

### buildCompareReport

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function buildCompareReport(comparison: PdfComparison, options: CompareReportOptions = {}): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `comparison` | `PdfComparison` |  |
| `options?` | `CompareReportOptions` |  |

### buildSrgbProfile

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function buildSrgbProfile(): Uint8Array
```

### canonicalFontName

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function canonicalFontName(baseFont: string): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `baseFont` | `string` |  |

### certificateToDer

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function certificateToDer(input: Uint8Array | string): Uint8Array
```

| Parameter | Type | Description |
| --- | --- | --- |
| `input` | `Uint8Array \| string` |  |

### checkArchiveReadiness

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function checkArchiveReadiness(input: Uint8Array | ArrayBuffer | ArchiveSource): ArchiveReport
```

| Parameter | Type | Description |
| --- | --- | --- |
| `input` | `Uint8Array \| ArrayBuffer \| ArchiveSource` |  |

### checkChainConstraints

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function checkChainConstraints(chain: readonly ParsedCertificate[], at: Date): ChainProblem[]
```

Checks what a path builder must check beyond signatures, RFC 5280 section 6: every issuer is a CA that may sign
certificates and was valid at the given time, path-length limits hold, the names of the certificates below a CA
satisfy its name constraints, and the signer's key may be used for signing.

| Parameter | Type | Description |
| --- | --- | --- |
| `chain` | `readonly ParsedCertificate[]` |  |
| `at` | `Date` |  |

### checkFieldValue

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function checkFieldValue(field: ValidatedField, value: FormValue, resolve?: FieldValueResolver): FieldIssue | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `field` | `ValidatedField` |  |
| `value` | `FormValue` |  |
| `resolve?` | `FieldValueResolver` |  |

### circleThrough

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function circleThrough(a: PdfPoint, b: PdfPoint, c: PdfPoint): { center: PdfPoint; radius: number } | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `a` | `PdfPoint` |  |
| `b` | `PdfPoint` |  |
| `c` | `PdfPoint` |  |

### classifyScript

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function classifyScript(trigger: FieldScriptTrigger, source: string | undefined): FieldScriptInfo
```

| Parameter | Type | Description |
| --- | --- | --- |
| `trigger` | `FieldScriptTrigger` |  |
| `source` | `string \| undefined` |  |

### comparePageTexts

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function comparePageTexts(textsA: readonly ComparablePageText[], textsB: readonly ComparablePageText[], options: ComparePdfOptions = {}): PdfComparison
```

| Parameter | Type | Description |
| --- | --- | --- |
| `textsA` | `readonly ComparablePageText[]` |  |
| `textsB` | `readonly ComparablePageText[]` |  |
| `options?` | `ComparePdfOptions` |  |

### comparePdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function comparePdf(a: CompareInput, b: CompareInput, options: ComparePdfOptions = {}): PdfComparison
```

| Parameter | Type | Description |
| --- | --- | --- |
| `a` | `CompareInput` |  |
| `b` | `CompareInput` |  |
| `options?` | `ComparePdfOptions` |  |

### comparePdfAsync

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function comparePdfAsync(a: CompareInput, b: CompareInput, options: ComparePdfAsyncOptions = {}): Promise<PdfComparison>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `a` | `CompareInput` |  |
| `b` | `CompareInput` |  |
| `options?` | `ComparePdfAsyncOptions` |  |

### compareSyncClocks

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function compareSyncClocks(a: SyncClock, b: SyncClock): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `a` | `SyncClock` |  |
| `b` | `SyncClock` |  |

### comparisonAnnotations

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function comparisonAnnotations(changes: readonly PdfTextChange[], options: Pick<ComparePdfOptions, 'colors' | 'author'> = {}): { a: AnnotationInput[]; b: AnnotationInput[] }
```

| Parameter | Type | Description |
| --- | --- | --- |
| `changes` | `readonly PdfTextChange[]` |  |
| `options?` | `Pick<ComparePdfOptions, 'colors' \| 'author'>` |  |

### convertMailFile

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function convertMailFile(bytes: Uint8Array, hint: MailFileHint = {}, options: MailToPdfOptions = {}): Promise<MailConversion>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |
| `hint?` | `MailFileHint` |  |
| `options?` | `MailToPdfOptions` |  |

### convertToPdfA

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function convertToPdfA(data: Uint8Array | ArrayBuffer, options: PdfAConversionOptions = {}): Promise<PdfAConversionResult>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `PdfAConversionOptions` |  |

### createAnnotationSync

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function createAnnotationSync(host: AnnotationSyncHost, options: AnnotationSyncOptions): AnnotationSync
```

| Parameter | Type | Description |
| --- | --- | --- |
| `host` | `AnnotationSyncHost` |  |
| `options` | `AnnotationSyncOptions` |  |

### createFontRegistry

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function createFontRegistry(fonts: readonly PdfFontSource[] = []): FontRegistry
```

| Parameter | Type | Description |
| --- | --- | --- |
| `fonts?` | `readonly PdfFontSource[]` |  |

### createFormSync

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function createFormSync(host: FormSyncHost, options: FormSyncOptions): FormSync
```

| Parameter | Type | Description |
| --- | --- | --- |
| `host` | `FormSyncHost` |  |
| `options` | `FormSyncOptions` |  |

### createPageSync

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function createPageSync(host: PageSyncHost, options: PageSyncOptions): PageSync
```

| Parameter | Type | Description |
| --- | --- | --- |
| `host` | `PageSyncHost` |  |
| `options` | `PageSyncOptions` |  |

### createPresenceTracker

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function createPresenceTracker(options: { actorId?: string; timeout?: number; onChange?: (states: PresenceState[]) => void; now?: () => number; } = {}): PresenceTracker
```

| Parameter | Type | Description |
| --- | --- | --- |
| `options?` | `{ actorId?: string; timeout?: number; onChange?: (states: PresenceState[]) => void; now?: () => number; }` |  |

### createZip

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function createZip(entries: readonly ZipEntry[]): PdfBytes
```

| Parameter | Type | Description |
| --- | --- | --- |
| `entries` | `readonly ZipEntry[]` |  |

### decodeImageFile

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function decodeImageFile(bytes: Uint8Array, options: PrepareImageOptions = {}): Promise<DecodedImage>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |
| `options?` | `PrepareImageOptions` |  |

### decodeJpeg

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function decodeJpeg(bytes: Uint8Array, options: JpegDecodeOptions = {}): JpegImage
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |
| `options?` | `JpegDecodeOptions` |  |

### decompressRtf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function decompressRtf(data: Uint8Array, options: DecompressRtfOptions = {}): Uint8Array
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `options?` | `DecompressRtfOptions` |  |

### decryptPdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function decryptPdf(data: Uint8Array | ArrayBuffer, password?: string): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `password?` | `string` |  |

### derToPem

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function derToPem(der: Uint8Array, label: string): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `der` | `Uint8Array` |  |
| `label` | `string` |  |

### describeLinkAction

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function describeLinkAction(action: LinkAction | undefined): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `action` | `LinkAction \| undefined` |  |

### describeScripts

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function describeScripts(field: Pick<PdfFormField, 'format' | 'calculation' | 'range' | 'scripts'>): FieldScriptReport
```

| Parameter | Type | Description |
| --- | --- | --- |
| `field` | `Pick<PdfFormField, 'format' \| 'calculation' \| 'range' \| 'scripts'>` |  |

### detectFields

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function detectFields(shapes: readonly DetectionShape[], text: PageTextStructure, pageIndex: number, options: DetectFieldsOptions = {}): DetectedField[]
```

Proposes form fields for a flat page: a text field on every blank line and in every empty box, and a check box in
every small empty square, each named after the text beside or above it.

| Parameter | Type | Description |
| --- | --- | --- |
| `shapes` | `readonly DetectionShape[]` |  |
| `text` | `PageTextStructure` |  |
| `pageIndex` | `number` |  |
| `options?` | `DetectFieldsOptions` |  |

### detectImageFormat

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function detectImageFormat(bytes: Uint8Array): ImageFileFormat | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |

### detectMailFormat

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function detectMailFormat(bytes: Uint8Array, hint: MailFileHint = {}): MailFormat | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |
| `hint?` | `MailFileHint` |  |

### embedMissingFonts

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function embedMissingFonts(editor: PdfEditor, fonts: Readonly<Record<string, Uint8Array>> = {}): PdfAFontReplacement[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `editor` | `PdfEditor` |  |
| `fonts?` | `Readonly<Record<string, Uint8Array>>` |  |

### encryptPdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function encryptPdf(data: Uint8Array | ArrayBuffer, options: EncryptOptions & { password?: string }): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options` | `EncryptOptions & { password?: string }` |  |

### fieldKind

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function fieldKind(field: Pick<PdfFormField, 'type' | 'barcode'>): PdfFieldType
```

| Parameter | Type | Description |
| --- | --- | --- |
| `field` | `Pick<PdfFormField, 'type' \| 'barcode'>` |  |

### filterFieldKeystroke

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function filterFieldKeystroke(field: KeystrokeField, currentValue: string, change: string, selStart: number, selEnd: number = selStart): KeystrokeResult
```

| Parameter | Type | Description |
| --- | --- | --- |
| `field` | `KeystrokeField` |  |
| `currentValue` | `string` |  |
| `change` | `string` |  |
| `selStart` | `number` |  |
| `selEnd?` | `number` |  |

### formatBatesNumber

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function formatBatesNumber(index: number, options: BatesOptions = {}): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `index` | `number` |  |
| `options?` | `BatesOptions` |  |

### formatFieldValue

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function formatFieldValue(field: Pick<PdfFormField, 'format' | 'value'> & { scripts?: FieldScripts }, value: FormValue = field.value): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `field` | `Pick<PdfFormField, 'format' \| 'value'> & { scripts?: FieldScripts }` |  |
| `value?` | `FormValue` |  |

### formatFormMessage

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function formatFormMessage(key: FormMessageKey, params: FormMessageParams = {}, messages: Partial<Record<FormMessageKey, string>> = {}): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `key` | `FormMessageKey` |  |
| `params?` | `FormMessageParams` |  |
| `messages?` | `Partial<Record<FormMessageKey, string>>` |  |

### formatMeasurement

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function formatMeasurement(annotation: Measurable): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Measurable` |  |

### formSyncHost

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function formSyncHost(document: SyncableDocument): FormSyncHost
```

| Parameter | Type | Description |
| --- | --- | --- |
| `document` | `SyncableDocument` |  |

### fromSyncJson

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function fromSyncJson(value: SyncJson): unknown
```

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `SyncJson` |  |

### getDefaultPdfLimits

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function getDefaultPdfLimits(): PdfLimits
```

### hitTestAnnotation

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function hitTestAnnotation(annotation: PdfAnnotation, point: PdfPoint, tolerance = 4): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `PdfAnnotation` |  |
| `point` | `PdfPoint` |  |
| `tolerance?` | `unknown` |  |

### hitTestRotated

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function hitTestRotated(annotation: PdfAnnotation, p: PdfPoint, tolerance = 4): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `PdfAnnotation` |  |
| `p` | `PdfPoint` |  |
| `tolerance?` | `unknown` |  |

### imageMimeType

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function imageMimeType(format: ImageFileFormat): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `format` | `ImageFileFormat` |  |

### imagesToPdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function imagesToPdf(images: readonly (Uint8Array | ImagePageInput)[], options: ImagesToPdfOptions = {}): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `images` | `readonly (Uint8Array \| ImagePageInput)[]` |  |
| `options?` | `ImagesToPdfOptions` |  |

### importPkcs12PrivateKey

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function importPkcs12PrivateKey(contents: Pkcs12Contents, hash: 'SHA-256' | 'SHA-384' | 'SHA-512' = 'SHA-256'): Promise<CryptoKey>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `contents` | `Pkcs12Contents` |  |
| `hash?` | `'SHA-256' \| 'SHA-384' \| 'SHA-512'` |  |

### imposePdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function imposePdf(data: Uint8Array | ArrayBuffer, options: ImposeOptions): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options` | `ImposeOptions` |  |

### isAnnotationOwner

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function isAnnotationOwner(annotation: Pick<PdfAnnotation, 'author' | 'customData'>, user: AnnotationUser | string): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'author' \| 'customData'>` |  |
| `user` | `AnnotationUser \| string` |  |

### isMediaType

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function isMediaType(type: AnnotationType): type is MediaAnnotationType
```

| Parameter | Type | Description |
| --- | --- | --- |
| `type` | `AnnotationType` |  |

### isReadOnlyType

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function isReadOnlyType(type: AnnotationType): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `type` | `AnnotationType` |  |

### isSafeLinkUri

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function isSafeLinkUri(uri: string | undefined | null): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `uri` | `string \| undefined \| null` |  |

### isTrustListExpired

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function isTrustListExpired(list: PdfTrustList, now: Date = new Date()): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `list` | `PdfTrustList` |  |
| `now?` | `Date` |  |

### isUniformRichText

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function isUniformRichText(paragraphs: readonly RichTextParagraph[]): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `paragraphs` | `readonly RichTextParagraph[]` |  |

### layoutRichText

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function layoutRichText(paragraphs: readonly RichTextParagraph[], maxWidth: number, defaults: RichTextDefaults = RICH_TEXT_DEFAULTS, registry?: FontRegistry): RichTextLine[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `paragraphs` | `readonly RichTextParagraph[]` |  |
| `maxWidth` | `number` |  |
| `defaults?` | `RichTextDefaults` |  |
| `registry?` | `FontRegistry` |  |

### leaveMessage

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function leaveMessage(actorId: string, sentAt: number = Date.now()): PresenceMessage
```

| Parameter | Type | Description |
| --- | --- | --- |
| `actorId` | `string` |  |
| `sentAt?` | `number` |  |

### linearizePdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function linearizePdf(data: Uint8Array | ArrayBuffer, options: LinearizeOptions = {}): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `LinearizeOptions` |  |

### linkUriScheme

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function linkUriScheme(uri: string): string | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `uri` | `string` |  |

### loadPdfDocument

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function loadPdfDocument(data: Uint8Array | ArrayBuffer, options: OpenPdfOptions = {}): Promise<PdfDocument>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `OpenPdfOptions` |  |

### loadTrustList

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function loadTrustList(input: PdfTrustListInput | string): PdfTrustList
```

Reads a trust list given as an object or as JSON text. Certificates that cannot be parsed are counted, not kept.

| Parameter | Type | Description |
| --- | --- | --- |
| `input` | `PdfTrustListInput \| string` |  |

### mailToPdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function mailToPdf(message: MailMessage, options: MailToPdfOptions = {}): Promise<MailPdfResult>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `message` | `MailMessage` |  |
| `options?` | `MailToPdfOptions` |  |

### measureDetails

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function measureDetails(annotation: Measurable): MeasureDetails
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Measurable` |  |

### measureValue

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function measureValue(annotation: Measurable): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Measurable` |  |

### mergeLineRects

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function mergeLineRects(rects: readonly PdfRect[], gap = 3): PdfRect[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rects` | `readonly PdfRect[]` |  |
| `gap?` | `unknown` |  |

### mergePdfs

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function mergePdfs(inputs: readonly MergeFileInput[], options: MergePdfsOptions = {}): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `inputs` | `readonly MergeFileInput[]` |  |
| `options?` | `MergePdfsOptions` |  |

### mimeTypeForFileName

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function mimeTypeForFileName(fileName: string): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `fileName` | `string` |  |

### normalizeDegrees

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function normalizeDegrees(degrees: number): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `degrees` | `number` |  |

### normalizeRichText

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function normalizeRichText(paragraphs: readonly RichTextParagraph[]): RichTextParagraph[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `paragraphs` | `readonly RichTextParagraph[]` |  |

### openPdfDocument

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function openPdfDocument(data: Uint8Array | ArrayBuffer, options: OpenPdfOptions = {}): PdfDocument
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `OpenPdfOptions` |  |

### optimizePdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function optimizePdf(data: Uint8Array | ArrayBuffer, options: OptimizeOptions = {}): Promise<OptimizeResult>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `OptimizeOptions` |  |

### originalPageId

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function originalPageId(sourceIndex: number): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `sourceIndex` | `number` |  |

### pageSyncHost

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function pageSyncHost(document: SyncableDocument): PageSyncHost
```

| Parameter | Type | Description |
| --- | --- | --- |
| `document` | `SyncableDocument` |  |

### parseAnnotationsFdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function parseAnnotationsFdf(data: Uint8Array | ArrayBuffer, fallbackAuthor = 'Unknown'): AnnotationsFdfImport
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `fallbackAuthor?` | `unknown` |  |

### parseCalculateScript

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function parseCalculateScript(script: string | undefined): FieldCalculation | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `script` | `string \| undefined` |  |

### parseEml

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function parseEml(bytes: Uint8Array | ArrayBuffer): MailMessage
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array \| ArrayBuffer` |  |

### parseFormatScript

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function parseFormatScript(script: string | undefined): FieldFormat | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `script` | `string \| undefined` |  |

### parseMail

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function parseMail(bytes: Uint8Array, hint: MailFileHint = {}): MailMessage
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |
| `hint?` | `MailFileHint` |  |

### parseMsg

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function parseMsg(bytes: Uint8Array | ArrayBuffer): MailMessage
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array \| ArrayBuffer` |  |

### parsePageRanges

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function parsePageRanges(text: string, pageCount: number): [number, number][]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `pageCount` | `number` |  |

### parsePkcs12

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function parsePkcs12(data: Uint8Array | ArrayBuffer, password = ''): Promise<Pkcs12Contents>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `password?` | `unknown` |  |

### parseRichText

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function parseRichText(xhtml: string, defaults: Partial<RichTextDefaults> = {}): RichTextParagraph[] | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `xhtml` | `string` |  |
| `defaults?` | `Partial<RichTextDefaults>` |  |

### parseValidateScript

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function parseValidateScript(script: string | undefined): FieldRange | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `script` | `string \| undefined` |  |

### parseXfdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function parseXfdf(xml: string): XfdfImport
```

| Parameter | Type | Description |
| --- | --- | --- |
| `xml` | `string` |  |

### pemBlocks

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function pemBlocks(pem: string, label: string): Uint8Array[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `pem` | `string` |  |
| `label` | `string` |  |

### pemToDer

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function pemToDer(pem: string, label?: string): Uint8Array
```

| Parameter | Type | Description |
| --- | --- | --- |
| `pem` | `string` |  |
| `label?` | `string` |  |

### permissionsFromFlags

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function permissionsFromFlags(flags: number): PdfPermissions
```

| Parameter | Type | Description |
| --- | --- | --- |
| `flags` | `number` |  |

### permissionsToFlags

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function permissionsToFlags(permissions: Partial<PdfPermissions> = {}): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `permissions?` | `Partial<PdfPermissions>` |  |

### plainToRichText

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function plainToRichText(text: string, style: Omit<RichTextRun, 'text'> = {}): RichTextParagraph[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `style?` | `Omit<RichTextRun, 'text'>` |  |

### polygonArea

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function polygonArea(points: readonly PdfPoint[]): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `points` | `readonly PdfPoint[]` |  |

### polylineLength

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function polylineLength(points: readonly PdfPoint[], isClosed = false): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `points` | `readonly PdfPoint[]` |  |
| `isClosed?` | `unknown` |  |

### positionBetween

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function positionBetween(before: string | undefined, after: string | undefined, actor = ''): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `before` | `string \| undefined` |  |
| `after` | `string \| undefined` |  |
| `actor?` | `unknown` |  |

### prepareImage

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function prepareImage(bytes: Uint8Array, options: PrepareImageOptions = {}): Promise<AnnotationImage>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |
| `options?` | `PrepareImageOptions` |  |

### presenceMessage

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function presenceMessage(state: PresenceState, sentAt: number = Date.now()): PresenceMessage
```

| Parameter | Type | Description |
| --- | --- | --- |
| `state` | `PresenceState` |  |
| `sentAt?` | `number` |  |

### presetFromAnnotation

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function presetFromAnnotation(annotation: PdfAnnotation, identity: { id: string; name: string }, options: { keepText?: boolean; keepSize?: boolean } = {}): AnnotationPreset
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `PdfAnnotation` |  |
| `identity` | `{ id: string; name: string }` |  |
| `options?` | `{ keepText?: boolean; keepSize?: boolean }` |  |

### presetStyle

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function presetStyle(preset: AnnotationPreset): AnnotationPresetStyle
```

| Parameter | Type | Description |
| --- | --- | --- |
| `preset` | `AnnotationPreset` |  |

### quadPointsFromQuads

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function quadPointsFromQuads(quads: readonly PdfQuad[]): number[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `quads` | `readonly PdfQuad[]` |  |

### quadPointsFromRects

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function quadPointsFromRects(rects: readonly PdfRect[]): number[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rects` | `readonly PdfRect[]` |  |

### quadsFromQuadPoints

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function quadsFromQuadPoints(quadPoints: readonly number[]): [PdfPoint, PdfPoint, PdfPoint, PdfPoint][]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `quadPoints` | `readonly number[]` |  |

### readImageInfo

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function readImageInfo(bytes: Uint8Array): AnnotationImage
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |

### rectsFromQuadPoints

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function rectsFromQuadPoints(quadPoints: readonly number[]): PdfRect[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `quadPoints` | `readonly number[]` |  |

### resizeRotated

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function resizeRotated(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>, handle: 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw', pointer: PdfPoint, minSize = 4): PdfRect
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'rect' \| 'rotation'>` |  |
| `handle` | `'n' \| 's' \| 'e' \| 'w' \| 'ne' \| 'nw' \| 'se' \| 'sw'` |  |
| `pointer` | `PdfPoint` |  |
| `minSize?` | `unknown` |  |

### richTextDefaultStyle

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function richTextDefaultStyle(defaults: RichTextDefaults = RICH_TEXT_DEFAULTS): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `defaults?` | `RichTextDefaults` |  |

### richTextToPlain

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function richTextToPlain(paragraphs: readonly RichTextParagraph[]): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `paragraphs` | `readonly RichTextParagraph[]` |  |

### richTextToXhtml

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function richTextToXhtml(paragraphs: readonly RichTextParagraph[], defaults: RichTextDefaults = RICH_TEXT_DEFAULTS): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `paragraphs` | `readonly RichTextParagraph[]` |  |
| `defaults?` | `RichTextDefaults` |  |

### rotateAnnotation

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function rotateAnnotation(annotation: PdfAnnotation, degrees: number): AnnotationPatch
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `PdfAnnotation` |  |
| `degrees` | `number` |  |

### rotatedBounds

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function rotatedBounds(rect: PdfRect, degrees: number): PdfRect
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rect` | `PdfRect` |  |
| `degrees` | `number` |  |

### rotatedCorners

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function rotatedCorners(rect: PdfRect, degrees: number): [PdfPoint, PdfPoint, PdfPoint, PdfPoint]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rect` | `PdfRect` |  |
| `degrees` | `number` |  |

### rotationFromPointer

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function rotationFromPointer(annotation: Pick<PdfAnnotation, 'rect'>, pointer: PdfPoint, snap = 0): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'rect'>` |  |
| `pointer` | `PdfPoint` |  |
| `snap?` | `unknown` |  |

### rotationHandlePoint

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function rotationHandlePoint(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>, offset = 20): PdfPoint
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'rect' \| 'rotation'>` |  |
| `offset?` | `unknown` |  |

### rtfToHtml

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function rtfToHtml(rtf: Uint8Array | string): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rtf` | `Uint8Array \| string` |  |

### rtfToText

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function rtfToText(rtf: Uint8Array | string): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rtf` | `Uint8Array \| string` |  |

### sanitizePdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function sanitizePdf(data: Uint8Array | ArrayBuffer, options: SanitizeOptions = {}): Promise<SanitizeResult>
```

Removes hidden information and rewrites the whole file, so nothing that was removed stays in it.
Content of hidden layers is taken out of page content, form XObjects and annotation appearances.

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `SanitizeOptions` |  |

### selectPages

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function selectPages(pageCount: number, selector: PageSelector): number[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `pageCount` | `number` |  |
| `selector` | `PageSelector` |  |

### setAnnotationRotation

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function setAnnotationRotation(annotation: PdfAnnotation, degrees: number): AnnotationPatch
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `PdfAnnotation` |  |
| `degrees` | `number` |  |

### setDefaultPdfLimits

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function setDefaultPdfLimits(limits?: Partial<PdfLimits>): PdfLimits
```

| Parameter | Type | Description |
| --- | --- | --- |
| `limits?` | `Partial<PdfLimits>` |  |

### signPdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function signPdf(data: Uint8Array | ArrayBuffer, input: SignPdfOptions): Promise<PdfBytes>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `input` | `SignPdfOptions` |  |

### simplifyPath

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function simplifyPath(points: readonly PdfPoint[], tolerance = 0.6): PdfPoint[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `points` | `readonly PdfPoint[]` |  |
| `tolerance?` | `unknown` |  |

### smoothStroke

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function smoothStroke(points: readonly PdfPoint[]): PdfPoint[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `points` | `readonly PdfPoint[]` |  |

### splitPdf

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function splitPdf(data: Uint8Array | ArrayBuffer, options: SplitOptions, naming: SplitNaming = {}): Promise<SplitPart[]>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options` | `SplitOptions` |  |
| `naming?` | `SplitNaming` |  |

### tablesToXlsx

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function tablesToXlsx(tables: readonly (readonly string[][])[]): PdfBytes
```

Writes one worksheet per table. A cell that is a plain number becomes a number; everything else stays text.

| Parameter | Type | Description |
| --- | --- | --- |
| `tables` | `readonly (readonly string[][])[]` |  |

### toPdfBytes

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function toPdfBytes(bytes: Uint8Array): PdfBytes
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |

### toRotatedPoint

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function toRotatedPoint(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>, p: PdfPoint): PdfPoint
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'rect' \| 'rotation'>` |  |
| `p` | `PdfPoint` |  |

### toSyncJson

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function toSyncJson(value: unknown): SyncJson
```

| Parameter | Type | Description |
| --- | --- | --- |
| `value` | `unknown` |  |

### toUnrotatedPoint

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function toUnrotatedPoint(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>, p: PdfPoint): PdfPoint
```

| Parameter | Type | Description |
| --- | --- | --- |
| `annotation` | `Pick<PdfAnnotation, 'rect' \| 'rotation'>` |  |
| `p` | `PdfPoint` |  |

### unrotatedRectFromBounds

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function unrotatedRectFromBounds(bounds: PdfRect, degrees: number, aspect?: number): PdfRect | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `bounds` | `PdfRect` |  |
| `degrees` | `number` |  |
| `aspect?` | `number` |  |

### uprightPlacement

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function uprightPlacement(rect: PdfRect, pageRotation: number): { rect: PdfRect; rotation: number | undefined }
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rect` | `PdfRect` |  |
| `pageRotation` | `number` |  |

### uprightRotation

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function uprightRotation(pageRotation: number): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `pageRotation` | `number` |  |

### validateFieldValue

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function validateFieldValue(field: ValidatedField, value: FormValue, resolve?: FieldValueResolver): string | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `field` | `ValidatedField` |  |
| `value` | `FormValue` |  |
| `resolve?` | `FieldValueResolver` |  |

### validatePdfA

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function validatePdfA(input: Uint8Array | ArrayBuffer | PdfFile): PdfAValidation
```

| Parameter | Type | Description |
| --- | --- | --- |
| `input` | `Uint8Array \| ArrayBuffer \| PdfFile` |  |

### verifyPdfSignatures

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function verifyPdfSignatures(data: Uint8Array | ArrayBuffer, options: VerifySignaturesOptions = {}): Promise<PdfSignatureVerification[]>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `VerifySignaturesOptions` |  |

### viewportTransform

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function viewportTransform(box: PdfRect, rotation: number, scale: number): Matrix
```

| Parameter | Type | Description |
| --- | --- | --- |
| `box` | `PdfRect` |  |
| `rotation` | `number` |  |
| `scale` | `number` |  |

### zipSplitParts

Kind: function. Import from `@birchui/pdf/engine`.

```ts
function zipSplitParts(parts: readonly SplitPart[]): PdfBytes
```

| Parameter | Type | Description |
| --- | --- | --- |
| `parts` | `readonly SplitPart[]` |  |

### FontFormatError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class FontFormatError extends Error
new FontFormatError(message: string)
```

### ImageDecoderRequiredError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class ImageDecoderRequiredError extends ImageFormatError
new ImageDecoderRequiredError(readonly mimeType: string)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly mimeType` | `string` |  |

### ImageFormatError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class ImageFormatError extends Error
new ImageFormatError(message: string)
```

### InflateError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class InflateError extends Error
new InflateError(message: string)
```

### JpegError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class JpegError extends Error
new JpegError(message: string)
```

### MailFormatError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class MailFormatError extends Error
new MailFormatError(message: string)
```

### PdfCryptoUnavailableError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class PdfCryptoUnavailableError extends Error
new PdfCryptoUnavailableError()
```

### PdfInputError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class PdfInputError extends TypeError
new PdfInputError(readonly path: string, message: string)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly path` | `string` |  |

### PdfLimitError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class PdfLimitError extends Error
new PdfLimitError(readonly limit: PdfLimitName, readonly allowed: number, message: string)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly limit` | `PdfLimitName` |  |
| `readonly allowed` | `number` |  |

### PdfMissingGlyphError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class PdfMissingGlyphError extends Error
new PdfMissingGlyphError(report: MissingGlyphReport)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly characters` | `string` |  |
| `readonly scripts` | `TextScript[]` |  |

### PdfPasswordError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class PdfPasswordError extends Error
new PdfPasswordError(readonly reason: 'password-required' | 'password-incorrect' | 'unsupported')
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly reason` | `'password-required' \| 'password-incorrect' \| 'unsupported'` |  |

### PdfPermissionError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class PdfPermissionError extends Error
new PdfPermissionError(readonly permission: PdfPermissionName)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly permission` | `PdfPermissionName` |  |

### PdfSyntaxError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class PdfSyntaxError extends Error
new PdfSyntaxError(message: string, readonly offset: number)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly offset` | `number` |  |

### PdfWriteError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class PdfWriteError extends Error
new PdfWriteError(message: string)
```

### Pkcs12Error

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class Pkcs12Error extends Error
new Pkcs12Error(readonly reason: Pkcs12ErrorReason, message: string)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly reason` | `Pkcs12ErrorReason` |  |

### UnsupportedFilterError

Kind: class. Import from `@birchui/pdf/engine`.

```ts
class UnsupportedFilterError extends Error
new UnsupportedFilterError(readonly filter: string)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly filter` | `string` |  |

### ATTACHMENT_RELATIONSHIPS

Kind: const. Import from `@birchui/pdf/engine`.

```ts
const ATTACHMENT_RELATIONSHIPS: readonly AttachmentRelationship[]
```

### DEFAULT_STYLES

Kind: const. Import from `@birchui/pdf/engine`.

```ts
const DEFAULT_STYLES: Record<AnnotationType, AnnotationDefaults>
```

### FILE_ATTACHMENT_ICONS

Kind: const. Import from `@birchui/pdf/engine`.

```ts
const FILE_ATTACHMENT_ICONS: readonly FileAttachmentIcon[]
```

### FORM_MESSAGES

Kind: const. Import from `@birchui/pdf/engine`.

```ts
const FORM_MESSAGES: Record<FormMessageKey, string>
```

### PLACEHOLDER_PAGE_ID

Kind: const. Import from `@birchui/pdf/engine`.

```ts
const PLACEHOLDER_PAGE_ID: "placeholder" = 'placeholder'
```

### RECOGNISED_FUNCTIONS

Kind: const. Import from `@birchui/pdf/engine`.

```ts
const RECOGNISED_FUNCTIONS: readonly string[]
```

### REDACTION_PATTERN_NAMES

Kind: const. Import from `@birchui/pdf/engine`.

```ts
const REDACTION_PATTERN_NAMES: readonly ("date" | "email" | "phone" | "ssn" | "creditCard" | "iban")[]
```

### REDACTION_PATTERNS

Kind: const. Import from `@birchui/pdf/engine`.

```ts
const REDACTION_PATTERNS: { readonly email: RegExp; readonly phone: RegExp; readonly ssn: RegExp; readonly creditCard: RegExp; readonly iban: RegExp; readonly date: RegExp; }
```

### RICH_TEXT_DEFAULTS

Kind: const. Import from `@birchui/pdf/engine`.

```ts
const RICH_TEXT_DEFAULTS: RichTextDefaults
```

### STAMP_COLORS

Kind: const. Import from `@birchui/pdf/engine`.

```ts
const STAMP_COLORS: Record<string, string>
```

### STAMP_LABELS

Kind: const. Import from `@birchui/pdf/engine`.

```ts
const STAMP_LABELS: Record<string, string>
```

### AccessibilityIssue

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AccessibilityIssue
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `AccessibilityCode` |  |
| `severity` | `'error' \| 'warning'` |  |
| `message` | `string` |  |
| `pageIndex?` | `number` |  |
| `figureId?` | `string` | For `figure-without-alt`: the id to pass to `setAlternateText`. |

### AccessibilityReport

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AccessibilityReport
```

| Property | Type | Description |
| --- | --- | --- |
| `isTagged` | `boolean` |  |
| `title?` | `string` |  |
| `language?` | `string` |  |
| `figures` | `PdfFigure[]` |  |
| `issues` | `AccessibilityIssue[]` |  |
| `passes` | `boolean` | True when no issue of severity `error` was found. It is a pre-flight check, not a statement of conformance. |

### AddDocumentTimestampOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AddDocumentTimestampOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `timestamp` | `TimestampCallback` |  |
| `fieldName?` | `string` |  |
| `placeholderSize?` | `number` |  |
| `password?` | `string` |  |

### AddImageOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AddImageOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `rect` | `PdfRect` |  |
| `opacity?` | `number` |  |
| `rotation?` | `number` |  |

### AddMarkOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AddMarkOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `kind` | `PageMarkKind` |  |
| `x` | `number` | Centre of the mark. |
| `y` | `number` |  |
| `size?` | `number` |  |
| `color?` | `string` |  |

### AddTextOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AddTextOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `x` | `number` |  |
| `y` | `number` |  |
| `fontSize?` | `number` |  |
| `color?` | `string` |  |
| `opacity?` | `number` |  |
| `font?` | `StandardFontName` |  |
| `fontName?` | `string` | Name of a supplied font to use instead of a standard one. |
| `rotation?` | `number` |  |
| `lineHeight?` | `number` |  |
| `fonts?` | `FontRegistry` |  |

### AddTextResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AddTextResult extends TextEditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `rect?` | `PdfRect` |  |
| `ok` | `boolean` | Inherited from TextEditResult. |
| `reason?` | `ContentEditFailure \| undefined` | Inherited from TextEditResult. |
| `message?` | `string \| undefined` | Inherited from TextEditResult. |
| `usedFont?` | `"original" \| "embedded" \| "standard" \| undefined` | Inherited from TextEditResult. |
| `fontNames?` | `string[] \| undefined` | Inherited from TextEditResult. |
| `missing?` | `string \| undefined` | Inherited from TextEditResult. |
| `widthChange?` | `number \| undefined` | Inherited from TextEditResult. |

### AddValidationDataOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AddValidationDataOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `certificates?` | `(Uint8Array \| string)[]` |  |
| `ocsps?` | `Uint8Array[]` |  |
| `crls?` | `Uint8Array[]` |  |
| `fetch?` | `ValidationDataCallback` |  |
| `password?` | `string` |  |
| `now?` | `Date` |  |

### AnnotationAttachment

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationAttachment
```

| Property | Type | Description |
| --- | --- | --- |
| `fileName` | `string` |  |
| `mimeType?` | `string` |  |
| `description?` | `string` |  |
| `size?` | `number` |  |
| `data?` | `Uint8Array` |  |
| `relationship?` | `AttachmentRelationship` |  |

### AnnotationAttachmentFile

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationAttachmentFile
```

| Property | Type | Description |
| --- | --- | --- |
| `fileName` | `string` |  |
| `mimeType` | `string` |  |
| `description?` | `string` |  |
| `data` | `Uint8Array` |  |
| `relationship?` | `AttachmentRelationship` |  |

### AnnotationChangeSet

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationChangeSet
```

| Property | Type | Description |
| --- | --- | --- |
| `added` | `PdfAnnotation[]` |  |
| `changed` | `{ before: PdfAnnotation; after: PdfAnnotation }[]` |  |
| `removed` | `PdfAnnotation[]` |  |
| `source` | `ChangeSource` |  |

### AnnotationDefaults

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationDefaults
```

| Property | Type | Description |
| --- | --- | --- |
| `color` | `string` |  |
| `opacity` | `number` |  |
| `strokeWidth` | `number` |  |
| `fillColor?` | `string` |  |
| `fontSize?` | `number` |  |

### AnnotationImage

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationImage
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `mimeType` | `'image/png' \| 'image/jpeg'` |  |
| `width` | `number` |  |
| `height` | `number` |  |

### AnnotationPermissionOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationPermissionOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `isDocumentReadOnly?` | `boolean` |  |
| `canAnnotate?` | `boolean` |  |

### AnnotationPermissions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationPermissions
```

| Property | Type | Description |
| --- | --- | --- |
| `canMove` | `boolean` |  |
| `canResize` | `boolean` |  |
| `canEditContents` | `boolean` |  |
| `canEditStyle` | `boolean` |  |
| `canDelete` | `boolean` |  |
| `canReply` | `boolean` |  |
| `canChangeStatus` | `boolean` |  |
| `isOwner` | `boolean` |  |

### AnnotationPreset

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationPreset extends AnnotationPresetStyle
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `name` | `string` |  |
| `type` | `AnnotationType` |  |
| `color?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `fillColor?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `opacity?` | `number \| undefined` | Inherited from AnnotationPresetStyle. |
| `strokeWidth?` | `number \| undefined` | Inherited from AnnotationPresetStyle. |
| `borderStyle?` | `BorderStyle \| undefined` | Inherited from AnnotationPresetStyle. |
| `lineEndings?` | `[LineEnding, LineEnding] \| undefined` | Inherited from AnnotationPresetStyle. |
| `fontSize?` | `number \| undefined` | Inherited from AnnotationPresetStyle. |
| `fontColor?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `fontFamily?` | `AnnotationFont \| undefined` | Inherited from AnnotationPresetStyle. |
| `textAlign?` | `RichTextAlign \| undefined` | Inherited from AnnotationPresetStyle. |
| `icon?` | `NoteIcon \| undefined` | Inherited from AnnotationPresetStyle. |
| `iconName?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `stamp?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `stampLabel?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `label?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `measureScale?` | `MeasureScale \| undefined` | Inherited from AnnotationPresetStyle. |
| `rotation?` | `number \| undefined` | Inherited from AnnotationPresetStyle. |
| `overlayText?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `text?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `contents?` | `string \| undefined` | Inherited from AnnotationPresetStyle. |
| `width?` | `number \| undefined` | Inherited from AnnotationPresetStyle. |
| `height?` | `number \| undefined` | Inherited from AnnotationPresetStyle. |

### AnnotationPresetsJson

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationPresetsJson
```

| Property | Type | Description |
| --- | --- | --- |
| `format` | `'birchui-pdf-annotation-presets'` |  |
| `version` | `1` |  |
| `presets` | `AnnotationPreset[]` |  |

### AnnotationPresetStyle

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationPresetStyle
```

| Property | Type | Description |
| --- | --- | --- |
| `color?` | `string` |  |
| `fillColor?` | `string` |  |
| `opacity?` | `number` |  |
| `strokeWidth?` | `number` |  |
| `borderStyle?` | `BorderStyle` |  |
| `lineEndings?` | `[LineEnding, LineEnding]` |  |
| `fontSize?` | `number` |  |
| `fontColor?` | `string` |  |
| `fontFamily?` | `AnnotationFont` |  |
| `textAlign?` | `RichTextAlign` |  |
| `icon?` | `NoteIcon` |  |
| `iconName?` | `string` |  |
| `stamp?` | `string` |  |
| `stampLabel?` | `string` |  |
| `label?` | `string` |  |
| `measureScale?` | `MeasureScale` |  |
| `rotation?` | `number` |  |
| `overlayText?` | `string` |  |
| `text?` | `string` |  |
| `contents?` | `string` |  |
| `width?` | `number` |  |
| `height?` | `number` |  |

### AnnotationReply

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationReply
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `author` | `string` |  |
| `contents` | `string` |  |
| `createdAt` | `string` |  |
| `modifiedAt` | `string` |  |

### AnnotationsFdfImport

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationsFdfImport
```

| Property | Type | Description |
| --- | --- | --- |
| `annotations` | `AnnotationInput[]` |  |
| `fileName?` | `string` |  |

### AnnotationsFdfOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationsFdfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `fileName?` | `string` |  |
| `includeAppearances?` | `boolean` |  |
| `fonts?` | `FontRegistry` |  |
| `pageRotations?` | `readonly number[]` |  |

### AnnotationsJson

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationsJson
```

| Property | Type | Description |
| --- | --- | --- |
| `format` | `'birchui-pdf-annotations'` |  |
| `version` | `1` |  |
| `annotations` | `(Omit<PdfAnnotation, 'image'> & { image?: { data: string; mimeType: string; width: number; height: number }; })[]` |  |

### AnnotationSync

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationSync
```

| Property | Type | Description |
| --- | --- | --- |
| `receive` | `(operations: SyncOperation \| SyncOperation[]) => void` |  |
| `merge` | `(snapshot: SyncSnapshot) => void` |  |
| `snapshot` | `() => SyncSnapshot` |  |
| `refresh` | `() => void` |  |
| `destroy` | `() => void` |  |

### AnnotationSyncHost

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationSyncHost
```

| Property | Type | Description |
| --- | --- | --- |
| `getAnnotations` | `() => PdfAnnotation[]` |  |
| `applyRemoteChanges` | `(changes: RemoteAnnotationChanges) => void` |  |
| `subscribeAnnotationChanges` | `(listener: (changes: SyncAnnotationChanges) => void) => () => void` |  |

### AnnotationSyncOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationSyncOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `actorId` | `string` |  |
| `send` | `(operations: SyncOperation[]) => void` |  |
| `author?` | `string` |  |
| `onConflict?` | `(conflict: SyncConflict) => void` |  |
| `snapshot?` | `SyncSnapshot` |  |
| `pageIds?` | `() => readonly (string \| undefined)[]` |  |

### AnnotationUser

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface AnnotationUser
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `id?` | `string` |  |
| `isAdmin?` | `boolean` |  |

### ApplyRedactionsAsyncOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ApplyRedactionsAsyncOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `decodeImage?` | `AsyncRedactionImageDecoder` |  |

### ApplyRedactionsOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ApplyRedactionsOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `decodeImage?` | `RedactionImageDecoder` |  |

### ArcGeometry

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ArcGeometry
```

| Property | Type | Description |
| --- | --- | --- |
| `center` | `PdfPoint` |  |
| `radius` | `number` |  |
| `startAngle` | `number` |  |
| `sweep` | `number` |  |
| `length` | `number` |  |

### ArchiveFinding

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ArchiveFinding
```

| Property | Type | Description |
| --- | --- | --- |
| `rule` | `ArchiveRule` |  |
| `severity` | `ArchiveSeverity` |  |
| `message` | `string` |  |
| `pageIndex?` | `number` |  |

### ArchiveFontUsage

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ArchiveFontUsage
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `isEmbedded` | `boolean` |  |
| `pages` | `number[]` |  |

### ArchiveReport

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ArchiveReport
```

| Property | Type | Description |
| --- | --- | --- |
| `isLikelyConformant` | `boolean` |  |
| `declared?` | `{ part: number; conformance?: string }` |  |
| `findings` | `ArchiveFinding[]` |  |
| `fonts` | `ArchiveFontUsage[]` |  |

### BackgroundOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface BackgroundOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `color?` | `string` |  |
| `image?` | `Uint8Array` |  |
| `opacity?` | `number` |  |

### BarcodeFieldInfo

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface BarcodeFieldInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `symbology` | `'pdf417' \| 'qrCode' \| 'dataMatrix' \| 'unknown'` |  |

### BatesOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface BatesOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `prefix?` | `string` |  |
| `suffix?` | `string` |  |
| `start?` | `number` |  |
| `digits?` | `number` |  |
| `position?` | `StampPosition` |  |
| `fontSize?` | `number` |  |
| `color?` | `string` |  |
| `font?` | `StandardFont` |  |
| `margin?` | `number` |  |
| `fonts?` | `FontRegistry` |  |

### BlankScanOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface BlankScanOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `whiteLevel?` | `number` | Lightness from 0 to 255 at or above which a pixel counts as paper. |
| `tolerance?` | `number` | Share of pixels that may be darker than paper, for dust and scanner noise. |
| `border?` | `number` | Share of each edge that is left out, where scanners leave shadows. |

### ChainProblem

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ChainProblem
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `ChainProblemCode` |  |
| `index` | `number` | Position in the chain of the certificate the problem is about; 0 is the signer. |
| `subject` | `string` |  |
| `message` | `string` |  |

### ComparableDocument

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ComparableDocument
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly pageCount` | `number` |  |
| `getPageText` | `(pageIndex: number) => ComparablePageText` |  |

### ComparablePageText

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ComparablePageText
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `boxes` | `(PdfRect \| undefined)[]` |  |

### ComparePdfAsyncOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ComparePdfAsyncOptions extends ComparePdfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `password?` | `string` |  |
| `otherPassword?` | `string` |  |
| `ignoreCase?` | `boolean \| undefined` | Inherited from ComparePdfOptions. |
| `ignoreWhitespace?` | `boolean \| undefined` | Inherited from ComparePdfOptions. |
| `annotations?` | `boolean \| undefined` | Inherited from ComparePdfOptions. |
| `minMoveWords?` | `number \| undefined` | Inherited from ComparePdfOptions. |
| `pageSimilarityThreshold?` | `number \| undefined` | Inherited from ComparePdfOptions. |
| `colors?` | `{ inserted?: string; deleted?: string; moved?: string; } \| undefined` | Inherited from ComparePdfOptions. |
| `author?` | `string \| undefined` | Inherited from ComparePdfOptions. |

### ComparePdfOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ComparePdfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `ignoreCase?` | `boolean` |  |
| `ignoreWhitespace?` | `boolean` |  |
| `annotations?` | `boolean` |  |
| `minMoveWords?` | `number` |  |
| `pageSimilarityThreshold?` | `number` |  |
| `colors?` | `{ inserted?: string; deleted?: string; moved?: string }` |  |
| `author?` | `string` |  |

### CompareReportLabels

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface CompareReportLabels
```

| Property | Type | Description |
| --- | --- | --- |
| `title` | `string` |  |
| `first` | `string` |  |
| `second` | `string` |  |
| `page` | `string` |  |
| `change` | `string` |  |
| `text` | `string` |  |
| `inserted` | `string` |  |
| `deleted` | `string` |  |
| `moved` | `string` |  |
| `none` | `string` |  |
| `pages` | `string` |  |
| `words` | `string` |  |

### CompareReportOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface CompareReportOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `format?` | `CompareReportFormat` |  |
| `fileNameA?` | `string` |  |
| `fileNameB?` | `string` |  |
| `date?` | `Date \| string` |  |
| `labels?` | `Partial<CompareReportLabels>` |  |

### CropPagesOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface CropPagesOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `removeContent?` | `boolean` |  |

### DecodedImage

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface DecodedImage
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `data` | `Uint8Array \| Uint8ClampedArray` |  |

### DecodedRedactionImage

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface DecodedRedactionImage
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `rgba` | `Uint8Array \| Uint8ClampedArray` |  |

### DecompressRtfOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface DecompressRtfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `verifyCrc?` | `boolean` |  |

### DetectedField

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface DetectedField
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'text' \| 'checkbox'` |  |
| `pageIndex` | `number` |  |
| `rect` | `PdfRect` |  |
| `name` | `string` |  |
| `label?` | `string` | The text on the page the name was taken from. |
| `isMultiline?` | `boolean` |  |
| `source` | `'underline' \| 'box' \| 'square' \| 'underscores'` |  |

### DetectFieldsOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface DetectFieldsOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `takenNames?` | `Iterable<string>` | Names that are taken already; detected names are made different from these and from each other. |
| `existing?` | `readonly PdfRect[]` | Rectangles of fields the page has already; a candidate that overlaps one is left out. |

### DetectionShape

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface DetectionShape
```

| Property | Type | Description |
| --- | --- | --- |
| `rect` | `PdfRect` |  |
| `operator` | `string` | The painting operator of the path: `S`, `f`, `B` and their variants. |

### DownsampleReport

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface DownsampleReport
```

| Property | Type | Description |
| --- | --- | --- |
| `imagesDownsampled` | `number` |  |
| `imagesKept` | `number` |  |

### DuplicateFieldOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface DuplicateFieldOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `offset?` | `[number, number]` |  |
| `pageIndex?` | `number` |  |
| `newName?` | `string` |  |

### EditableTextMatch

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface EditableTextMatch
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` | The block of text in reading order, then the position of the match in it. |
| `text` | `string` |  |
| `before` | `string` |  |
| `after` | `string` |  |
| `rect` | `PdfRect` |  |
| `scope` | `'paragraph' \| 'run'` | Whether replacing reflows a paragraph or rewrites one text run. |
| `start` | `number` |  |
| `end` | `number` |  |

### EmbeddedText

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface EmbeddedText
```

| Property | Type | Description |
| --- | --- | --- |
| `ref` | `PdfRef` |  |
| `fontName` | `string` |  |
| `encoded` | `Uint8Array` |  |
| `width` | `number` |  |
| `ascent` | `number` |  |
| `descent` | `number` |  |
| `isRtl` | `boolean` |  |
| `placements?` | `(GlyphPlacement \| undefined)[]` |  |

### EncryptOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface EncryptOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `userPassword?` | `string` |  |
| `ownerPassword?` | `string` |  |
| `permissions?` | `Partial<PdfPermissions>` |  |
| `algorithm?` | `EncryptionAlgorithm` |  |
| `encryptMetadata?` | `boolean` |  |

### ExtractedImage

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ExtractedImage
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `index` | `number` |  |
| `name` | `string` |  |
| `isInline` | `boolean` |  |
| `ref?` | `PdfRef` |  |
| `rect` | `PdfRect` |  |
| `quad` | `[PdfPoint, PdfPoint, PdfPoint, PdfPoint]` |  |
| `matrix` | `Matrix` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `bitsPerComponent` | `number` |  |
| `colorSpace?` | `string` |  |
| `filters` | `string[]` |  |
| `format` | `PageImageFormat` |  |
| `isMask` | `boolean` |  |
| `hasMask` | `boolean` |  |
| `status` | `ExtractedImageStatus` |  |
| `data?` | `ExtractedImagePixels` |  |
| `encoded?` | `ExtractedImageEncoding` |  |
| `isRendered?` | `boolean` |  |
| `message?` | `string` |  |

### ExtractedImageEncoding

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ExtractedImageEncoding
```

| Property | Type | Description |
| --- | --- | --- |
| `mimeType` | `EncodedImageMimeType` |  |
| `filter` | `string` |  |
| `bytes` | `Uint8Array` |  |
| `decodeParms?` | `Record<string, number \| boolean>` |  |
| `jbig2Globals?` | `Uint8Array` |  |

### ExtractedImagePixels

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ExtractedImagePixels
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `rgba` | `Uint8Array` |  |

### FieldActionEntry

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FieldActionEntry
```

| Property | Type | Description |
| --- | --- | --- |
| `trigger` | `FieldActionTrigger` |  |
| `widgetIndex?` | `number` |  |
| `action` | `FieldAction` |  |

### FieldCalculation

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FieldCalculation
```

| Property | Type | Description |
| --- | --- | --- |
| `operation` | `'SUM' \| 'AVG' \| 'PRD' \| 'MIN' \| 'MAX' \| 'CUSTOM'` |  |
| `fields` | `string[]` |  |
| `expression?` | `string` |  |

### FieldIssue

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FieldIssue
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `FormIssueCode` |  |
| `key` | `FormMessageKey` |  |
| `params` | `FormMessageParams` |  |
| `message` | `string` |  |

### FieldRange

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FieldRange
```

| Property | Type | Description |
| --- | --- | --- |
| `min?` | `number` |  |
| `max?` | `number` |  |

### FieldScriptInfo

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FieldScriptInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `status` | `'supported' \| 'unsupported' \| 'none'` |  |
| `kind` | `'none' \| 'builtin' \| 'expression' \| 'custom'` |  |
| `source` | `string` |  |

### FieldScripts

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FieldScripts
```

| Property | Type | Description |
| --- | --- | --- |
| `format?` | `string` |  |
| `keystroke?` | `string` |  |
| `validate?` | `string` |  |
| `calculate?` | `string` |  |

### FindTextOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FindTextOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `matchCase?` | `boolean` |  |
| `wholeWord?` | `boolean` |  |

### FontRegistry

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FontRegistry
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly isEmpty` | `boolean` |  |
| `readonly fontNames` | `readonly string[]` |  |
| `add` | `(source: PdfFontSource) => boolean` |  |
| `hasGlyph` | `(code: number) => boolean` |  |
| `covers` | `(text: string) => boolean` |  |
| `needsEmbedding` | `(text: string) => boolean` |  |
| `embed` | `(editor: PdfEditor \| FontSink, text: string, preferredName?: string) => EmbeddedText[]` |  |
| `measure` | `(text: string, preferredName?: string) => number` |  |

### FormFieldInput

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormFieldInput
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `type` | `FormFieldType` |  |
| `pageIndex` | `number` |  |
| `rect` | `PdfRect` |  |
| `value?` | `FormValue` |  |
| `options?` | `(FormFieldOption \| string)[]` |  |
| `tooltip?` | `string` |  |
| `isReadOnly?` | `boolean` |  |
| `isRequired?` | `boolean` |  |
| `isMultiline?` | `boolean` |  |
| `isPassword?` | `boolean` |  |
| `isComb?` | `boolean` |  |
| `maxLength?` | `number` |  |
| `isMultiSelect?` | `boolean` |  |
| `isEditable?` | `boolean` |  |
| `alignment?` | `'left' \| 'center' \| 'right'` |  |
| `fontSize?` | `number` |  |
| `borderColor?` | `string \| null` |  |
| `backgroundColor?` | `string \| null` |  |
| `format?` | `FieldFormat` |  |
| `calculation?` | `FieldCalculation` |  |
| `range?` | `FieldRange` |  |
| `radioValue?` | `string` |  |
| `isNoExport?` | `boolean` |  |
| `richText?` | `RichTextParagraph[]` |  |

### FormFieldOption

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormFieldOption
```

| Property | Type | Description |
| --- | --- | --- |
| `value` | `string` |  |
| `label` | `string` |  |

### FormFieldWidget

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormFieldWidget
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `pageIndex` | `number` |  |
| `rect` | `PdfRect` |  |
| `onValue?` | `string` |  |
| `exportValue?` | `string` |  |
| `isHidden?` | `boolean` |  |
| `tabIndex?` | `number` |  |
| `rotation?` | `90 \| 180 \| 270` |  |

### FormImportRejection

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormImportRejection
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `code` | `FormIssueCode \| 'option' \| 'type'` |  |
| `key` | `FormMessageKey` |  |
| `params` | `FormMessageParams` |  |
| `message` | `string` |  |

### FormImportResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormImportResult
```

| Property | Type | Description |
| --- | --- | --- |
| `imported` | `number` |  |
| `changed` | `string[]` |  |
| `unknown` | `string[]` |  |
| `rejected` | `FormImportRejection[]` |  |

### FormIssue

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormIssue extends FieldIssue
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `pageIndex` | `number` |  |
| `rect` | `PdfRect` |  |
| `code` | `FormIssueCode` | Inherited from FieldIssue. |
| `key` | `FormMessageKey` | Inherited from FieldIssue. |
| `params` | `FormMessageParams` | Inherited from FieldIssue. |
| `message` | `string` | Inherited from FieldIssue. |

### FormJsonOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormJsonOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `flat?` | `boolean` |  |

### FormState

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormState
```

| Property | Type | Description |
| --- | --- | --- |
| `isDirty` | `boolean` |  |
| `dirtyFields` | `string[]` |  |
| `isValid` | `boolean` |  |
| `fieldCount` | `number` |  |
| `filledCount` | `number` |  |
| `requiredCount` | `number` |  |
| `requiredFilledCount` | `number` |  |

### FormSubmitPayload

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormSubmitPayload
```

| Property | Type | Description |
| --- | --- | --- |
| `url` | `string` |  |
| `method` | `'get' \| 'post'` |  |
| `format` | `SubmitFormat` |  |
| `body` | `PdfBytes \| string` |  |
| `contentType` | `string` |  |
| `fieldNames` | `string[]` |  |

### FormSync

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormSync
```

| Property | Type | Description |
| --- | --- | --- |
| `receive` | `(operations: FormSyncOperation \| FormSyncOperation[]) => void` |  |
| `merge` | `(snapshot: FormSyncSnapshot) => void` |  |
| `snapshot` | `() => FormSyncSnapshot` |  |
| `destroy` | `() => void` |  |

### FormSyncConflict

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormSyncConflict
```

| Property | Type | Description |
| --- | --- | --- |
| `field` | `string` |  |
| `operation` | `FormSyncOperation` |  |
| `winner` | `SyncClock` |  |

### FormSyncHost

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormSyncHost
```

| Property | Type | Description |
| --- | --- | --- |
| `getFormValues` | `() => Record<string, FormSyncValue>` |  |
| `setFieldValues` | `(values: Record<string, FormSyncValue>, source: 'remote') => unknown` |  |
| `subscribeFormChanges` | `(listener: (change?: { source?: string }) => void) => () => void` |  |
| `isCalculated?` | `(field: string) => boolean` |  |

### FormSyncOperation

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormSyncOperation
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `kind` | `'set'` |  |
| `field` | `string` |  |
| `value` | `FormSyncValue` |  |
| `author` | `string` |  |
| `clock` | `SyncClock` |  |

### FormSyncOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormSyncOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `actorId` | `string` |  |
| `send` | `(operations: FormSyncOperation[]) => void` |  |
| `author?` | `string` |  |
| `onConflict?` | `(conflict: FormSyncConflict) => void` |  |
| `snapshot?` | `FormSyncSnapshot` |  |

### FormSyncSnapshot

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface FormSyncSnapshot
```

| Property | Type | Description |
| --- | --- | --- |
| `version` | `1` |  |
| `counter` | `number` |  |
| `fields` | `{ [field: string]: { clock: SyncClock; value: FormSyncValue } }` |  |

### GeneralName

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface GeneralName
```

| Property | Type | Description |
| --- | --- | --- |
| `kind` | `'email' \| 'dns' \| 'directory' \| 'uri' \| 'other'` |  |
| `value` | `string` |  |

### HeaderFooterOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface HeaderFooterOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `header?` | `HeaderFooterSlots` |  |
| `footer?` | `HeaderFooterSlots` |  |
| `margin?` | `number \| PageMargins` |  |
| `fontSize?` | `number` |  |
| `color?` | `string` |  |
| `font?` | `StandardFont` |  |
| `startNumber?` | `number` |  |
| `totalPages?` | `number` |  |
| `range?` | `{ from?: number; to?: number }` |  |
| `date?` | `Date \| string` |  |
| `fileName?` | `string` |  |
| `fonts?` | `FontRegistry` |  |
| `layerKind?` | `'header' \| 'footer' \| 'pageNumbers'` | How the stamped text is marked in the page content; `header` and `footer` by default. |

### HeaderFooterSlots

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface HeaderFooterSlots
```

| Property | Type | Description |
| --- | --- | --- |
| `left?` | `string` |  |
| `center?` | `string` |  |
| `right?` | `string` |  |

### ImageEditResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ImageEditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `ok` | `boolean` |  |
| `reason?` | `ContentEditFailure` |  |
| `message?` | `string` |  |
| `name?` | `string` |  |
| `ref?` | `PdfRef` |  |
| `rect?` | `PdfRect` |  |
| `image?` | `PageImage` |  |

### ImagePageInput

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ImagePageInput
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `dpi?` | `number` |  |

### ImagesToPdfOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ImagesToPdfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `pageSize?` | `ImagePageSize` |  |
| `margin?` | `number` |  |
| `fit?` | `'contain' \| 'cover' \| 'none'` |  |
| `dpi?` | `number` |  |
| `metadata?` | `{ title?: string; author?: string; subject?: string; keywords?: string; creator?: string }` |  |
| `decodeImage?` | `ImageDecoder` |  |

### ImposeOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ImposeOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `layout` | `'n-up' \| 'booklet'` |  |
| `columns?` | `number` |  |
| `rows?` | `number` |  |
| `sheetSize?` | `{ width: number; height: number }` |  |
| `margin?` | `number` |  |
| `gutter?` | `number` |  |
| `rightToLeft?` | `boolean` |  |
| `password?` | `string` |  |

### InterleaveOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface InterleaveOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `reverseSecond?` | `boolean` |  |

### JpegDecodeOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface JpegDecodeOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `colorTransform?` | `boolean` |  |
| `maxPixels?` | `number` |  |

### JpegImage

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface JpegImage
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `components` | `1 \| 3 \| 4` |  |
| `data` | `Uint8Array` |  |
| `isProgressive` | `boolean` |  |
| `hasAdobeMarker` | `boolean` |  |
| `colorTransform` | `boolean` |  |
| `planes` | `JpegPlane[]` |  |

### KeystrokeResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface KeystrokeResult
```

| Property | Type | Description |
| --- | --- | --- |
| `isAccepted` | `boolean` |  |
| `value` | `string` |  |
| `selStart` | `number` |  |
| `selEnd` | `number` |  |
| `key?` | `FormMessageKey` |  |

### LinearizeOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface LinearizeOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `recompress?` | `boolean` |  |

### LinkDestination

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface LinkDestination
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `fit?` | `LinkFit` |  |
| `left?` | `number` |  |
| `top?` | `number` |  |
| `right?` | `number` |  |
| `bottom?` | `number` |  |
| `zoom?` | `number` |  |

### MailAddress

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MailAddress
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `address` | `string` |  |

### MailAttachment

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MailAttachment
```

| Property | Type | Description |
| --- | --- | --- |
| `fileName` | `string` |  |
| `mimeType` | `string` |  |
| `data` | `Uint8Array` |  |
| `contentId?` | `string` |  |
| `isInline` | `boolean` |  |
| `embeddedMessage?` | `MailMessage` |  |

### MailConversion

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MailConversion extends MailPdfResult
```

| Property | Type | Description |
| --- | --- | --- |
| `format` | `MailFormat` |  |
| `message` | `MailMessage` |  |
| `bytes` | `PdfBytes` | Inherited from MailPdfResult. |
| `pageCount` | `number` | Inherited from MailPdfResult. |
| `substitutedCharacters` | `number` | Inherited from MailPdfResult. |
| `attachmentNames` | `string[]` | Inherited from MailPdfResult. |
| `warnings` | `MailPdfWarning[]` | Inherited from MailPdfResult. |

### MailFileHint

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MailFileHint
```

| Property | Type | Description |
| --- | --- | --- |
| `fileName?` | `string` |  |
| `mimeType?` | `string` |  |

### MailHeader

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MailHeader
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `value` | `string` |  |

### MailMessage

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MailMessage
```

| Property | Type | Description |
| --- | --- | --- |
| `format` | `MailFormat` |  |
| `subject` | `string` |  |
| `from?` | `MailAddress` |  |
| `to` | `MailAddress[]` |  |
| `cc` | `MailAddress[]` |  |
| `bcc` | `MailAddress[]` |  |
| `sentAt?` | `Date` |  |
| `text` | `string` |  |
| `html` | `string` |  |
| `headers` | `MailHeader[]` |  |
| `attachments` | `MailAttachment[]` |  |

### MailOriginalFile

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MailOriginalFile
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `fileName?` | `string` |  |

### MailPdfLabels

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MailPdfLabels
```

| Property | Type | Description |
| --- | --- | --- |
| `subject` | `string` |  |
| `from` | `string` |  |
| `to` | `string` |  |
| `cc` | `string` |  |
| `bcc` | `string` |  |
| `sent` | `string` |  |
| `attachments` | `string` |  |
| `noSubject` | `string` |  |
| `image` | `string` |  |

### MailPdfResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MailPdfResult
```

| Property | Type | Description |
| --- | --- | --- |
| `bytes` | `PdfBytes` |  |
| `pageCount` | `number` |  |
| `substitutedCharacters` | `number` |  |
| `attachmentNames` | `string[]` |  |
| `warnings` | `MailPdfWarning[]` |  |

### MailPdfWarning

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MailPdfWarning
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `MailPdfWarningCode` |  |
| `message` | `string` |  |
| `count` | `number` |  |

### MailToPdfOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MailToPdfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `pageSize?` | `MailPageSize` |  |
| `margin?` | `number \| PageMargins` |  |
| `fontSize?` | `number` |  |
| `fonts?` | `FontRegistry \| readonly PdfFontSource[]` |  |
| `fontFallback?` | `PdfFontFallback` |  |
| `allowMissingGlyphs?` | `boolean` |  |
| `includeAttachments?` | `boolean` |  |
| `attachOriginal?` | `Uint8Array \| MailOriginalFile` |  |
| `preferPlainText?` | `boolean` |  |
| `labels?` | `Partial<MailPdfLabels>` |  |
| `formatDate?` | `(date: Date) => string` |  |

### MeasureDetails

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MeasureDetails
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `PdfAnnotation['type']` |  |
| `value` | `number` |  |
| `unit` | `string` |  |
| `text` | `string` |  |
| `length?` | `number` |  |
| `perimeter?` | `number` |  |
| `area?` | `number` |  |
| `radius?` | `number` |  |
| `angle?` | `number` |  |
| `count?` | `number` |  |

### MeasureScale

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MeasureScale
```

| Property | Type | Description |
| --- | --- | --- |
| `pdfUnits` | `number` |  |
| `realUnits` | `number` |  |
| `unit` | `string` |  |
| `precision?` | `number` |  |

### MergeFileInput

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MergeFileInput
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `name?` | `string` |  |
| `pages?` | `string \| readonly number[]` |  |
| `password?` | `string` |  |

### MergeFilesOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MergeFilesOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `at?` | `number` |  |
| `bookmarkPerFile?` | `boolean` |  |
| `keepBookmarks?` | `boolean` |  |
| `keepFormFields?` | `boolean` |  |
| `signal?` | `AbortSignal` |  |
| `onProgress?` | `(progress: MergeProgress) => void \| Promise<void>` |  |

### MergeFilesResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MergeFilesResult
```

| Property | Type | Description |
| --- | --- | --- |
| `at` | `number` |  |
| `pageCount` | `number` |  |
| `documentIndexes` | `number[]` |  |
| `renamedFields` | `{ from: string; to: string }[]` |  |

### MergePdfsOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MergePdfsOptions extends Omit<MergeFilesOptions, 'at'>
```

| Property | Type | Description |
| --- | --- | --- |
| `decodeImage?` | `ImageDecoder` |  |
| `bookmarkPerFile?` | `boolean \| undefined` | Inherited from MergeFilesOptions. |
| `keepBookmarks?` | `boolean \| undefined` | Inherited from MergeFilesOptions. |
| `keepFormFields?` | `boolean \| undefined` | Inherited from MergeFilesOptions. |
| `signal?` | `AbortSignal \| undefined` | Inherited from MergeFilesOptions. |
| `onProgress?` | `((progress: MergeProgress) => void \| Promise<void>) \| undefined` | Inherited from MergeFilesOptions. |

### MergeProgress

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MergeProgress
```

| Property | Type | Description |
| --- | --- | --- |
| `done` | `number` |  |
| `total` | `number` |  |
| `name` | `string` |  |

### MissingGlyphReport

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface MissingGlyphReport
```

| Property | Type | Description |
| --- | --- | --- |
| `characters` | `string` |  |
| `scripts` | `TextScript[]` |  |

### NameConstraints

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface NameConstraints
```

| Property | Type | Description |
| --- | --- | --- |
| `permitted` | `GeneralName[]` |  |
| `excluded` | `GeneralName[]` |  |

### NamedDestination

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface NamedDestination extends LinkDestination
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `pageIndex` | `number` | Inherited from LinkDestination. |
| `fit?` | `LinkFit \| undefined` | Inherited from LinkDestination. |
| `left?` | `number \| undefined` | Inherited from LinkDestination. |
| `top?` | `number \| undefined` | Inherited from LinkDestination. |
| `right?` | `number \| undefined` | Inherited from LinkDestination. |
| `bottom?` | `number \| undefined` | Inherited from LinkDestination. |
| `zoom?` | `number \| undefined` | Inherited from LinkDestination. |

### ObjectEditResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ObjectEditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `ok` | `boolean` |  |
| `reason?` | `ContentEditFailure` |  |
| `message?` | `string` |  |
| `object?` | `PageObject` |  |

### OcrPageImage

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface OcrPageImage
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `data` | `Uint8Array` |  |

### OcrWord

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface OcrWord
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `rect` | `[number, number, number, number]` |  |

### OfficeExportOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface OfficeExportOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `pages?` | `readonly number[]` | Pages to export, zero-based. Default: every page. |
| `title?` | `string` |  |

### OfficeExportSource

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface OfficeExportSource
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly pageCount` | `number` |  |
| `getStructuredText` | `(pageIndex: number) => PageTextStructure` |  |

### OfficeRun

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface OfficeRun
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `isBold?` | `boolean` |  |
| `isItalic?` | `boolean` |  |

### OpenPdfOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface OpenPdfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `limits?` | `Partial<PdfLimits>` |  |
| `fontFallback?` | `PdfFontFallback` |  |
| `allowMissingGlyphs?` | `boolean` | `false` makes `save()` reject with a `PdfMissingGlyphError` when text has no font. By default the file is saved and the result names the missing scripts in `missingGlyphs`. |
| `textRasterizer?` | `PdfTextRasterizer` | Draws annotation text no font covers as an image. The viewer sets one that uses the fonts of the browser. |
| `author?` | `string` |  |
| `createId?` | `() => string` |  |
| `now?` | `() => Date` |  |
| `annotationDefaults?` | `Partial<Record<AnnotationType, Partial<AnnotationDefaults>>>` |  |
| `historyLimit?` | `number` |  |
| `readAnnotations?` | `boolean` |  |
| `annotationScope?` | `'markup' \| 'all'` |  |
| `password?` | `string` |  |
| `fonts?` | `PdfFontSource[]` |  |
| `decodeImage?` | `ImageDecoder` |  |
| `ignorePermissions?` | `boolean` |  |
| `authorId?` | `string` |  |

### OptimizeImageOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface OptimizeImageOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `maxDpi` | `number` |  |
| `jpegQuality?` | `number` |  |

### OptimizeOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface OptimizeOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `keepVerbatim?` | `boolean` | False serialises every object anew, so the output has one spelling of stream and object syntax. |
| `objectStreams?` | `boolean` |  |
| `dedupe?` | `boolean` |  |
| `removeUnused?` | `boolean` |  |
| `recompress?` | `boolean` |  |
| `transform?` | `ObjectTransform` |  |
| `images?` | `OptimizeImageOptions` |  |
| `fonts?` | `boolean` |  |

### OptimizeReport

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface OptimizeReport extends Partial<DownsampleReport>, Partial<FontSubsetReport>
```

| Property | Type | Description |
| --- | --- | --- |
| `before` | `number` |  |
| `after` | `number` |  |
| `objectsBefore` | `number` |  |
| `objectsAfter` | `number` |  |
| `duplicatesMerged` | `number` |  |
| `imagesDownsampled?` | `number \| undefined` | Inherited from DownsampleReport. |
| `imagesKept?` | `number \| undefined` | Inherited from DownsampleReport. |
| `fontsSubset?` | `number \| undefined` | Inherited from FontSubsetReport. |
| `fontsKept?` | `number \| undefined` | Inherited from FontSubsetReport. |
| `fontBytesBefore?` | `number \| undefined` | Inherited from FontSubsetReport. |
| `fontBytesAfter?` | `number \| undefined` | Inherited from FontSubsetReport. |

### OptimizeResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface OptimizeResult
```

| Property | Type | Description |
| --- | --- | --- |
| `bytes` | `PdfBytes` |  |
| `report` | `OptimizeReport` |  |

### OutlineItem

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface OutlineItem
```

| Property | Type | Description |
| --- | --- | --- |
| `title` | `string` |  |
| `pageIndex?` | `number` |  |
| `left?` | `number` |  |
| `top?` | `number` |  |
| `zoom?` | `number` |  |
| `uri?` | `string` |  |
| `isOpen?` | `boolean` |  |
| `color?` | `string` |  |
| `isBold?` | `boolean` |  |
| `isItalic?` | `boolean` |  |
| `children?` | `OutlineItem[]` |  |

### PageBoxes

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageBoxes
```

| Property | Type | Description |
| --- | --- | --- |
| `media` | `PdfRect` |  |
| `crop` | `PdfRect` |  |
| `bleed` | `PdfRect` |  |
| `trim` | `PdfRect` |  |
| `art` | `PdfRect` |  |

### PageDecoration

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageDecoration
```

| Property | Type | Description |
| --- | --- | --- |
| `kind` | `PageLayerKind` |  |
| `pages` | `number[]` |  |
| `isOwn` | `boolean` | True when this library made the layer; `options` then holds what it was made with. |
| `options?` | `Record<string, unknown>` |  |

### PageGeometry

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageGeometry
```

| Property | Type | Description |
| --- | --- | --- |
| `points` | `PdfPoint[]` |  |
| `segments` | `PdfSegment[]` |  |
| `baselines` | `PdfSegment[]` |  |
| `textBoxes` | `PageTextBox[]` |  |
| `isTruncated` | `boolean` |  |

### PageGeometryOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageGeometryOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `maxPoints?` | `number` |  |
| `maxSegments?` | `number` |  |
| `maxTextRuns?` | `number` |  |
| `bounds?` | `PdfRect` |  |
| `includeText?` | `boolean` |  |
| `includePaths?` | `boolean` |  |
| `includeImages?` | `boolean` |  |

### PageImage

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageImage
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `index` | `number` |  |
| `name` | `string` |  |
| `ref?` | `PdfRef` |  |
| `rect` | `PdfRect` |  |
| `quad` | `[PdfPoint, PdfPoint, PdfPoint, PdfPoint]` |  |
| `matrix` | `Matrix` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `filter?` | `string` |  |
| `format` | `PageImageFormat` |  |
| `bitsPerComponent` | `number` |  |
| `colorSpace?` | `string` |  |
| `isMask` | `boolean` |  |
| `hasAlpha` | `boolean` |  |
| `opacity` | `number` | Constant opacity set next to the image, 1 when none. |
| `crop?` | `[x0: number, y0: number, x1: number, y1: number]` | The shown part in image space (0 to 1 from the lower left corner), when the image is cropped. |
| `visibleRect` | `PdfRect` | Bounding box of the shown part on the page. |

### PageLabelRange

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageLabelRange
```

| Property | Type | Description |
| --- | --- | --- |
| `startPage` | `number` |  |
| `style` | `PageLabelStyle` |  |
| `prefix?` | `string` |  |
| `start?` | `number` |  |

### PageMargins

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageMargins
```

| Property | Type | Description |
| --- | --- | --- |
| `top?` | `number` |  |
| `bottom?` | `number` |  |
| `left?` | `number` |  |
| `right?` | `number` |  |

### PageNumberOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageNumberOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `format?` | `string` |  |
| `position?` | `PageNumberPosition` |  |
| `startNumber?` | `number` |  |
| `pages?` | `number[]` |  |
| `fontSize?` | `number` |  |
| `color?` | `string` |  |
| `margin?` | `number` |  |
| `font?` | `StandardFont` |  |
| `fonts?` | `FontRegistry` |  |

### PageObject

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageObject
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `kind` | `PageObjectKind` |  |
| `index` | `number` | Operation that paints the object, and the first operation that belongs to it. |
| `firstIndex` | `number` |  |
| `order` | `number` | Position in paint order, 0 is painted first. |
| `rect` | `PdfRect` |  |
| `operator` | `string` |  |
| `label` | `string` |  |
| `matrix` | `Matrix` |  |
| `hasClip?` | `boolean` |  |
| `isInvisible?` | `boolean` |  |
| `layer?` | `PageObjectLayer` |  |

### PageRedactionImage

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageRedactionImage extends RedactionImageRequest
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `ref` | `PdfRef` | Inherited from RedactionImageRequest. |
| `name` | `string` | Inherited from RedactionImageRequest. |
| `role` | `"image" \| "mask" \| "softMask"` | Inherited from RedactionImageRequest. |
| `rect` | `PdfRect` | Inherited from RedactionImageRequest. |
| `matrix` | `Matrix` | Inherited from RedactionImageRequest. |
| `data` | `Uint8Array<ArrayBufferLike>` | Inherited from RedactionImageInfo. |
| `filter` | `string` | Inherited from RedactionImageInfo. |
| `width` | `number` | Inherited from RedactionImageInfo. |
| `height` | `number` | Inherited from RedactionImageInfo. |
| `bitsPerComponent` | `number` | Inherited from RedactionImageInfo. |
| `colorSpace?` | `string \| undefined` | Inherited from RedactionImageInfo. |
| `isMask` | `boolean` | Inherited from RedactionImageInfo. |
| `decode?` | `number[] \| undefined` | Inherited from RedactionImageInfo. |
| `decodeParms?` | `Record<string, number \| boolean> \| undefined` | Inherited from RedactionImageInfo. |
| `jbig2Globals?` | `Uint8Array<ArrayBufferLike> \| undefined` | Inherited from RedactionImageInfo. |

### PageSync

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageSync
```

| Property | Type | Description |
| --- | --- | --- |
| `receive` | `(operations: PageSyncOperation \| PageSyncOperation[]) => void` |  |
| `merge` | `(snapshot: PageSyncSnapshot) => void` |  |
| `snapshot` | `() => PageSyncSnapshot` |  |
| `pageIds` | `() => (string \| undefined)[]` |  |
| `destroy` | `() => void` |  |

### PageSyncConflict

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageSyncConflict
```

| Property | Type | Description |
| --- | --- | --- |
| `pageId` | `string` |  |
| `reason` | `'older-write' \| 'removed'` |  |
| `operation` | `PageSyncOperation` |  |
| `winner` | `SyncClock` |  |

### PageSyncHost

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageSyncHost
```

| Property | Type | Description |
| --- | --- | --- |
| `getPages` | `() => PageSyncPage[]` |  |
| `movePages` | `(indices: number[], target: number) => void` |  |
| `rotatePages` | `(indices: number[], degrees: number) => void` |  |
| `deletePages` | `(indices: number[]) => void` |  |
| `insertBlankPage` | `(at: number, size?: PageSyncSize) => number` |  |
| `subscribePageChanges` | `(listener: () => void) => () => void` |  |

### PageSyncOperation

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageSyncOperation
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `kind` | `PageSyncOperationKind` |  |
| `pageId` | `string` |  |
| `position?` | `string` |  |
| `rotation?` | `number` |  |
| `size?` | `PageSyncSize` |  |
| `author` | `string` |  |
| `clock` | `SyncClock` |  |

### PageSyncOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageSyncOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `actorId` | `string` |  |
| `send` | `(operations: PageSyncOperation[]) => void` |  |
| `author?` | `string` |  |
| `onConflict?` | `(conflict: PageSyncConflict) => void` |  |
| `onApply?` | `() => void` |  |
| `snapshot?` | `PageSyncSnapshot` |  |

### PageSyncPage

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageSyncPage
```

| Property | Type | Description |
| --- | --- | --- |
| `key` | `number \| string` |  |
| `kind` | `string` |  |
| `sourceIndex` | `number` |  |
| `rotation` | `number` |  |
| `width` | `number` |  |
| `height` | `number` |  |

### PageSyncSize

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageSyncSize
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |

### PageSyncSnapshot

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageSyncSnapshot
```

| Property | Type | Description |
| --- | --- | --- |
| `version` | `1` |  |
| `counter` | `number` |  |
| `pages` | `PageSyncSnapshotEntry[]` |  |

### PageSyncSnapshotEntry

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageSyncSnapshotEntry
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `position?` | `{ clock: SyncClock; value: string }` |  |
| `rotation?` | `{ clock: SyncClock; value: number }` |  |
| `removed?` | `SyncClock` |  |
| `size?` | `PageSyncSize` |  |

### PageTabOrder

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageTabOrder
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `mode` | `TabOrderMode` |  |
| `widgets` | `TabOrderEntry[]` |  |

### PageTextBox

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageTextBox
```

| Property | Type | Description |
| --- | --- | --- |
| `rect` | `PdfRect` |  |
| `quad` | `PdfQuad` |  |

### PageTextItem

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageTextItem
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `rect` | `PdfRect` |  |
| `quad` | `PdfQuad` |  |
| `baseline` | `[PdfPoint, PdfPoint]` |  |
| `fontName?` | `string` |  |
| `fontSize` | `number` |  |
| `isBold` | `boolean` |  |
| `isItalic` | `boolean` |  |
| `rotation` | `number` |  |
| `direction` | `PageTextDirection` |  |
| `lineIndex` | `number` |  |
| `hasSpaceAfter` | `boolean` |  |
| `charQuads?` | `PdfQuad[]` |  |

### PageTextLine

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageTextLine
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `rect` | `PdfRect` |  |
| `quad` | `PdfQuad` |  |
| `baseline` | `[PdfPoint, PdfPoint]` |  |
| `fontSize` | `number` |  |
| `rotation` | `number` |  |
| `direction` | `PageTextDirection` |  |
| `items` | `PageTextItem[]` |  |

### PageTextStructure

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PageTextStructure
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `lines` | `PageTextLine[]` |  |
| `items` | `PageTextItem[]` |  |
| `sequence?` | `(PageTextLine \| PageTextMark)[]` | With `markedContent` and content order: lines and marked-content boundaries as they follow each other. |

### ParagraphEditOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ParagraphEditOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `fonts?` | `FontRegistry` |  |
| `width?` | `number` |  |
| `pushBelow?` | `boolean` | Move the text, images and shapes under the paragraph down when it needs more lines than before. |

### ParagraphEditResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ParagraphEditResult extends TextEditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `lines?` | `string[]` |  |
| `rect?` | `PdfRect` |  |
| `overflow?` | `number` |  |
| `pushed?` | `number` | How many objects under the paragraph were moved down to make room. |
| `ok` | `boolean` | Inherited from TextEditResult. |
| `reason?` | `ContentEditFailure \| undefined` | Inherited from TextEditResult. |
| `message?` | `string \| undefined` | Inherited from TextEditResult. |
| `usedFont?` | `"original" \| "embedded" \| "standard" \| undefined` | Inherited from TextEditResult. |
| `fontNames?` | `string[] \| undefined` | Inherited from TextEditResult. |
| `missing?` | `string \| undefined` | Inherited from TextEditResult. |
| `widthChange?` | `number \| undefined` | Inherited from TextEditResult. |

### PdfAConversionOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfAConversionOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `keepAttachments?` | `boolean` |  |
| `fonts?` | `Readonly<Record<string, Uint8Array>>` |  |

### PdfAConversionResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfAConversionResult
```

| Property | Type | Description |
| --- | --- | --- |
| `bytes` | `PdfBytes` |  |
| `isConformant` | `boolean` |  |
| `removed` | `string[]` |  |
| `remaining` | `ArchiveFinding[]` |  |
| `fonts` | `PdfAFontReplacement[]` |  |
| `validation` | `PdfAValidation` |  |

### PdfAFontReplacement

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfAFontReplacement
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `replacement` | `string` |  |
| `glyphs` | `number` |  |
| `mismatchedWidths` | `number` |  |

### PdfAnnotation

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfAnnotation
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `type` | `AnnotationType` |  |
| `pageIndex` | `number` |  |
| `rect` | `PdfRect` |  |
| `color` | `string` |  |
| `opacity` | `number` |  |
| `strokeWidth` | `number` |  |
| `author` | `string` |  |
| `createdAt` | `string` |  |
| `modifiedAt` | `string` |  |
| `contents?` | `string` |  |
| `replies?` | `AnnotationReply[]` |  |
| `status?` | `ReviewStatus` |  |
| `statusAuthor?` | `string` |  |
| `statusModifiedAt?` | `string` |  |
| `replacedQuadPoints?` | `number[]` |  |
| `fillColor?` | `string` |  |
| `dashed?` | `boolean` |  |
| `borderStyle?` | `BorderStyle` |  |
| `rotation?` | `number` |  |
| `quadPoints?` | `number[]` |  |
| `inkList?` | `PdfPoint[][]` |  |
| `vertices?` | `PdfPoint[]` |  |
| `line?` | `[PdfPoint, PdfPoint]` |  |
| `lineEndings?` | `[LineEnding, LineEnding]` |  |
| `text?` | `string` |  |
| `fontSize?` | `number` |  |
| `fontColor?` | `string` |  |
| `textAlign?` | `'left' \| 'center' \| 'right'` |  |
| `fontFamily?` | `AnnotationFont` |  |
| `calloutLine?` | `PdfPoint[]` |  |
| `groupId?` | `string` |  |
| `icon?` | `NoteIcon` |  |
| `stamp?` | `BuiltInStamp \| string` |  |
| `stampLabel?` | `string` |  |
| `image?` | `AnnotationImage` |  |
| `signatureKind?` | `'drawn' \| 'typed' \| 'image'` |  |
| `measureScale?` | `MeasureScale` |  |
| `overlayText?` | `string` |  |
| `url?` | `string` |  |
| `destinationPage?` | `number` |  |
| `isLocked?` | `boolean` |  |
| `isHidden?` | `boolean` |  |
| `isReadOnly?` | `boolean` |  |
| `isContentsLocked?` | `boolean` |  |
| `isNoView?` | `boolean` |  |
| `isPrintable?` | `boolean` |  |
| `richText?` | `RichTextParagraph[]` |  |
| `action?` | `LinkAction` |  |
| `highlightMode?` | `LinkHighlightMode` |  |
| `label?` | `string` |  |
| `iconName?` | `string` |  |
| `attachment?` | `AnnotationAttachment` |  |
| `customData?` | `Record<string, unknown>` |  |

### PdfAttachment

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfAttachment extends FileSpecInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `source` | `'document' \| 'annotation'` |  |
| `pageIndex?` | `number` |  |
| `name` | `string` | Inherited from FileSpecInfo. |
| `description?` | `string \| undefined` | Inherited from FileSpecInfo. |
| `mimeType?` | `string \| undefined` | Inherited from FileSpecInfo. |
| `size` | `number` | Inherited from FileSpecInfo. |
| `created?` | `Date \| undefined` | Inherited from FileSpecInfo. |
| `modified?` | `Date \| undefined` | Inherited from FileSpecInfo. |
| `relationship?` | `AttachmentRelationship \| undefined` | Inherited from FileSpecInfo. |
| `checksum?` | `string \| undefined` | Inherited from FileSpecInfo. |
| `isChecksumValid?` | `boolean \| undefined` | Inherited from FileSpecInfo. |
| `data` | `Uint8Array<ArrayBufferLike>` | Inherited from FileSpecInfo. |

### PdfAValidation

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfAValidation
```

| Property | Type | Description |
| --- | --- | --- |
| `profile` | `'PDF/A-2b'` |  |
| `validator` | `'built-in'` |  |
| `isValid` | `boolean` |  |
| `violations` | `PdfAViolation[]` |  |
| `rulesChecked` | `PdfARule[]` |  |

### PdfAViolation

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfAViolation
```

| Property | Type | Description |
| --- | --- | --- |
| `rule` | `PdfARule` |  |
| `clause` | `string` |  |
| `severity` | `'error' \| 'warning'` |  |
| `message` | `string` |  |
| `pageIndex?` | `number` |  |
| `object?` | `number` |  |

### PdfCertificateInfo

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfCertificateInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `subject` | `PdfDistinguishedName` |  |
| `issuer` | `PdfDistinguishedName` |  |
| `serialNumber` | `string` |  |
| `notBefore` | `string` |  |
| `notAfter` | `string` |  |
| `publicKeyAlgorithm` | `'RSA' \| 'EC' \| 'unknown'` |  |
| `publicKeyBits?` | `number` |  |
| `curve?` | `'P-256' \| 'P-384' \| 'P-521'` |  |
| `isCertificateAuthority` | `boolean` |  |
| `isSelfIssued` | `boolean` |  |
| `der` | `Uint8Array` |  |
| `revocation?` | `RevocationStatus` |  |
| `revocationDetails?` | `PdfRevocationDetails` |  |

### PdfCertificationInfo

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfCertificationInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `level` | `1 \| 2 \| 3` |  |
| `permission` | `PdfCertificationPermission` |  |

### PdfCollection

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfCollection
```

| Property | Type | Description |
| --- | --- | --- |
| `view` | `PdfCollectionView` |  |
| `initialDocument?` | `string` |  |
| `fields` | `PdfCollectionField[]` |  |
| `sort?` | `PdfCollectionSort[]` |  |
| `items` | `PdfCollectionItem[]` |  |

### PdfCollectionField

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfCollectionField
```

| Property | Type | Description |
| --- | --- | --- |
| `key` | `string` |  |
| `name` | `string` |  |
| `type` | `PdfCollectionFieldType` |  |
| `order` | `number` |  |
| `isVisible` | `boolean` |  |

### PdfCollectionItem

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfCollectionItem extends PdfAttachment
```

| Property | Type | Description |
| --- | --- | --- |
| `values` | `Record<string, PdfCollectionValue>` |  |
| `source` | `"document" \| "annotation"` | Inherited from PdfAttachment. |
| `pageIndex?` | `number \| undefined` | Inherited from PdfAttachment. |
| `name` | `string` | Inherited from FileSpecInfo. |
| `description?` | `string \| undefined` | Inherited from FileSpecInfo. |
| `mimeType?` | `string \| undefined` | Inherited from FileSpecInfo. |
| `size` | `number` | Inherited from FileSpecInfo. |
| `created?` | `Date \| undefined` | Inherited from FileSpecInfo. |
| `modified?` | `Date \| undefined` | Inherited from FileSpecInfo. |
| `relationship?` | `AttachmentRelationship \| undefined` | Inherited from FileSpecInfo. |
| `checksum?` | `string \| undefined` | Inherited from FileSpecInfo. |
| `isChecksumValid?` | `boolean \| undefined` | Inherited from FileSpecInfo. |
| `data` | `Uint8Array<ArrayBufferLike>` | Inherited from FileSpecInfo. |

### PdfCollectionSort

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfCollectionSort
```

| Property | Type | Description |
| --- | --- | --- |
| `key` | `string` |  |
| `isAscending` | `boolean` |  |

### PdfComparison

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfComparison
```

| Property | Type | Description |
| --- | --- | --- |
| `pages` | `PdfPageComparison[]` |  |
| `changes` | `PdfTextChange[]` |  |
| `summary` | `PdfComparisonSummary` |  |
| `annotations?` | `{ a: AnnotationInput[]; b: AnnotationInput[] }` |  |

### PdfComparisonSummary

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfComparisonSummary
```

| Property | Type | Description |
| --- | --- | --- |
| `pageCountA` | `number` |  |
| `pageCountB` | `number` |  |
| `pagesUnchanged` | `number` |  |
| `pagesChanged` | `number` |  |
| `pagesAdded` | `number` |  |
| `pagesRemoved` | `number` |  |
| `pagesMoved` | `number` |  |
| `insertions` | `number` |  |
| `deletions` | `number` |  |
| `moves` | `number` |  |
| `wordsInserted` | `number` |  |
| `wordsDeleted` | `number` |  |
| `wordsMoved` | `number` |  |
| `isIdentical` | `boolean` |  |

### PdfDistinguishedName

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfDistinguishedName
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `commonName?` | `string` |  |
| `organization?` | `string` |  |
| `organizationalUnit?` | `string` |  |
| `country?` | `string` |  |
| `email?` | `string` |  |

### PdfDocument

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfDocument
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly pageCount` | `number` |  |
| `readonly isModified` | `boolean` |  |
| `readonly isEncrypted` | `boolean` |  |
| `readonly isLocked` | `boolean` |  |
| `readonly hasSignatures` | `boolean` |  |
| `readonly certification` | `PdfCertificationInfo \| undefined` |  |
| `readonly permissions` | `PdfPermissions` |  |
| `readonly encryption` | `PdfEncryptionInfo \| undefined` |  |
| `isAllowed` | `(permission: PdfPermissionName) => boolean` |  |
| `encrypt` | `(options: EncryptOptions) => void` |  |
| `decrypt` | `() => void` |  |
| `mergeEncryptedDocument` | `(data: Uint8Array \| ArrayBuffer, password?: string, at?: number) => Promise<number>` |  |
| `on` | `<K extends keyof PdfDocumentEvents & string>(event: K, listener: Listener<PdfDocumentEvents[K]>) => () => void` |  |
| `getPages` | `() => PdfPageSummary[]` |  |
| `setAuthor` | `(author: string) => void` |  |
| `getAnnotations` | `(pageIndex?: number) => PdfAnnotation[]` |  |
| `addAnnotation` | `(input: AnnotationInput) => PdfAnnotation` |  |
| `addAnnotations` | `(inputs: AnnotationInput[]) => PdfAnnotation[]` |  |
| `updateAnnotation` | `(id: string, patch: AnnotationPatch) => PdfAnnotation \| undefined` |  |
| `removeAnnotation` | `(id: string \| string[]) => PdfAnnotation[]` |  |
| `addReply` | `(id: string, reply: string \| { contents: string; author?: string; id?: string }) => AnnotationReply \| undefined` |  |
| `updateReply` | `(id: string, replyId: string, contents: string) => AnnotationReply \| undefined` |  |
| `removeReply` | `(id: string, replyId: string) => boolean` |  |
| `addTextMarkup` | `(type: TextMarkupType, pageIndex: number, quads: readonly PdfQuad[], extra?: Partial<Omit<AnnotationInput, 'type' \| 'pageIndex' \| 'quadPoints'>>) => PdfAnnotation \| undefined` |  |
| `uprightPlacement` | `(pageIndex: number, rect: PdfRect) => { rect: PdfRect; rotation: number \| undefined }` |  |
| `getNamedDestinations` | `() => NamedDestination[]` |  |
| `getAnnotationAttachment` | `(id: string) => AnnotationAttachmentFile \| undefined` |  |
| `exportAnnotationsFdf` | `(options?: { fileName?: string; includeAppearances?: boolean }) => PdfBytes` |  |
| `importAnnotationsFdf` | `(data: Uint8Array \| ArrayBuffer, options?: { replace?: boolean }) => { annotations: number }` |  |
| `applyRemoteChanges` | `(changes: { upsert: PdfAnnotation[]; remove: string[] }) => void` |  |
| `subscribeAnnotationChanges` | `(listener: (changes: AnnotationChangeSet) => void) => () => void` |  |
| `getFormFields` | `() => PdfFormField[]` |  |
| `getFormField` | `(name: string) => PdfFormField \| undefined` |  |
| `getFormValues` | `() => Record<string, FormValue>` |  |
| `setFormValue` | `(name: string, value: FormValue) => string[]` |  |
| `setFormValues` | `(values: Record<string, FormValue>) => string[]` |  |
| `validateFormField` | `(name: string, value?: FormValue) => string \| undefined` |  |
| `validateFormFieldIssue` | `(name: string, value?: FormValue) => FieldIssue \| undefined` |  |
| `validateForm` | `() => FormIssue[]` |  |
| `getFormState` | `() => FormState` |  |
| `describeFieldScripts` | `(name: string) => FieldScriptReport \| undefined` |  |
| `filterKeystroke` | `(name: string, currentValue: string, change: string, selStart: number, selEnd?: number) => KeystrokeResult` |  |
| `getFieldActions` | `(name: string) => FieldActionEntry[]` |  |
| `resetForm` | `(names?: readonly string[], options?: { exclude?: boolean }) => string[]` |  |
| `buildSubmitPayload` | `(action: SubmitFormAction) => Promise<FormSubmitPayload>` |  |
| `submitForm` | `(action: SubmitFormAction, fieldName?: string) => Promise<FormSubmitPayload>` |  |
| `exportFormFdf` | `(fileName?: string) => PdfBytes` |  |
| `importFormFdf` | `(data: Uint8Array \| ArrayBuffer) => FormImportResult` |  |
| `exportFormXfdf` | `(fileName?: string) => string` |  |
| `importFormXfdf` | `(xml: string) => FormImportResult` |  |
| `exportFormJson` | `(options?: FormJsonOptions) => FormJson` |  |
| `importFormJson` | `(json: unknown) => FormImportResult` |  |
| `exportFormXml` | `() => string` |  |
| `importFormXml` | `(xml: string) => FormImportResult` |  |
| `addFormField` | `(input: FormFieldInput) => PdfFormField` |  |
| `detectFormFields` | `(pageIndexes?: readonly number[]) => DetectedField[]` | Proposes fields for blank lines, empty boxes and tick squares of flat pages; nothing is changed. |
| `addDetectedFields` | `(fields?: readonly DetectedField[]) => PdfFormField[]` | Adds the proposed fields (default: those of every page) as one undo step. |
| `updateFormField` | `(name: string, patch: FormFieldPatch) => PdfFormField \| undefined` |  |
| `updateFormFields` | `(names: readonly string[], patch: FormFieldPatch) => PdfFormField[]` |  |
| `removeFormField` | `(name: string) => boolean` |  |
| `duplicateField` | `(name: string, options?: DuplicateFieldOptions) => PdfFormField \| undefined` |  |
| `alignFields` | `(targets: readonly FormFieldTarget[], mode: FieldAlignment) => PdfFormField[]` |  |
| `distributeFields` | `(targets: readonly FormFieldTarget[], direction: 'horizontal' \| 'vertical') => PdfFormField[]` |  |
| `sizeFields` | `(targets: readonly FormFieldTarget[], mode: 'width' \| 'height' \| 'both') => PdfFormField[]` |  |
| `getCalculationOrder` | `() => string[]` |  |
| `setCalculationOrder` | `(names: readonly string[]) => string[]` |  |
| `setFieldCalculation` | `(name: string, calculation: SimpleCalculation \| null) => PdfFormField \| undefined` |  |
| `getSignatureFields` | `() => SignatureFieldInfo[]` |  |
| `fillSignatureField` | `(name: string, signature: FieldSignatureInput) => PdfAnnotation` |  |
| `getTabOrder` | `(pageIndex: number) => PageTabOrder` |  |
| `setTabOrder` | `(pageIndex: number, mode: TabOrderMode) => PageTabOrder` |  |
| `setFieldTabOrder` | `(pageIndex: number, widgetIds: string[]) => PageTabOrder` |  |
| `getSignatures` | `() => Promise<(SignatureInfo & { fieldName: string })[]>` |  |
| `movePage` | `(from: number, to: number) => void` |  |
| `movePages` | `(indices: number[], target: number) => void` |  |
| `rotatePages` | `(indices: number[], degrees?: number) => void` |  |
| `deletePages` | `(indices: number[]) => void` |  |
| `insertBlankPage` | `(at: number, size?: { width: number; height: number }) => number` |  |
| `mergeDocument` | `(data: Uint8Array \| ArrayBuffer, at?: number) => number` |  |
| `extractPages` | `(indices: number[], options?: { deleteExtracted?: boolean }) => Promise<PdfBytes>` |  |
| `replacePages` | `(indices: number[], source: Uint8Array \| ArrayBuffer, sourceIndices?: readonly number[]) => number` |  |
| `interleaveDocument` | `(data: Uint8Array \| ArrayBuffer, options?: InterleaveOptions) => number` |  |
| `mergeFiles` | `(inputs: readonly MergeFileInput[], options?: MergeFilesOptions) => Promise<MergeFilesResult>` |  |
| `findBlankPages` | `(pages?: number[], options?: BlankScanOptions & { analyzeImages?: boolean }) => number[]` |  |
| `deleteBlankPages` | `(pages?: number[], options?: BlankScanOptions & { analyzeImages?: boolean }) => number[]` |  |
| `detectTextRotation` | `(pageIndex: number) => number \| undefined` |  |
| `autoRotatePages` | `(pages?: number[]) => number[]` |  |
| `addPageNumbers` | `(options?: PageNumberOptions) => number` |  |
| `removePageNumbers` | `(pages?: number[]) => number` |  |
| `findPageNumbers` | `(pages?: number[]) => number[]` |  |
| `impose` | `(options: ImposeOptions) => Promise<PdfBytes>` |  |
| `extractText` | `(pageIndex: number) => string` |  |
| `findText` | `(query: string \| RegExp, options?: { pages?: number[]; caseSensitive?: boolean; wholeWord?: boolean }) => (TextMatch & { pageIndex: number })[]` |  |
| `markRedactions` | `(query: RedactionQuery, options?: RedactionSearchOptions) => PdfAnnotation[]` |  |
| `applyRedactions` | `(ids?: string[], options?: ApplyRedactionsOptions) => number` |  |
| `applyRedactionsAsync` | `(ids?: string[], options?: ApplyRedactionsAsyncOptions) => Promise<number>` |  |
| `getRedactionImages` | `(ids?: string[]) => PageRedactionImage[]` |  |
| `getPageText` | `(pageIndex: number) => ComparablePageText` |  |
| `getStructuredText` | `(pageIndex: number, options?: PageTextOptions) => PageTextStructure` |  |
| `checkAccessibility` | `() => AccessibilityReport` |  |
| `getFigures` | `() => PdfFigure[]` |  |
| `setAlternateText` | `(figureId: string, alternateText: string) => boolean` | Sets the alternate text of a figure of the structure tree; an empty string removes it. |
| `setLanguage` | `(language: string) => void` |  |
| `getLayoutBlocks` | `(options?: OfficeExportOptions) => OfficeBlock[]` | The text of the pages as headings, paragraphs, list items and tables, read from the layout. |
| `exportDocx` | `(options?: OfficeExportOptions) => PdfBytes` |  |
| `exportTablesXlsx` | `(options?: OfficeExportOptions) => PdfBytes` |  |
| `extractTextItems` | `(pageIndex: number, options?: PageTextOptions) => PageTextItem[]` |  |
| `getPageGeometry` | `(pageIndex: number, options?: PageGeometryOptions) => PageGeometry` |  |
| `compareWith` | `(other: CompareInput, options?: ComparePdfOptions & { password?: string }) => Promise<PdfComparison>` |  |
| `getAppliedRedactions` | `(pageIndex: number) => RedactionArea[]` |  |
| `undo` | `() => boolean` |  |
| `redo` | `() => boolean` |  |
| `canUndo` | `() => boolean` |  |
| `canRedo` | `() => boolean` |  |
| `canSaveIncrementally` | `() => boolean` |  |
| `loadFallbackFonts` | `(text: string) => Promise<boolean>` |  |
| `addTextLayer` | `(pageIndex: number, words: readonly TextLayerWord[]) => TextLayerResult` |  |
| `recognizeText` | `(options: RecognizeTextOptions) => Promise<RecognizedPage[]>` |  |
| `save` | `(options?: SaveOptions) => Promise<SaveResult>` |  |
| `exportXfdf` | `(fileName?: string) => string` |  |
| `importXfdf` | `(xml: string, options?: { replace?: boolean }) => { annotations: number; fields: number }` |  |
| `exportAnnotationsJson` | `() => AnnotationsJson` |  |
| `importAnnotationsJson` | `(json: unknown, options?: { replace?: boolean }) => number` |  |
| `getMetadata` | `() => PdfMetadata` |  |
| `setMetadata` | `(patch: PdfMetadataPatch) => void` |  |
| `getInitialView` | `() => PdfInitialView` |  |
| `setInitialView` | `(view: PdfInitialView) => void` |  |
| `getOutline` | `() => OutlineItem[]` |  |
| `setOutline` | `(items: OutlineItem[]) => void` |  |
| `getAttachments` | `() => PdfAttachment[]` |  |
| `addAttachment` | `(input: AttachmentInput \| (Omit<AttachmentInput, 'name'> & { fileName: string })) => void` |  |
| `removeAttachment` | `(fileName: string) => boolean` |  |
| `getCollection` | `() => PdfCollection \| undefined` |  |
| `addWatermark` | `(options: (StampTextOptions \| StampImageOptions) & { pages?: number[] }) => void` |  |
| `addHeaderFooter` | `(options: HeaderFooterOptions & { pages?: number[] }) => void` |  |
| `addBatesNumbers` | `(options: BatesOptions & { pages?: number[] }) => void` |  |
| `cropPages` | `(indices: number[], box: PdfRect \| null, options?: CropPagesOptions) => void` |  |
| `getPageBoxes` | `(pageIndex: number) => PageBoxes` |  |
| `setPageBoxes` | `(indices: number[], boxes: PageBoxesPatch) => void` |  |
| `resizePages` | `(indices: number[], options: ResizePagesOptions) => void` |  |
| `reversePages` | `(indices?: number[]) => void` |  |
| `insertPagesFrom` | `(data: Uint8Array \| ArrayBuffer, pageIndexes: readonly number[], at?: number) => number` |  |
| `insertImagePages` | `(images: readonly (Uint8Array \| ImagePageInput)[], at?: number, options?: ImagesToPdfOptions) => Promise<number>` |  |
| `duplicatePages` | `(indices: number[], at?: number) => Promise<number>` |  |
| `split` | `(options: SplitOptions, naming?: SplitNaming) => Promise<SplitPart[]>` |  |
| `flatten` | `(mode?: FlattenMode) => void` |  |
| `addPageText` | `(pageIndex: number, options: AddTextOptions) => AddTextResult` |  |
| `addPageImage` | `(pageIndex: number, options: AddImageOptions) => ImageEditResult` |  |
| `getTextRuns` | `(pageIndex: number) => TextRun[]` |  |
| `editPageText` | `(pageIndex: number, run: TextRun, text: string) => TextEditResult` |  |
| `getTextParagraphs` | `(pageIndex: number) => TextParagraph[]` |  |
| `editPageParagraph` | `(pageIndex: number, paragraph: TextParagraph, text: string, options?: { width?: number; pushBelow?: boolean }) => ParagraphEditResult` |  |
| `deletePageText` | `(pageIndex: number, run: TextRun) => TextEditResult` |  |
| `movePageText` | `(pageIndex: number, run: TextRun, move: TextMove) => TextMoveResult` |  |
| `getPageImages` | `(pageIndex: number) => PageImage[]` |  |
| `extractImages` | `(pageIndex: number) => ExtractedImage[]` |  |
| `prepareImage` | `(data: Uint8Array, options?: PrepareImageOptions) => Promise<AnnotationImage>` |  |
| `movePageImage` | `(pageIndex: number, image: PageImage \| string, move: ImageMove) => ImageEditResult` |  |
| `replacePageImage` | `(pageIndex: number, image: PageImage \| string, data: Uint8Array) => ImageEditResult` |  |
| `deletePageImage` | `(pageIndex: number, image: PageImage \| string) => ImageEditResult` |  |
| `rotatePageImage` | `(pageIndex: number, image: PageImage \| string, degrees: number) => ImageEditResult` |  |
| `setPageImageOpacity` | `(pageIndex: number, image: PageImage \| string, opacity: number) => ImageEditResult` |  |
| `cropPageImage` | `(pageIndex: number, image: PageImage \| string, crop: [x0: number, y0: number, x1: number, y1: number] \| null) => ImageEditResult` |  |
| `getSuppliedFontNames` | `() => string[]` |  |
| `addPageMark` | `(pageIndex: number, options: AddMarkOptions) => ImageEditResult` |  |
| `getPageObjects` | `(pageIndex: number) => PageObject[]` |  |
| `movePagePath` | `(pageIndex: number, object: PageObject \| string, move: { dx: number; dy: number }) => ObjectEditResult` |  |
| `deletePagePath` | `(pageIndex: number, object: PageObject \| string) => ObjectEditResult` |  |
| `reorderPageObject` | `(pageIndex: number, object: PageObject \| string, to: ObjectOrder) => ObjectEditResult` |  |
| `restylePageText` | `(pageIndex: number, run: TextRun, style: TextStyle) => RestyleResult` |  |
| `findEditableText` | `(query: string, options?: FindTextOptions & { pages?: number[] }) => (EditableTextMatch & { pageIndex: number })[]` |  |
| `replaceText` | `(query: string, replacement: string, options?: FindTextOptions & { pages?: number[]; matches?: readonly { pageIndex: number; id: string }[] }) => ReplaceTextResult & { pages: number[] }` |  |
| `replaceScannedText` | `(pageIndex: number, run: TextRun, text: string, options?: { background?: string; color?: string; fontSize?: number; padding?: number }) => AddTextResult` |  |
| `getPageDecorations` | `(pages?: number[]) => PageDecoration[]` |  |
| `removePageDecorations` | `(kinds: PageLayerKind \| readonly PageLayerKind[], pages?: number[]) => number` |  |
| `addBackground` | `(options: BackgroundOptions & { pages?: number[] }) => void` |  |
| `getPageLabels` | `() => string[]` |  |
| `getPageLabelRanges` | `() => PageLabelRange[]` |  |
| `setPageLabels` | `(ranges: PageLabelRange[]) => void` |  |
| `verifySignatures` | `(options?: VerifySignaturesOptions) => Promise<PdfSignatureVerification[]>` |  |

### PdfDocumentEvents

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfDocumentEvents
```

| Property | Type | Description |
| --- | --- | --- |
| `annotationAdd` | `{ annotations: PdfAnnotation[]; source: ChangeSource }` |  |
| `annotationChange` | `{ changes: { before: PdfAnnotation; after: PdfAnnotation }[]; source: ChangeSource }` |  |
| `annotationRemove` | `{ annotations: PdfAnnotation[]; source: ChangeSource }` |  |
| `formFieldChange` | `{ name: string; value: FormValue; previousValue: FormValue; source: ChangeSource }` |  |
| `formFieldsChange` | `{ added: string[]; changed: string[]; removed: string[]; source: ChangeSource }` |  |
| `formSubmit` | `{ action: SubmitFormAction; payload: FormSubmitPayload; fieldName?: string }` |  |
| `formReset` | `{ names: string[]; changed: string[]; source: ChangeSource }` |  |
| `pagesChange` | `{ pages: PdfPageSummary[]; reason: PagesChangeReason }` |  |
| `historyChange` | `{ canUndo: boolean; canRedo: boolean; undoLabel?: string; redoLabel?: string }` |  |
| `documentChange` | `{ reason: string }` |  |
| `fontMissing` | `MissingGlyphReport` |  |
| `formFieldReject` | `{ name: string; value: FormValue; issue: FieldIssue; source: ChangeSource }` |  |

### PdfEncryptionInfo

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfEncryptionInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `algorithm` | `EncryptionAlgorithm` |  |
| `revision` | `number` |  |
| `isOwner` | `boolean` |  |
| `encryptsMetadata` | `boolean` |  |

### PdfFigure

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfFigure
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` | Stable while the structure tree is not rewritten: the object number of the structure element. |
| `pageIndex?` | `number` |  |
| `alternateText?` | `string` |  |
| `actualText?` | `string` |  |
| `rect?` | `PdfRect` |  |

### PdfFontSource

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfFontSource
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `data` | `Uint8Array` |  |

### PdfFormField

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfFormField
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `type` | `FormFieldType` |  |
| `value` | `FormValue` |  |
| `defaultValue` | `FormValue` |  |
| `widgets` | `FormFieldWidget[]` |  |
| `options?` | `FormFieldOption[]` |  |
| `tooltip?` | `string` |  |
| `isReadOnly` | `boolean` |  |
| `isRequired` | `boolean` |  |
| `isMultiline?` | `boolean` |  |
| `isPassword?` | `boolean` |  |
| `isComb?` | `boolean` |  |
| `maxLength?` | `number` |  |
| `isMultiSelect?` | `boolean` |  |
| `isEditable?` | `boolean` |  |
| `alignment?` | `'left' \| 'center' \| 'right'` |  |
| `fontSize?` | `number` |  |
| `borderColor?` | `string \| null` |  |
| `backgroundColor?` | `string \| null` |  |
| `format?` | `FieldFormat` |  |
| `calculation?` | `FieldCalculation` |  |
| `range?` | `FieldRange` |  |
| `signature?` | `SignatureInfo` |  |
| `scripts?` | `FieldScripts` |  |
| `isNoExport?` | `boolean` |  |
| `isNoToggleToOff?` | `boolean` |  |
| `isRadiosInUnison?` | `boolean` |  |
| `isRichText?` | `boolean` |  |
| `richText?` | `RichTextParagraph[]` |  |
| `actions?` | `FieldActionEntry[]` |  |
| `signatureLock?` | `SignatureFieldLock` |  |
| `barcode?` | `BarcodeFieldInfo` |  |

### PdfInitialView

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfInitialView
```

| Property | Type | Description |
| --- | --- | --- |
| `pageMode?` | `PdfInitialPageMode` |  |
| `pageLayout?` | `PdfInitialPageLayout` |  |
| `openPage?` | `number` | Page shown when the document opens, from 0. |
| `zoom?` | `number \| 'fit-page' \| 'fit-width'` | Zoom when the document opens: a factor (1 is 100%) or a fit mode. |
| `displayDocTitle?` | `boolean` | Show the document title instead of the file name in the window title. |

### PdfLimits

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfLimits
```

| Property | Type | Description |
| --- | --- | --- |
| `maxStreamBytes` | `number` |  |
| `maxExpansionRatio` | `number` |  |
| `maxTotalDecodedBytes` | `number` |  |
| `maxFilterChain` | `number` |  |
| `maxImagePixels` | `number` |  |
| `maxNestingDepth` | `number` |  |
| `maxTreeDepth` | `number` |  |
| `maxGraphicsStateDepth` | `number` |  |
| `maxContentOperations` | `number` |  |
| `maxPageContentBytes` | `number` |  |

### PdfMetadata

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfMetadata
```

| Property | Type | Description |
| --- | --- | --- |
| `title?` | `string` |  |
| `author?` | `string` |  |
| `subject?` | `string` |  |
| `keywords?` | `string` |  |
| `creator?` | `string` |  |
| `producer?` | `string` |  |
| `created?` | `Date` |  |
| `modified?` | `Date` |  |
| `trapped?` | `boolean` |  |
| `custom` | `Record<string, string>` |  |
| `xmp?` | `string` |  |

### PdfMetadataPatch

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfMetadataPatch
```

| Property | Type | Description |
| --- | --- | --- |
| `title?` | `string \| null` |  |
| `author?` | `string \| null` |  |
| `subject?` | `string \| null` |  |
| `keywords?` | `string \| null` |  |
| `creator?` | `string \| null` |  |
| `producer?` | `string \| null` |  |
| `created?` | `Date \| null` |  |
| `modified?` | `Date \| null` |  |
| `trapped?` | `boolean \| null` |  |
| `custom?` | `Record<string, string \| null>` |  |

### PdfModificationReport

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfModificationReport
```

| Property | Type | Description |
| --- | --- | --- |
| `status` | `'none' \| 'allowed' \| 'disallowed' \| 'unknown'` |  |
| `changes` | `PdfRevisionChange[]` |  |
| `warnings?` | `PdfModificationWarning[]` |  |

### PdfModificationWarning

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfModificationWarning
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `'annotation-covers-content'` |  |
| `objectNumber` | `number` |  |
| `pageIndex` | `number` |  |
| `coveredRatio` | `number` |  |

### PdfPageComparison

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfPageComparison
```

| Property | Type | Description |
| --- | --- | --- |
| `status` | `PageComparisonStatus` |  |
| `pageIndexA?` | `number` |  |
| `pageIndexB?` | `number` |  |
| `similarity` | `number` |  |
| `changes` | `PdfTextChange[]` |  |

### PdfPageSummary

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfPageSummary
```

| Property | Type | Description |
| --- | --- | --- |
| `index` | `number` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `rotation` | `number` |  |
| `box` | `PdfRect` |  |
| `kind` | `PageSourceKind` |  |
| `sourceIndex` | `number` |  |
| `documentIndex` | `number` |  |
| `key` | `number` |  |

### PdfPermissions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfPermissions
```

| Property | Type | Description |
| --- | --- | --- |
| `print` | `boolean` |  |
| `printHighQuality` | `boolean` |  |
| `modify` | `boolean` |  |
| `copy` | `boolean` |  |
| `annotate` | `boolean` |  |
| `fillForms` | `boolean` |  |
| `extractForAccessibility` | `boolean` |  |
| `assemble` | `boolean` |  |

### PdfPoint

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfPoint
```

| Property | Type | Description |
| --- | --- | --- |
| `x` | `number` |  |
| `y` | `number` |  |

### PdfRevisionChange

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfRevisionChange
```

| Property | Type | Description |
| --- | --- | --- |
| `objectNumber` | `number` |  |
| `change` | `'added' \| 'changed' \| 'removed'` |  |
| `kind` | `RevisionChangeKind` |  |
| `ownerObjectNumber?` | `number` |  |
| `pageIndex?` | `number` |  |
| `coversContent?` | `boolean` |  |
| `coveredRatio?` | `number` |  |

### PdfRevocationDetails

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfRevocationDetails
```

| Property | Type | Description |
| --- | --- | --- |
| `status` | `RevocationStatus` |  |
| `source?` | `'ocsp' \| 'crl' \| 'callback'` |  |
| `revokedAt?` | `string` |  |
| `reason?` | `string` |  |
| `thisUpdate?` | `string` |  |
| `nextUpdate?` | `string` |  |

### PdfSignatureChain

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfSignatureChain
```

| Property | Type | Description |
| --- | --- | --- |
| `status` | `ChainStatus \| 'unknown'` |  |
| `certificates` | `PdfCertificateInfo[]` |  |
| `problems` | `ChainProblem[]` | Constraint violations of the chain: key usage, CA flag, path length, name constraints, validity of issuers. |

### PdfSignatureTimestamp

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfSignatureTimestamp
```

| Property | Type | Description |
| --- | --- | --- |
| `time?` | `string` |  |
| `isValid` | `boolean` |  |
| `authority?` | `string` |  |
| `policy?` | `string` |  |
| `serialNumber?` | `string` |  |
| `error?` | `string` |  |
| `chain?` | `PdfSignatureChain` |  |
| `revocation?` | `RevocationStatus` |  |

### PdfSignatureVerification

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfSignatureVerification
```

| Property | Type | Description |
| --- | --- | --- |
| `fieldName` | `string` |  |
| `type` | `'signature' \| 'certification' \| 'timestamp'` |  |
| `subFilter?` | `string` |  |
| `signerName?` | `string` |  |
| `reason?` | `string` |  |
| `location?` | `string` |  |
| `contactInfo?` | `string` |  |
| `signedAt?` | `string` |  |
| `signedAtSource?` | `'timestamp' \| 'signedAttribute' \| 'dictionary'` |  |
| `byteRange` | `number[]` |  |
| `coversWholeFile` | `boolean` |  |
| `laterChanges` | `'none' \| 'signatures-only' \| 'allowed' \| 'disallowed' \| 'unknown'` |  |
| `integrity` | `'intact' \| 'modified' \| 'unsupported'` |  |
| `signature` | `CheckResult` |  |
| `signingCertificate` | `SigningCertificateCheck` |  |
| `digestAlgorithm?` | `HashName` |  |
| `signatureAlgorithm?` | `string` |  |
| `certificate?` | `PdfCertificateInfo` |  |
| `chain` | `PdfSignatureChain` |  |
| `isCertificateValidAtSigning?` | `boolean` |  |
| `isCertificateValidNow?` | `boolean` |  |
| `revocation` | `RevocationStatus` |  |
| `certificationLevel?` | `1 \| 2 \| 3` |  |
| `certification?` | `PdfCertificationPermission` |  |
| `padesLevel?` | `PadesLevel` |  |
| `modification` | `PdfModificationReport` |  |
| `timestamp?` | `PdfSignatureTimestamp` |  |
| `isValid` | `boolean` |  |
| `isTrusted` | `boolean` |  |
| `summary` | `PdfSignatureSummary` |  |
| `expiredTrustLists?` | `string[]` | Names of the trust lists that were not used because they are past their expiry date. |
| `warnings` | `PdfSignatureWarning[]` |  |
| `error?` | `string` |  |

### PdfSignatureWarning

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfSignatureWarning
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `'annotation-covers-content'` |  |
| `message` | `string` |  |
| `pageIndex` | `number` |  |
| `objectNumber` | `number` |  |
| `coveredRatio` | `number` |  |

### PdfTextChange

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfTextChange
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `TextChangeType` |  |
| `text` | `string` |  |
| `pageIndexA?` | `number` |  |
| `pageIndexB?` | `number` |  |
| `rects` | `PdfRect[]` |  |
| `fromRects?` | `PdfRect[]` |  |
| `wordCount` | `number` |  |

### PdfTextRasterizer

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfTextRasterizer
```

Draws text the document has no font for. The viewer supplies one that uses a canvas and the fonts of the browser.

| Property | Type | Description |
| --- | --- | --- |
| `measure` | `(text: string, style: RasterTextStyle) => number` | Advance width of the text in points. |
| `rasterize` | `(text: string, style: RasterTextStyle) => RasterizedText \| undefined` |  |

### PdfTrustList

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfTrustList
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `expires` | `Date` |  |
| `issued?` | `Date` |  |
| `certificates` | `Uint8Array[]` | DER bytes of the certificates that could be read. |
| `entries` | `PdfCertificateInfo[]` |  |
| `rejected` | `number` | Certificates of the input that are not readable X.509 certificates. |

### PdfTrustListInput

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PdfTrustListInput
```

A list of trust anchors a host distributes, with the date after which it must be fetched again.

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `expires` | `string \| Date` | ISO 8601 date or `Date`. After it the list is not used. |
| `issued?` | `string \| Date` |  |
| `certificates` | `(string \| Uint8Array)[]` | PEM text (one or several certificates) or DER bytes. |

### Pkcs12Contents

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface Pkcs12Contents
```

| Property | Type | Description |
| --- | --- | --- |
| `privateKey` | `Uint8Array` |  |
| `privateKeyPem` | `string` |  |
| `certificate` | `Uint8Array` |  |
| `chain` | `Uint8Array[]` |  |
| `friendlyName?` | `string` |  |

### PrepareImageOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PrepareImageOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `decodeImage?` | `ImageDecoder` |  |
| `mimeType?` | `string` |  |

### PresenceState

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PresenceState
```

| Property | Type | Description |
| --- | --- | --- |
| `actorId` | `string` |  |
| `name` | `string` |  |
| `color` | `string` |  |
| `pageIndex?` | `number` |  |
| `point?` | `PdfPoint` |  |
| `selection?` | `string[]` |  |
| `viewPageIndex?` | `number` |  |

### PresenceTracker

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface PresenceTracker
```

| Property | Type | Description |
| --- | --- | --- |
| `receive` | `(message: PresenceMessage) => void` |  |
| `list` | `() => PresenceState[]` |  |
| `get` | `(actorId: string) => PresenceState \| undefined` |  |
| `prune` | `(now?: number) => string[]` |  |
| `clear` | `() => void` |  |

### RasterizedText

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RasterizedText
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` | Bitmap size in pixels. |
| `height` | `number` |  |
| `coverage` | `Uint8Array` | One byte of ink coverage per pixel, rows from the top. |
| `scale` | `number` | Pixels per point. |
| `originX` | `number` | Pixels from the left edge of the bitmap to the text origin. |
| `baseline` | `number` | Pixels from the top edge of the bitmap to the baseline. |

### RasterTextStyle

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RasterTextStyle
```

| Property | Type | Description |
| --- | --- | --- |
| `fontSize` | `number` |  |

### RecognizedPage

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RecognizedPage extends TextLayerResult
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `status` | `'recognized' \| 'has-text' \| 'no-image' \| 'no-words'` |  |
| `words` | `number` | Inherited from TextLayerResult. |
| `skippedWords` | `number` | Inherited from TextLayerResult. |

### RecognizeTextOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RecognizeTextOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `recognizeText` | `RecognizeTextCallback` |  |
| `pages?` | `number[]` |  |
| `includePagesWithText?` | `boolean` |  |
| `renderPage?` | `(pageIndex: number) => RenderedPageImage \| undefined \| Promise<RenderedPageImage \| undefined>` |  |

### RedactionArea

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RedactionArea
```

| Property | Type | Description |
| --- | --- | --- |
| `rect` | `PdfRect` |  |
| `fillColor?` | `string` |  |
| `overlayText?` | `string` |  |

### RedactionImageInfo

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RedactionImageInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `filter` | `string` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `bitsPerComponent` | `number` |  |
| `colorSpace?` | `string` |  |
| `isMask` | `boolean` |  |
| `decode?` | `number[]` |  |
| `decodeParms?` | `Record<string, number \| boolean>` |  |
| `jbig2Globals?` | `Uint8Array` |  |

### RedactionImageOutcome

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RedactionImageOutcome
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `action` | `'modified' \| 'removed'` |  |
| `filter?` | `string` |  |
| `decodedBy?` | `'package' \| 'callback'` |  |
| `reason?` | `RedactionImageRemovalReason` |  |
| `message?` | `string` |  |

### RedactionImageRequest

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RedactionImageRequest extends RedactionImageInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `ref` | `PdfRef` |  |
| `name` | `string` |  |
| `role` | `'image' \| 'softMask' \| 'mask'` |  |
| `rect` | `PdfRect` |  |
| `matrix` | `Matrix` |  |
| `data` | `Uint8Array<ArrayBufferLike>` | Inherited from RedactionImageInfo. |
| `filter` | `string` | Inherited from RedactionImageInfo. |
| `width` | `number` | Inherited from RedactionImageInfo. |
| `height` | `number` | Inherited from RedactionImageInfo. |
| `bitsPerComponent` | `number` | Inherited from RedactionImageInfo. |
| `colorSpace?` | `string \| undefined` | Inherited from RedactionImageInfo. |
| `isMask` | `boolean` | Inherited from RedactionImageInfo. |
| `decode?` | `number[] \| undefined` | Inherited from RedactionImageInfo. |
| `decodeParms?` | `Record<string, number \| boolean> \| undefined` | Inherited from RedactionImageInfo. |
| `jbig2Globals?` | `Uint8Array<ArrayBufferLike> \| undefined` | Inherited from RedactionImageInfo. |

### RedactionReport

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RedactionReport
```

| Property | Type | Description |
| --- | --- | --- |
| `glyphsRemoved` | `number` |  |
| `removedText` | `string` |  |
| `imagesRemoved` | `number` |  |
| `imagesModified` | `number` |  |
| `pathsRemoved` | `number` |  |
| `formsRewritten` | `number` |  |
| `images` | `RedactionImageOutcome[]` |  |

### RedactionSearchOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RedactionSearchOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `pages?` | `number[]` |  |
| `caseSensitive?` | `boolean` |  |
| `wholeWord?` | `boolean` |  |
| `overlayText?` | `string` |  |
| `fillColor?` | `string` |  |

### RemoteAnnotationChanges

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RemoteAnnotationChanges
```

| Property | Type | Description |
| --- | --- | --- |
| `upsert` | `PdfAnnotation[]` |  |
| `remove` | `string[]` |  |

### RenderedPageImage

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RenderedPageImage
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `data` | `Uint8Array` |  |
| `matrix` | `Matrix` |  |

### ReplaceTextResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ReplaceTextResult
```

| Property | Type | Description |
| --- | --- | --- |
| `replaced` | `number` |  |
| `failed` | `{ id: string; text: string; reason: ContentEditFailure; message: string }[]` |  |

### ResetFormAction

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ResetFormAction
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'resetForm'` |  |
| `fields` | `string[]` |  |
| `isExclude` | `boolean` |  |

### ResizePagesOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ResizePagesOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `anchor?` | `PageAnchor` |  |
| `scaleContent` | `boolean` |  |
| `fit?` | `'fit' \| 'fill'` |  |
| `margin?` | `number` |  |

### RestyleResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RestyleResult extends TextEditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `rect?` | `PdfRect` |  |
| `isSynthetic?` | `boolean` |  |
| `ok` | `boolean` | Inherited from TextEditResult. |
| `reason?` | `ContentEditFailure \| undefined` | Inherited from TextEditResult. |
| `message?` | `string \| undefined` | Inherited from TextEditResult. |
| `usedFont?` | `"original" \| "embedded" \| "standard" \| undefined` | Inherited from TextEditResult. |
| `fontNames?` | `string[] \| undefined` | Inherited from TextEditResult. |
| `missing?` | `string \| undefined` | Inherited from TextEditResult. |
| `widthChange?` | `number \| undefined` | Inherited from TextEditResult. |

### RevocationAnswer

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RevocationAnswer
```

| Property | Type | Description |
| --- | --- | --- |
| `status` | `'good' \| 'revoked' \| 'unknown'` |  |
| `revokedAt?` | `Date \| string` |  |
| `reason?` | `string` |  |

### RichTextDefaults

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RichTextDefaults
```

| Property | Type | Description |
| --- | --- | --- |
| `fontSize` | `number` |  |
| `color` | `string` |  |
| `fontFamily` | `string` |  |
| `align` | `RichTextAlign` |  |

### RichTextLine

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RichTextLine
```

| Property | Type | Description |
| --- | --- | --- |
| `pieces` | `{ text: string; style: ResolvedStyle; width: number }[]` |  |
| `width` | `number` |  |
| `fontSize` | `number` |  |
| `align` | `RichTextAlign` |  |

### RichTextParagraph

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RichTextParagraph
```

| Property | Type | Description |
| --- | --- | --- |
| `runs` | `RichTextRun[]` |  |
| `align?` | `RichTextAlign` |  |

### RichTextRun

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface RichTextRun
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `bold?` | `boolean` |  |
| `italic?` | `boolean` |  |
| `underline?` | `boolean` |  |
| `strikethrough?` | `boolean` |  |
| `color?` | `string` |  |
| `fontSize?` | `number` |  |
| `fontFamily?` | `string` |  |

### SanitizeOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SanitizeOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `metadata?` | `boolean` | Document information, XMP packets and private application data. |
| `hiddenLayers?` | `boolean` | Layers that are switched off, together with the page content that belongs to them. |
| `attachments?` | `boolean` | Embedded files and file attachment annotations. |
| `scripts?` | `boolean` | JavaScript, open actions and additional actions. |
| `comments?` | `boolean` | Every annotation except links and form fields. |

### SanitizeReport

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SanitizeReport
```

| Property | Type | Description |
| --- | --- | --- |
| `metadata` | `number` |  |
| `hiddenLayers` | `number` |  |
| `attachments` | `number` |  |
| `scripts` | `number` |  |
| `comments` | `number` |  |
| `before` | `number` |  |
| `after` | `number` |  |

### SanitizeResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SanitizeResult
```

| Property | Type | Description |
| --- | --- | --- |
| `bytes` | `PdfBytes` |  |
| `report` | `SanitizeReport` |  |

### SaveOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SaveOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `allowMissingGlyphs?` | `boolean` |  |
| `objectStreams?` | `boolean` |  |
| `mode?` | `SaveMode` |  |
| `compress?` | `boolean` |  |
| `flatten?` | `FlattenMode` |  |
| `linearize?` | `boolean` |  |

### SaveResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SaveResult
```

| Property | Type | Description |
| --- | --- | --- |
| `bytes` | `PdfBytes` |  |
| `mode` | `'incremental' \| 'full'` |  |
| `redactions` | `RedactionReport[]` |  |
| `missingGlyphs?` | `MissingGlyphReport` | Characters that were written without a glyph, and their scripts; absent when every character was drawn. |

### SignatureAppearanceOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SignatureAppearanceOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `text?` | `string[]` |  |
| `image?` | `Uint8Array` |  |
| `showDate?` | `boolean` |  |
| `showReason?` | `boolean` |  |
| `showLocation?` | `boolean` |  |
| `fontSize?` | `number` |  |
| `textColor?` | `[number, number, number]` |  |
| `borderColor?` | `[number, number, number] \| null` |  |
| `borderWidth?` | `number` |  |
| `backgroundColor?` | `[number, number, number] \| null` |  |

### SignatureFieldInfo

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SignatureFieldInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `pageIndex` | `number` |  |
| `rect` | `PdfRect` |  |
| `isSigned` | `boolean` |  |
| `isRequired` | `boolean` |  |
| `isReadOnly` | `boolean` |  |
| `lock?` | `SignatureFieldLock` |  |

### SignatureFieldLock

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SignatureFieldLock
```

| Property | Type | Description |
| --- | --- | --- |
| `action` | `'all' \| 'include' \| 'exclude'` |  |
| `fields` | `string[]` |  |

### SignatureFieldPlacement

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SignatureFieldPlacement
```

| Property | Type | Description |
| --- | --- | --- |
| `name?` | `string` |  |
| `pageIndex` | `number` |  |
| `rect` | `[number, number, number, number]` |  |

### SignatureInfo

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SignatureInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `signerName?` | `string` |  |
| `signedAt?` | `string` |  |
| `reason?` | `string` |  |
| `location?` | `string` |  |
| `filter?` | `string` |  |
| `subFilter?` | `string` |  |
| `byteRange?` | `number[]` |  |
| `coversWholeFile` | `boolean` |  |
| `hasLaterChanges` | `boolean` |  |
| `integrity` | `'unchecked' \| 'intact' \| 'modified' \| 'unsupported'` |  |

### SignDigestInfo

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SignDigestInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `algorithm` | `'RSASSA-PKCS1-v1_5' \| 'ECDSA'` |  |
| `hash` | `HashName` |  |
| `curve?` | `'P-256' \| 'P-384' \| 'P-521'` |  |
| `signedAttributes` | `Uint8Array` |  |

### SignPdfOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SignPdfOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `certificate?` | `Uint8Array \| string` |  |
| `certificateChain?` | `(Uint8Array \| string)[]` |  |
| `privateKey?` | `string \| CryptoKey` |  |
| `signDigest?` | `SignDigestCallback` |  |
| `pkcs12?` | `Uint8Array \| ArrayBuffer` |  |
| `pkcs12Password?` | `string` |  |
| `timestamp?` | `TimestampCallback` |  |
| `reason?` | `string` |  |
| `location?` | `string` |  |
| `contactInfo?` | `string` |  |
| `name?` | `string` |  |
| `field?` | `string \| SignatureFieldPlacement` |  |
| `appearance?` | `SignatureAppearanceOptions \| false` |  |
| `certificationLevel?` | `1 \| 2 \| 3` |  |
| `certify?` | `PdfCertificationPermission` |  |
| `subFilter?` | `PdfSignatureSubFilter` |  |
| `signedAt?` | `Date` |  |
| `placeholderSize?` | `number` |  |
| `password?` | `string` |  |
| `lockFields?` | `PdfFieldLock` |  |

### SplitNaming

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SplitNaming
```

| Property | Type | Description |
| --- | --- | --- |
| `baseName?` | `string` |  |

### SplitPart

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SplitPart
```

| Property | Type | Description |
| --- | --- | --- |
| `bytes` | `PdfBytes` |  |
| `pageIndexes` | `number[]` |  |
| `name` | `string` |  |
| `title?` | `string` |  |

### StampImageOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface StampImageOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `rect?` | `PdfRect` |  |
| `position?` | `StampPosition` |  |
| `width?` | `number` |  |
| `height?` | `number` |  |
| `opacity?` | `number` |  |
| `rotation?` | `number` |  |
| `layer?` | `'over' \| 'under'` |  |
| `margin?` | `number` |  |

### StampTextOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface StampTextOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `position?` | `StampPosition` |  |
| `fontSize?` | `number` |  |
| `color?` | `string` |  |
| `opacity?` | `number` |  |
| `rotation?` | `number` |  |
| `font?` | `StandardFont` |  |
| `layer?` | `'over' \| 'under'` |  |
| `margin?` | `number` |  |
| `fonts?` | `FontRegistry` |  |

### SubmitFormAction

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SubmitFormAction
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'submitForm'` |  |
| `url` | `string` |  |
| `flags` | `number` |  |
| `format` | `SubmitFormat` |  |
| `method` | `'get' \| 'post'` |  |
| `fields` | `string[]` |  |
| `isExclude` | `boolean` |  |
| `includeEmpty` | `boolean` |  |

### SyncableDocument

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SyncableDocument
```

| Property | Type | Description |
| --- | --- | --- |
| `on` | `(event: DocumentSyncEvent, listener: (payload: object) => void) => () => void` |  |
| `getFormValues` | `() => Record<string, FormSyncValue>` |  |
| `setFormValues` | `(values: Record<string, FormSyncValue>) => unknown` |  |
| `getFormField?` | `(name: string) => { calculation?: unknown; scripts?: { calculate?: string } } \| undefined` |  |
| `getPages` | `() => PageSyncPage[]` |  |
| `movePages` | `(indices: number[], target: number) => void` |  |
| `rotatePages` | `(indices: number[], degrees?: number) => void` |  |
| `deletePages` | `(indices: number[]) => void` |  |
| `insertBlankPage` | `(at: number, size?: PageSyncSize) => number` |  |

### SyncAnnotationChanges

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SyncAnnotationChanges
```

| Property | Type | Description |
| --- | --- | --- |
| `added` | `PdfAnnotation[]` |  |
| `changed` | `{ before: PdfAnnotation; after: PdfAnnotation }[]` |  |
| `removed` | `PdfAnnotation[]` |  |
| `source` | `string` |  |

### SyncClock

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SyncClock
```

| Property | Type | Description |
| --- | --- | --- |
| `counter` | `number` |  |
| `actor` | `string` |  |

### SyncConflict

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SyncConflict
```

| Property | Type | Description |
| --- | --- | --- |
| `annotationId` | `string` |  |
| `reason` | `'older-write' \| 'removed'` |  |
| `keys` | `string[]` |  |
| `operation` | `SyncOperation` |  |
| `winner` | `SyncClock` |  |

### SyncOperation

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SyncOperation
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `kind` | `SyncOperationKind` |  |
| `annotationId` | `string` |  |
| `payload` | `{ [key: string]: SyncJson }` |  |
| `author` | `string` |  |
| `clock` | `SyncClock` |  |

### SyncSnapshot

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SyncSnapshot
```

| Property | Type | Description |
| --- | --- | --- |
| `version` | `1` |  |
| `counter` | `number` |  |
| `entries` | `SyncSnapshotEntry[]` |  |
| `forms?` | `FormSyncSnapshot` |  |
| `pages?` | `PageSyncSnapshot` |  |

### SyncSnapshotEntry

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface SyncSnapshotEntry
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `added?` | `SyncClock` |  |
| `removed?` | `SyncClock` |  |
| `groups` | `{ [group: string]: { clock: SyncClock; values: { [key: string]: SyncJson } } }` |  |
| `replies` | `{ [replyId: string]: { clock: SyncClock; added?: SyncClock; removed?: SyncClock; reply?: { [key: string]: SyncJson }; }; }` |  |

### TextEditResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface TextEditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `ok` | `boolean` |  |
| `reason?` | `ContentEditFailure` |  |
| `message?` | `string` |  |
| `usedFont?` | `'original' \| 'embedded' \| 'standard'` |  |
| `fontNames?` | `string[]` |  |
| `missing?` | `string` |  |
| `widthChange?` | `number` |  |

### TextLayerResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface TextLayerResult
```

| Property | Type | Description |
| --- | --- | --- |
| `words` | `number` |  |
| `skippedWords` | `number` |  |

### TextLayerWord

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface TextLayerWord
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `rect` | `PdfRect` |  |
| `rotation?` | `TextLayerRotation` | Direction of the baseline in page space, counter-clockwise in degrees. Left out, the word reads upright on the page as it is displayed, so it follows the rotation of the page. |

### TextMatch

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface TextMatch
```

| Property | Type | Description |
| --- | --- | --- |
| `start` | `number` |  |
| `end` | `number` |  |
| `text` | `string` |  |
| `rects` | `PdfRect[]` |  |

### TextMove

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface TextMove
```

| Property | Type | Description |
| --- | --- | --- |
| `dx` | `number` |  |
| `dy` | `number` |  |

### TextMoveResult

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface TextMoveResult extends TextEditResult
```

| Property | Type | Description |
| --- | --- | --- |
| `run?` | `TextRun` |  |
| `ok` | `boolean` | Inherited from TextEditResult. |
| `reason?` | `ContentEditFailure \| undefined` | Inherited from TextEditResult. |
| `message?` | `string \| undefined` | Inherited from TextEditResult. |
| `usedFont?` | `"original" \| "embedded" \| "standard" \| undefined` | Inherited from TextEditResult. |
| `fontNames?` | `string[] \| undefined` | Inherited from TextEditResult. |
| `missing?` | `string \| undefined` | Inherited from TextEditResult. |
| `widthChange?` | `number \| undefined` | Inherited from TextEditResult. |

### TextParagraph

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface TextParagraph
```

| Property | Type | Description |
| --- | --- | --- |
| `index` | `number` |  |
| `text` | `string` |  |
| `lines` | `string[]` |  |
| `runs` | `TextRun[]` |  |
| `rect` | `PdfRect` |  |
| `fontName` | `string` |  |
| `baseFont?` | `string` |  |
| `fontSize` | `number` |  |
| `lineHeight` | `number` |  |
| `alignment` | `ParagraphAlignment` | How the lines sit in the block. A rewritten paragraph keeps it. |

### TextRun

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface TextRun
```

| Property | Type | Description |
| --- | --- | --- |
| `index` | `number` |  |
| `operator` | `string` |  |
| `text` | `string` |  |
| `rect` | `PdfRect` |  |
| `fontName` | `string` |  |
| `fontSize` | `number` |  |
| `baseFont?` | `string` |  |
| `origin` | `PdfPoint` |  |
| `matrix` | `Matrix` |  |
| `advance` | `number` |  |
| `isInvisible?` | `boolean` | Drawn with the invisible render mode, as a text layer over a scan is. |

### TextStyle

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface TextStyle
```

| Property | Type | Description |
| --- | --- | --- |
| `font?` | `string` | A standard font, or the name of a supplied font. |
| `fontSize?` | `number` |  |
| `color?` | `string` |  |
| `isBold?` | `boolean` |  |
| `isItalic?` | `boolean` |  |

### TimestampRequestInfo

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface TimestampRequestInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `hash` | `'SHA-256'` |  |
| `digest` | `Uint8Array` |  |

### ValidationDataRequest

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ValidationDataRequest
```

| Property | Type | Description |
| --- | --- | --- |
| `certificate` | `PdfCertificateInfo` |  |
| `issuer` | `PdfCertificateInfo` |  |
| `ocspUrls` | `string[]` |  |
| `crlUrls` | `string[]` |  |

### ValidationDataResponse

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ValidationDataResponse
```

| Property | Type | Description |
| --- | --- | --- |
| `ocsp?` | `Uint8Array` |  |
| `crl?` | `Uint8Array` |  |

### VerifySignaturesOptions

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface VerifySignaturesOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `trustedRoots?` | `(Uint8Array \| string)[]` |  |
| `trustLists?` | `PdfTrustList[]` | Trust lists from `loadTrustList`. A list past its expiry date is not used and is named in the result. |
| `now?` | `Date` |  |
| `password?` | `string` |  |
| `ocsps?` | `Uint8Array[]` |  |
| `crls?` | `Uint8Array[]` |  |
| `checkRevocation?` | `RevocationCallback` |  |
| `requireRevocation?` | `boolean` |  |
| `limits?` | `Partial<PdfLimits>` |  |

### XfdfImport

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface XfdfImport
```

| Property | Type | Description |
| --- | --- | --- |
| `annotations` | `AnnotationInput[]` |  |
| `fields` | `Record<string, FormValue>` |  |

### ZipEntry

Kind: interface. Import from `@birchui/pdf/engine`.

```ts
interface ZipEntry
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `bytes` | `Uint8Array` |  |
| `modified?` | `Date` |  |

### AccessibilityCode

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type AccessibilityCode =
  | 'no-title'
  | 'title-not-shown'
  | 'no-language'
  | 'not-tagged'
  | 'figure-without-alt'
  | 'untagged-content'
  | 'reading-order'
  | 'page-without-text'
  | 'field-without-tooltip'
  | 'tab-order'
  | 'no-bookmarks';
```

### AnnotationFont

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type AnnotationFont = 'Helvetica' | 'Times' | 'Courier';
```

### AnnotationInput

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type AnnotationInput = Partial<Omit<PdfAnnotation, 'type' | 'pageIndex'>> &
  Pick<PdfAnnotation, 'type' | 'pageIndex'>;
```

### AnnotationPatch

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type AnnotationPatch = Partial<Omit<PdfAnnotation, 'id'>>;
```

### AnnotationType

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type AnnotationType =
  | TextMarkupType
  | ShapeType
  | MeasurementType
  | 'note'
  | 'caret'
  | 'freeText'
  | 'ink'
  | 'stamp'
  | 'image'
  | 'signature'
  | 'redaction'
  | 'link'
  | MediaAnnotationType;
```

### ArchiveRule

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ArchiveRule =
  | 'encryption'
  | 'fonts'
  | 'metadata'
  | 'output-intent'
  | 'javascript'
  | 'launch-action'
  | 'embedded-files'
  | 'transparency'
  | 'lzw'
  | 'file-id';
```

### ArchiveSeverity

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ArchiveSeverity = 'error' | 'warning' | 'info';
```

### AsyncRedactionImageDecoder

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type AsyncRedactionImageDecoder = (
  image: PageRedactionImage,
) => DecodedRedactionImage | undefined | Promise<DecodedRedactionImage | undefined>;
```

### AttachmentInput

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type AttachmentInput = FileSpecInput;
```

### AttachmentRelationship

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type AttachmentRelationship =
  'Source' | 'Data' | 'Alternative' | 'Supplement' | 'EncryptedPayload' | 'FormData' | 'Schema' | 'Unspecified';
```

### BorderStyle

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type BorderStyle = 'solid' | 'dashed' | 'dotted' | 'cloudy';
```

### BuiltInStamp

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type BuiltInStamp =
  'Approved' | 'Draft' | 'Confidential' | 'Final' | 'NotApproved' | 'ForComment' | 'Void' | 'Received';
```

### ChainProblemCode

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ChainProblemCode =
  'ca-not-valid-at-signing' | 'not-a-ca' | 'key-usage' | 'path-length' | 'name-constraints';
```

### ChainStatus

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ChainStatus = 'trusted' | 'untrusted' | 'self-signed' | 'incomplete';
```

### ChangeSource

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ChangeSource = 'user' | 'api' | 'history' | 'import' | 'remote';
```

### CheckResult

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type CheckResult = 'valid' | 'invalid' | 'unsupported';
```

### CompareInput

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type CompareInput = Uint8Array | ArrayBuffer | ComparableDocument;
```

### CompareReportFormat

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type CompareReportFormat = 'html' | 'csv' | 'json';
```

### ContentEditFailure

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ContentEditFailure =
  | 'stale-hit'
  | 'unsupported-font'
  | 'missing-glyphs'
  | 'empty-text'
  | 'unsupported-image'
  | 'not-invertible'
  | 'unsupported-object';
```

### DocumentChangeReason

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type DocumentChangeReason =
  | 'metadata'
  | 'outline'
  | 'attachments'
  | 'watermark'
  | 'headerFooter'
  | 'bates'
  | 'crop'
  | 'pageLabels'
  | 'pageText'
  | 'pageImage'
  | 'pageObject'
  | 'background'
  | 'flatten'
  | 'history';
```

### EncodedImageMimeType

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type EncodedImageMimeType = 'image/jpeg' | 'image/jp2' | 'image/x-jbig2' | 'image/g3fax';
```

### EncryptionAlgorithm

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type EncryptionAlgorithm = 'rc4-40' | 'rc4-128' | 'aes-128' | 'aes-256';
```

### ExtractedImageStatus

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ExtractedImageStatus = 'decoded' | 'encoded-only' | 'unsupported';
```

### FieldAction

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FieldAction =
  | SubmitFormAction
  | ResetFormAction
  | { type: 'javaScript'; script: string }
  | { type: 'named'; name: string }
  | { type: 'goTo'; pageIndex?: number; destination?: string }
  | { type: 'uri'; uri: string }
  | { type: 'hide'; fields: string[]; isHidden: boolean }
  | { type: 'other'; subtype: string };
```

### FieldActionTrigger

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FieldActionTrigger =
  | 'activate'
  | 'mouseUp'
  | 'mouseDown'
  | 'mouseEnter'
  | 'mouseExit'
  | 'focus'
  | 'blur'
  | 'keystroke'
  | 'format'
  | 'validate'
  | 'calculate';
```

### FieldAlignment

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FieldAlignment = 'left' | 'right' | 'top' | 'bottom' | 'center' | 'middle';
```

### FieldFormat

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FieldFormat =
  | {
      kind: 'number';
      decimals: number;
      separatorStyle: number;
      negativeStyle: number;
      currency: string;
      isCurrencyPrepended: boolean;
    }
  | { kind: 'percent'; decimals: number; separatorStyle: number }
  | { kind: 'date'; pattern: string }
  | { kind: 'time'; pattern: string }
  | { kind: 'special'; mask: 'zip' | 'zip4' | 'phone' | 'ssn' }
  | { kind: 'mask'; mask: string };
```

### FieldScriptReport

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FieldScriptReport = Record<FieldScriptTrigger, FieldScriptInfo>;
```

### FieldScriptTrigger

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FieldScriptTrigger = keyof FieldScripts;
```

### FieldSignatureInput

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FieldSignatureInput =
  | { kind: 'image'; image: AnnotationImage }
  | { kind: 'drawn'; inkList: PdfPoint[][]; strokeWidth?: number; color?: string }
  | { kind: 'typed'; text: string };
```

### FileAttachmentIcon

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FileAttachmentIcon = 'PushPin' | 'Paperclip' | 'Graph' | 'Tag';
```

### FlattenMode

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FlattenMode = 'forms' | 'annotations' | 'all';
```

### FormFieldPatch

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FormFieldPatch = Partial<Omit<FormFieldInput, 'name' | 'type'>> & { widgetIndex?: number };
```

### FormFieldTarget

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FormFieldTarget = string | { name: string; widgetIndex?: number };
```

### FormFieldType

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FormFieldType = 'text' | 'checkbox' | 'radio' | 'combo' | 'list' | 'signature' | 'button';
```

### FormIssueCode

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FormIssueCode = 'required' | 'format' | 'range' | 'script' | 'maxLength' | 'pattern';
```

### FormJson

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FormJson = { [name: string]: FormJsonValue };
```

### FormJsonValue

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FormJsonValue = string | boolean | null | string[] | FormJson;
```

### FormMessageKey

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FormMessageKey =
  | 'required'
  | 'maxLength'
  | 'number'
  | 'rangeMin'
  | 'rangeMax'
  | 'date'
  | 'time'
  | 'special'
  | 'mask'
  | 'script'
  | 'option'
  | 'readOnlyType';
```

### FormMessageParams

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FormMessageParams = Record<string, string | number>;
```

### FormSyncValue

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FormSyncValue = string | string[] | boolean | null;
```

### FormValue

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type FormValue = string | string[] | boolean | null;
```

### HashName

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type HashName = 'SHA-1' | 'SHA-256' | 'SHA-384' | 'SHA-512';
```

### ImageDecoder

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ImageDecoder = (
  bytes: Uint8Array,
  mimeType: string,
) => DecodedImage | undefined | Promise<DecodedImage | undefined>;
```

### ImageFileFormat

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ImageFileFormat = 'png' | 'jpeg' | 'gif' | 'bmp' | 'tiff' | 'webp' | 'svg';
```

### ImageMove

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ImageMove = { dx: number; dy: number } | { rect: PdfRect } | { matrix: Matrix };
```

### ImagePageSize

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ImagePageSize = 'image' | 'a4' | 'letter' | { width: number; height: number };
```

### KeyUsage

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type KeyUsage =
  | 'digitalSignature'
  | 'nonRepudiation'
  | 'keyEncipherment'
  | 'dataEncipherment'
  | 'keyAgreement'
  | 'keyCertSign'
  | 'cRLSign'
  | 'encipherOnly'
  | 'decipherOnly';
```

### LineEnding

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type LineEnding = 'none' | 'openArrow' | 'closedArrow' | 'circle' | 'square' | 'diamond' | 'butt';
```

### LinkAction

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type LinkAction =
  | { kind: 'uri'; uri: string }
  | ({ kind: 'goto' } & LinkDestination)
  | { kind: 'named'; name: string }
  | { kind: 'other'; actionType: string; name?: string };
```

### LinkFit

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type LinkFit = 'page' | 'width' | 'height' | 'box' | 'boxWidth' | 'boxHeight' | 'point' | 'rect';
```

### LinkHighlightMode

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type LinkHighlightMode = 'none' | 'invert' | 'outline' | 'push';
```

### MailFormat

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type MailFormat = 'msg' | 'eml';
```

### MailPageSize

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type MailPageSize = 'a4' | 'letter' | { width: number; height: number };
```

### MailPdfWarningCode

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type MailPdfWarningCode =
  | 'substituted-characters'
  | 'remote-image'
  | 'missing-image'
  | 'unsupported-image'
  | 'unsafe-link'
  | 'embedded-message-converted';
```

### Measurable

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type Measurable = Pick<PdfAnnotation, 'type' | 'line' | 'vertices' | 'measureScale'> &
  Partial<Pick<PdfAnnotation, 'label' | 'rect'>>;
```

### MeasurementType

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type MeasurementType = 'distance' | 'perimeter' | 'area' | 'count' | 'arc' | 'angle';
```

### MediaAnnotationType

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type MediaAnnotationType = 'fileAttachment' | 'sound' | 'movie' | 'screen' | 'richMedia' | 'media3d';
```

### NoteIcon

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type NoteIcon = 'comment' | 'note' | 'key' | 'help' | 'paragraph' | 'insert';
```

### ObjectOrder

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ObjectOrder = 'front' | 'forward' | 'backward' | 'back';
```

### OfficeBlock

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type OfficeBlock =
  | { kind: 'heading'; level: 1 | 2 | 3; runs: OfficeRun[]; pageIndex: number }
  | { kind: 'paragraph'; runs: OfficeRun[]; pageIndex: number }
  | { kind: 'list'; isOrdered: boolean; marker: string; runs: OfficeRun[]; pageIndex: number }
  | { kind: 'table'; rows: string[][]; pageIndex: number };
```

### PadesLevel

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PadesLevel = 'B-B' | 'B-T' | 'B-LT' | 'B-LTA' | 'not-pades';
```

### PageAnchor

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageAnchor =
  | 'center'
  | 'top-left'
  | 'top-center'
  | 'top-right'
  | 'center-left'
  | 'center-right'
  | 'bottom-left'
  | 'bottom-center'
  | 'bottom-right';
```

### PageBoxesPatch

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageBoxesPatch = { media?: PdfRect } & Partial<Record<Exclude<PageBoxKey, 'media'>, PdfRect | null>>;
```

### PageBoxKey

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageBoxKey = keyof PageBoxes;
```

### PageComparisonStatus

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageComparisonStatus = 'unchanged' | 'changed' | 'added' | 'removed' | 'moved';
```

### PageImageFormat

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageImageFormat = 'raw' | 'jpeg' | 'jpeg2000' | 'jbig2' | 'ccitt' | 'unknown';
```

### PageLabelStyle

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageLabelStyle = 'decimal' | 'roman-upper' | 'roman-lower' | 'alpha-upper' | 'alpha-lower' | 'none';
```

### PageLayerKind

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageLayerKind = 'watermark' | 'header' | 'footer' | 'background' | 'pageNumbers' | 'bates';
```

### PageMarkKind

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageMarkKind = 'tick' | 'cross' | 'dot' | 'circle';
```

### PageNumberPosition

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageNumberPosition =
  'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
```

### PageObjectKind

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageObjectKind = 'text' | 'image' | 'path' | 'form' | 'shading' | 'inlineImage';
```

### PageObjectLayer

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageObjectLayer = 'watermark' | 'header' | 'footer' | 'background' | 'pageNumbers' | 'bates';
```

### PagesChangeReason

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PagesChangeReason =
  'move' | 'rotate' | 'delete' | 'insert' | 'merge' | 'history' | 'redaction' | 'crop' | 'content';
```

### PageSelector

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageSelector = 'all' | 'odd' | 'even' | string;
```

### PageSourceKind

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageSourceKind = 'original' | 'merged' | 'blank';
```

### PageSyncOperationKind

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageSyncOperationKind = 'insert' | 'move' | 'rotate' | 'delete';
```

### PageTextDirection

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageTextDirection = 'ltr' | 'rtl' | 'ttb';
```

### PageTextOptions

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageTextOptions = Omit<StructuredTextOptions, 'exclude'>;
```

### PageTextOrder

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PageTextOrder = 'reading' | 'content';
```

### PdfARule

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfARule =
  | 'header'
  | 'encryption'
  | 'file-id'
  | 'stream'
  | 'output-intent'
  | 'device-colour'
  | 'transparency'
  | 'image'
  | 'content'
  | 'xobject'
  | 'fonts'
  | 'annotations'
  | 'actions'
  | 'metadata'
  | 'forms'
  | 'embedded-files';
```

### PdfBytes

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfBytes = Uint8Array<ArrayBuffer>;
```

### PdfCertificationPermission

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfCertificationPermission = 'no-changes' | 'form-filling' | 'annotations-and-forms';
```

### PdfCollectionFieldType

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfCollectionFieldType =
  'text' | 'date' | 'number' | 'fileName' | 'description' | 'modified' | 'created' | 'size' | 'compressedSize';
```

### PdfCollectionValue

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfCollectionValue = string | number | Date;
```

### PdfCollectionView

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfCollectionView = 'details' | 'tile' | 'hidden';
```

### PdfFieldLock

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfFieldLock = 'all' | { include: string[] } | { exclude: string[] };
```

### PdfFieldType

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfFieldType = FormFieldType | 'barcode';
```

### PdfFontFallback

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfFontFallback = (
  script: TextScript,
  characters: string,
) => Uint8Array | PdfFontSource | undefined | Promise<Uint8Array | PdfFontSource | undefined>;
```

### PdfInitialPageLayout

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfInitialPageLayout =
  'single' | 'continuous' | 'two-column' | 'two-column-cover' | 'two-page' | 'two-page-cover';
```

### PdfInitialPageMode

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfInitialPageMode = 'none' | 'outlines' | 'thumbnails' | 'fullscreen' | 'layers' | 'attachments';
```

### PdfLimitName

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfLimitName = keyof PdfLimits;
```

### PdfPermissionName

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfPermissionName = keyof PdfPermissions | 'changeSecurity';
```

### PdfQuad

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfQuad = [bottomLeft: PdfPoint, bottomRight: PdfPoint, topRight: PdfPoint, topLeft: PdfPoint];
```

### PdfRect

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfRect = [x1: number, y1: number, x2: number, y2: number];
```

### PdfSegment

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfSegment = [x1: number, y1: number, x2: number, y2: number];
```

### PdfSignatureSubFilter

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfSignatureSubFilter = 'adbe.pkcs7.detached' | 'ETSI.CAdES.detached';
```

### PdfSignatureSummary

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PdfSignatureSummary =
  'trusted' | 'valid-untrusted' | 'changed-after-signing' | 'revoked' | 'invalid' | 'unsupported';
```

### Pkcs12ErrorReason

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type Pkcs12ErrorReason = 'password-incorrect' | 'unsupported' | 'malformed';
```

### PresenceMessage

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type PresenceMessage =
  { type: 'presence'; state: PresenceState; sentAt: number } | { type: 'leave'; actorId: string; sentAt: number };
```

### RecognizeTextCallback

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type RecognizeTextCallback = (image: OcrPageImage) => OcrWord[] | Promise<OcrWord[]>;
```

### RedactionImageDecoder

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type RedactionImageDecoder = (image: PageRedactionImage) => DecodedRedactionImage | undefined;
```

### RedactionImageRemovalReason

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type RedactionImageRemovalReason = 'covered' | 'undecodable' | 'mask-undecodable' | 'inline-image';
```

### RedactionPattern

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type RedactionPattern = RedactionPatternName;
```

### RedactionPatternName

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type RedactionPatternName = keyof typeof REDACTION_PATTERNS;
```

### RedactionQuery

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type RedactionQuery =
  | string
  | RegExp
  | { text: string; matchCase?: boolean; wholeWord?: boolean }
  | { pattern: RegExp }
  | { preset: RedactionPatternName };
```

### ReplyInput

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ReplyInput = string | (Partial<AnnotationReply> & { contents: string });
```

### ReviewStatus

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ReviewStatus = 'none' | 'accepted' | 'rejected' | 'cancelled' | 'completed';
```

### RevisionChangeKind

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type RevisionChangeKind =
  'form' | 'annotation' | 'signature' | 'timestamp' | 'dss' | 'appearance' | 'metadata' | 'other';
```

### RevocationCallback

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type RevocationCallback = (
  certificate: PdfCertificateInfo,
  issuer: PdfCertificateInfo,
) => RevocationAnswer | Promise<RevocationAnswer>;
```

### RevocationStatus

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type RevocationStatus = 'good' | 'revoked' | 'unknown' | 'not-checked';
```

### RichTextAlign

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type RichTextAlign = 'left' | 'center' | 'right';
```

### SaveMode

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type SaveMode = 'auto' | 'incremental' | 'full';
```

### ShapeType

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ShapeType = 'rectangle' | 'ellipse' | 'line' | 'arrow' | 'polygon' | 'polyline';
```

### SignDigestCallback

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type SignDigestCallback = (digest: PdfBytes, info: SignDigestInfo) => Promise<Uint8Array> | Uint8Array;
```

### SimpleCalculation

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type SimpleCalculation =
  { op: 'sum' | 'product' | 'average' | 'min' | 'max'; fields: string[] } | { expression: string };
```

### SplitOptions

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type SplitOptions =
  | { ranges: string | readonly (readonly [number, number])[] }
  | { every: number }
  | { byBookmark: { level?: number } }
  | { maxBytes: number }
  | { byBlankPages: true };
```

### StampPosition

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type StampPosition = PageAnchor | { x: number; y: number };
```

### StandardFont

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type StandardFont =
  | 'Helvetica'
  | 'Helvetica-Bold'
  | 'Helvetica-Oblique'
  | 'Helvetica-BoldOblique'
  | 'Times-Roman'
  | 'Times-Bold'
  | 'Times-Italic'
  | 'Times-BoldItalic'
  | 'Courier'
  | 'Courier-Bold'
  | 'Courier-Oblique'
  | 'Courier-BoldOblique'
  | 'Symbol'
  | 'ZapfDingbats';
```

### StandardFontName

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type StandardFontName =
  | 'Helvetica'
  | 'Helvetica-Bold'
  | 'Helvetica-Oblique'
  | 'Helvetica-BoldOblique'
  | 'Times-Roman'
  | 'Times-Bold'
  | 'Times-Italic'
  | 'Times-BoldItalic'
  | 'Courier'
  | 'Courier-Bold'
  | 'Courier-Oblique'
  | 'Courier-BoldOblique';
```

### SubmitFormat

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type SubmitFormat = 'fdf' | 'xfdf' | 'html' | 'pdf';
```

### SyncJson

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type SyncJson = string | number | boolean | null | SyncJson[] | { [key: string]: SyncJson };
```

### SyncOperationKind

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type SyncOperationKind = 'add' | 'update' | 'remove' | 'reply-add' | 'reply-update' | 'reply-remove';
```

### TabOrderMode

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type TabOrderMode = 'row' | 'column' | 'structure' | 'manual' | 'unspecified';
```

### TextChangeType

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type TextChangeType = 'inserted' | 'deleted' | 'moved';
```

### TextLayerRotation

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type TextLayerRotation = 0 | 90 | 180 | 270;
```

### TextMarkupType

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type TextMarkupType = 'highlight' | 'underline' | 'strikeout' | 'squiggly';
```

### TimestampCallback

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type TimestampCallback = (data: Uint8Array, info: TimestampRequestInfo) => Promise<Uint8Array> | Uint8Array;
```

### ValidationDataCallback

Kind: type. Import from `@birchui/pdf/engine`.

```ts
type ValidationDataCallback = (
  request: ValidationDataRequest,
) => ValidationDataResponse | undefined | Promise<ValidationDataResponse | undefined>;
```

## @birchui/pdf/fonts

### bidiLevels

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function bidiLevels(codes: readonly number[], base: TextDirection): number[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `codes` | `readonly number[]` |  |
| `base` | `TextDirection` |  |

### buildToUnicode

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function buildToUnicode(mapping: ReadonlyMap<number, string>): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `mapping` | `ReadonlyMap<number, string>` |  |

### buildWidths

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function buildWidths(font: TrueTypeFont, glyphs: readonly number[], aliases: ReadonlyMap<number, number> = new Map()): PdfValue[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `font` | `TrueTypeFont` |  |
| `glyphs` | `readonly number[]` |  |
| `aliases?` | `ReadonlyMap<number, number>` |  |

### componentGlyphs

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function componentGlyphs(data: Uint8Array): number[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |

### createFontPack

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function createFontPack(options: PdfFontPackOptions): PdfFontPack
```

| Parameter | Type | Description |
| --- | --- | --- |
| `options` | `PdfFontPackOptions` |  |

### createFontRegistry

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function createFontRegistry(fonts: readonly PdfFontSource[] = []): FontRegistry
```

| Parameter | Type | Description |
| --- | --- | --- |
| `fonts?` | `readonly PdfFontSource[]` |  |

### detectScript

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function detectScript(code: number): TextScript
```

| Parameter | Type | Description |
| --- | --- | --- |
| `code` | `number` |  |

### embedFontSubset

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function embedFontSubset(sink: FontSink, font: TrueTypeFont, fallbackName: string, mapping: ReadonlyMap<number, string>, aliases: ReadonlyMap<number, number> = new Map()): PdfRef
```

| Parameter | Type | Description |
| --- | --- | --- |
| `sink` | `FontSink` |  |
| `font` | `TrueTypeFont` |  |
| `fallbackName` | `string` |  |
| `mapping` | `ReadonlyMap<number, string>` |  |
| `aliases?` | `ReadonlyMap<number, number>` |  |

### glyphAdvance

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function glyphAdvance(font: TrueTypeFont, glyph: number): number
```

| Parameter | Type | Description |
| --- | --- | --- |
| `font` | `TrueTypeFont` |  |
| `glyph` | `number` |  |

### glyphClosure

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function glyphClosure(font: TrueTypeFont, glyphs: Iterable<number>): Set<number>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `font` | `TrueTypeFont` |  |
| `glyphs` | `Iterable<number>` |  |

### glyphData

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function glyphData(font: TrueTypeFont, glyph: number): Uint8Array
```

| Parameter | Type | Description |
| --- | --- | --- |
| `font` | `TrueTypeFont` |  |
| `glyph` | `number` |  |

### glyphRange

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function glyphRange(font: TrueTypeFont, glyph: number): [number, number]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `font` | `TrueTypeFont` |  |
| `glyph` | `number` |  |

### hasArabicShaping

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function hasArabicShaping(font: TrueTypeFont): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `font` | `TrueTypeFont` |  |

### hasRtl

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function hasRtl(text: string): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |

### isWinAnsi

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function isWinAnsi(code: number): boolean
```

| Parameter | Type | Description |
| --- | --- | --- |
| `code` | `number` |  |

### paragraphDirection

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function paragraphDirection(text: string): TextDirection
```

| Parameter | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |

### parseCff

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function parseCff(data: Uint8Array): CffFont
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |

### parseTrueType

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function parseTrueType(input: Uint8Array): TrueTypeFont
```

| Parameter | Type | Description |
| --- | --- | --- |
| `input` | `Uint8Array` |  |

### postScriptNameOf

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function postScriptNameOf(font: TrueTypeFont, fallback: string): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `font` | `TrueTypeFont` |  |
| `fallback` | `string` |  |

### reorderVisual

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function reorderVisual<T extends { code: number }>(items: readonly T[], base: TextDirection): T[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `items` | `readonly T[]` |  |
| `base` | `TextDirection` |  |

### scriptsOfText

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function scriptsOfText(text: string): TextScript[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |

### shapeArabic

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function shapeArabic(codes: readonly number[], hasGlyph: (code: number) => boolean): VisualChar[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `codes` | `readonly number[]` |  |
| `hasGlyph` | `(code: number) => boolean` |  |

### shapeText

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function shapeText(font: TrueTypeFont, input: readonly ShapingInput[], script: TextScript): ShapedGlyph[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `font` | `TrueTypeFont` |  |
| `input` | `readonly ShapingInput[]` |  |
| `script` | `TextScript` |  |

### showEmbedded

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function showEmbedded(run: EmbeddedText, fontSize: number, renderMode = 0): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `run` | `EmbeddedText` |  |
| `fontSize` | `number` |  |
| `renderMode?` | `unknown` |  |

### subsetCff

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function subsetCff(table: Uint8Array, glyphs: Iterable<number>, aliases: ReadonlyMap<number, number> = new Map(), keepsCids = false): Uint8Array
```

| Parameter | Type | Description |
| --- | --- | --- |
| `table` | `Uint8Array` |  |
| `glyphs` | `Iterable<number>` |  |
| `aliases?` | `ReadonlyMap<number, number>` |  |
| `keepsCids?` | `unknown` |  |

### subsetTrueType

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function subsetTrueType(font: TrueTypeFont, glyphs: Iterable<number>, symbolCodes?: ReadonlyMap<number, number>): Uint8Array
```

| Parameter | Type | Description |
| --- | --- | --- |
| `font` | `TrueTypeFont` |  |
| `glyphs` | `Iterable<number>` |  |
| `symbolCodes?` | `ReadonlyMap<number, number>` |  |

### tableBytes

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function tableBytes(font: TrueTypeFont, tag: string): Uint8Array | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `font` | `TrueTypeFont` |  |
| `tag` | `string` |  |

### tableView

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function tableView(font: TrueTypeFont, tag: string): DataView | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `font` | `TrueTypeFont` |  |
| `tag` | `string` |  |

### toVisual

Kind: function. Import from `@birchui/pdf/fonts`.

```ts
function toVisual(text: string, hasGlyph: (code: number) => boolean = () => true): VisualChar[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `hasGlyph?` | `(code: number) => boolean` |  |

### FontFormatError

Kind: class. Import from `@birchui/pdf/fonts`.

```ts
class FontFormatError extends Error
new FontFormatError(message: string)
```

### PdfMissingGlyphError

Kind: class. Import from `@birchui/pdf/fonts`.

```ts
class PdfMissingGlyphError extends Error
new PdfMissingGlyphError(report: MissingGlyphReport)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly characters` | `string` |  |
| `readonly scripts` | `TextScript[]` |  |

### embedTrueTypeSubset

Kind: const. Import from `@birchui/pdf/fonts`.

```ts
const embedTrueTypeSubset: (sink: FontSink, font: TrueTypeFont, fallbackName: string, mapping: ReadonlyMap<number, string>, aliases?: ReadonlyMap<number, number>) => PdfRef
```

### isCombiningMark

Kind: const. Import from `@birchui/pdf/fonts`.

```ts
const isCombiningMark: (code: number) => boolean
```

### parseFont

Kind: const. Import from `@birchui/pdf/fonts`.

```ts
const parseFont: (input: Uint8Array) => TrueTypeFont
```

### CffDictEntry

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface CffDictEntry
```

| Property | Type | Description |
| --- | --- | --- |
| `operator` | `number` |  |
| `operands` | `CffOperand[]` |  |

### CffFont

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface CffFont
```

| Property | Type | Description |
| --- | --- | --- |
| `names` | `Uint8Array[]` |  |
| `topDict` | `CffDictEntry[]` |  |
| `strings` | `Uint8Array[]` |  |
| `globalSubrs` | `Uint8Array[]` |  |
| `charStrings` | `Uint8Array[]` |  |
| `isCidKeyed` | `boolean` |  |
| `fontDicts` | `CffFontDict[]` |  |
| `fontDictOf` | `Uint8Array` |  |
| `cids?` | `Uint16Array` |  |

### CffFontDict

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface CffFontDict
```

| Property | Type | Description |
| --- | --- | --- |
| `dict` | `CffDictEntry[]` |  |
| `privateDict` | `CffDictEntry[]` |  |
| `subrs` | `Uint8Array[]` |  |

### EmbeddedText

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface EmbeddedText
```

| Property | Type | Description |
| --- | --- | --- |
| `ref` | `PdfRef` |  |
| `fontName` | `string` |  |
| `encoded` | `Uint8Array` |  |
| `width` | `number` |  |
| `ascent` | `number` |  |
| `descent` | `number` |  |
| `isRtl` | `boolean` |  |
| `placements?` | `(GlyphPlacement \| undefined)[]` |  |

### FontRegistry

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface FontRegistry
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly isEmpty` | `boolean` |  |
| `readonly fontNames` | `readonly string[]` |  |
| `add` | `(source: PdfFontSource) => boolean` |  |
| `hasGlyph` | `(code: number) => boolean` |  |
| `covers` | `(text: string) => boolean` |  |
| `needsEmbedding` | `(text: string) => boolean` |  |
| `embed` | `(editor: PdfEditor \| FontSink, text: string, preferredName?: string) => EmbeddedText[]` |  |
| `measure` | `(text: string, preferredName?: string) => number` |  |

### FontSink

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface FontSink
```

| Property | Type | Description |
| --- | --- | --- |
| `add` | `(value: PdfValue) => PdfRef` |  |

### FontTable

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface FontTable
```

| Property | Type | Description |
| --- | --- | --- |
| `offset` | `number` |  |
| `length` | `number` |  |

### GlyphPlacement

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface GlyphPlacement
```

| Property | Type | Description |
| --- | --- | --- |
| `dx` | `number` |  |
| `dy` | `number` |  |
| `rewind` | `number` |  |
| `isHidden?` | `boolean` |  |

### MissingGlyphReport

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface MissingGlyphReport
```

| Property | Type | Description |
| --- | --- | --- |
| `characters` | `string` |  |
| `scripts` | `TextScript[]` |  |

### PdfFontPack

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface PdfFontPack
```

| Property | Type | Description |
| --- | --- | --- |
| `fontFallback` | `PdfFontFallback` |  |
| `preload` | `(scripts?: readonly TextScript[]) => Promise<PdfFontSource[]>` |  |
| `scriptsOf` | `(text: string) => TextScript[]` |  |

### PdfFontPackOptions

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface PdfFontPackOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `fonts` | `Partial<Record<TextScript \| 'default', PdfFontPackEntry>>` |  |
| `load?` | `(url: string, script: TextScript) => Uint8Array \| ArrayBuffer \| Promise<Uint8Array \| ArrayBuffer>` |  |

### PdfFontSource

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface PdfFontSource
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `data` | `Uint8Array` |  |

### PdfTextRasterizer

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface PdfTextRasterizer
```

Draws text the document has no font for. The viewer supplies one that uses a canvas and the fonts of the browser.

| Property | Type | Description |
| --- | --- | --- |
| `measure` | `(text: string, style: RasterTextStyle) => number` | Advance width of the text in points. |
| `rasterize` | `(text: string, style: RasterTextStyle) => RasterizedText \| undefined` |  |

### RasterizedText

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface RasterizedText
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` | Bitmap size in pixels. |
| `height` | `number` |  |
| `coverage` | `Uint8Array` | One byte of ink coverage per pixel, rows from the top. |
| `scale` | `number` | Pixels per point. |
| `originX` | `number` | Pixels from the left edge of the bitmap to the text origin. |
| `baseline` | `number` | Pixels from the top edge of the bitmap to the baseline. |

### RasterTextStyle

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface RasterTextStyle
```

| Property | Type | Description |
| --- | --- | --- |
| `fontSize` | `number` |  |

### ShapingInput

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface ShapingInput
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `number` |  |
| `source` | `string` |  |
| `index` | `number` |  |

### TrueTypeFont

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface TrueTypeFont
```

| Property | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array` |  |
| `tables` | `Map<string, FontTable>` |  |
| `unitsPerEm` | `number` |  |
| `numGlyphs` | `number` |  |
| `numberOfHMetrics` | `number` |  |
| `indexToLocFormat` | `number` |  |
| `bbox` | `[number, number, number, number]` |  |
| `ascent` | `number` |  |
| `descent` | `number` |  |
| `lineGap` | `number` |  |
| `capHeight` | `number` |  |
| `italicAngle` | `number` |  |
| `isFixedPitch` | `boolean` |  |
| `weight` | `number` |  |
| `postScriptName` | `string` |  |
| `familyName` | `string` |  |
| `cmap` | `Map<number, number>` |  |
| `outlines` | `'truetype' \| 'cff'` |  |

### VisualChar

Kind: interface. Import from `@birchui/pdf/fonts`.

```ts
interface VisualChar
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `number` |  |
| `source` | `string` |  |

### PdfFontFallback

Kind: type. Import from `@birchui/pdf/fonts`.

```ts
type PdfFontFallback = (
  script: TextScript,
  characters: string,
) => Uint8Array | PdfFontSource | undefined | Promise<Uint8Array | PdfFontSource | undefined>;
```

### PdfFontPackEntry

Kind: type. Import from `@birchui/pdf/fonts`.

```ts
type PdfFontPackEntry =
  string | Uint8Array | ArrayBuffer | (() => Uint8Array | ArrayBuffer | Promise<Uint8Array | ArrayBuffer>);
```

### ShapedGlyph

Kind: type. Import from `@birchui/pdf/fonts`.

```ts
type ShapedGlyph = LayoutGlyph;
```

### TextDirection

Kind: type. Import from `@birchui/pdf/fonts`.

```ts
type TextDirection = 'ltr' | 'rtl';
```

### TextScript

Kind: type. Import from `@birchui/pdf/fonts`.

```ts
type TextScript =
  | 'latin'
  | 'greek'
  | 'cyrillic'
  | 'armenian'
  | 'hebrew'
  | 'arabic'
  | 'devanagari'
  | 'thai'
  | 'hangul'
  | 'kana'
  | 'han'
  | 'common'
  | 'other';
```

## @birchui/pdf/ocr

### createOcrEngine

Kind: function. Import from `@birchui/pdf/ocr`.

```ts
function createOcrEngine(options: OcrEngineOptions = {}): OcrEngine
```

| Parameter | Type | Description |
| --- | --- | --- |
| `options?` | `OcrEngineOptions` |  |

### decodeBeam

Kind: function. Import from `@birchui/pdf/ocr`.

```ts
function decodeBeam(scores: FrameScores, options: BeamOptions = {}): DecodedCharacter[]
```

CTC prefix beam search. Sums the paths that spell the same text, which greedy decoding cannot do.

| Parameter | Type | Description |
| --- | --- | --- |
| `scores` | `FrameScores` |  |
| `options?` | `BeamOptions` |  |

### decodeGreedy

Kind: function. Import from `@birchui/pdf/ocr`.

```ts
function decodeGreedy(scores: FrameScores): DecodedCharacter[]
```

Best class per frame, with repeats collapsed and blanks dropped.

| Parameter | Type | Description |
| --- | --- | --- |
| `scores` | `FrameScores` |  |

### kernelOf

Kind: function. Import from `@birchui/pdf/ocr`.

```ts
function kernelOf(model: OcrModel, choice: KernelChoice = 'auto'): 'js' | 'wasm'
```

Which arithmetic the model runs on here: `wasm` when the SIMD kernel could be started, else `js`.

| Parameter | Type | Description |
| --- | --- | --- |
| `model` | `OcrModel` |  |
| `choice?` | `KernelChoice` |  |

### ocrModelUrl

Kind: function. Import from `@birchui/pdf/ocr`.

```ts
function ocrModelUrl(): string
```

Where the bundler put the model shipped in the package. The host fetches it; the package never does.

### parseModel

Kind: function. Import from `@birchui/pdf/ocr`.

```ts
function parseModel(bytes: Uint8Array): OcrModel
```

Reads a model file: magic, version, JSON header, then the tensor region. 8-bit tensors are widened here.

| Parameter | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array` |  |

### recognizePageImage

Kind: function. Import from `@birchui/pdf/ocr`.

```ts
function recognizePageImage(model: OcrModel, image: OcrImageInput, options: PageOptions = {}, hooks: PageHooks = {}): Promise<OcrPageResult>
```

Runs the whole pipeline on one page image: clean-up, layout, recognition, and boxes in source pixels.

| Parameter | Type | Description |
| --- | --- | --- |
| `model` | `OcrModel` |  |
| `image` | `OcrImageInput` |  |
| `options?` | `PageOptions` |  |
| `hooks?` | `PageHooks` |  |

### serializeModel

Kind: function. Import from `@birchui/pdf/ocr`.

```ts
function serializeModel(header: Omit<ModelHeader, 'tensors'>, inputs: readonly TensorInput[]): Uint8Array
```

Writes a model file. The training exporter is the usual writer; this one serves tests and tools.

| Parameter | Type | Description |
| --- | --- | --- |
| `header` | `Omit<ModelHeader, 'tensors'>` |  |
| `inputs` | `readonly TensorInput[]` |  |

### toHocrJson

Kind: function. Import from `@birchui/pdf/ocr`.

```ts
function toHocrJson(page: OcrPageResult): HocrNode
```

The page as a tree with the element types and properties of hOCR 1.2, as plain JSON instead of HTML.

| Parameter | Type | Description |
| --- | --- | --- |
| `page` | `OcrPageResult` |  |

### toInvisibleTextLayer

Kind: function. Import from `@birchui/pdf/ocr`.

```ts
function toInvisibleTextLayer(page: OcrPageResult): OcrWord[]
```

Words in the shape the `recognizeText` hook of the document session takes, in pixels of the source image.

| Parameter | Type | Description |
| --- | --- | --- |
| `page` | `OcrPageResult` |  |

### toPlainText

Kind: function. Import from `@birchui/pdf/ocr`.

```ts
function toPlainText(page: OcrPageResult): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `page` | `OcrPageResult` |  |

### OcrError

Kind: class. Import from `@birchui/pdf/ocr`.

```ts
class OcrError extends Error
new OcrError(code: OcrError['code'], message: string)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly code` | `'aborted' \| 'model' \| 'input' \| 'worker'` |  |

### MODEL_MAGIC

Kind: const. Import from `@birchui/pdf/ocr`.

```ts
const MODEL_MAGIC: "LQOM" = 'LQOM'
```

### MODEL_VERSION

Kind: const. Import from `@birchui/pdf/ocr`.

```ts
const MODEL_VERSION: 1 = 1
```

### BeamOptions

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface BeamOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `width?` | `number` | Hypotheses kept after every frame. |
| `prune?` | `number` | Classes considered at a frame: those within this log-probability of the best. |
| `prior?` | `(previous: number, next: number) => number` | Character prior: log-probability of class `next` after class `previous` (0 at the start of the line). It is added, scaled by `priorWeight`, each time a hypothesis grows by one character. |
| `priorWeight?` | `number` |  |

### DecodedCharacter

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface DecodedCharacter
```

| Property | Type | Description |
| --- | --- | --- |
| `index` | `number` | Class index; `charset[index - 1]` is the character. |
| `confidence` | `number` |  |
| `startFrame` | `number` | First and last frame the character holds, inclusive. |
| `endFrame` | `number` |  |

### HocrNode

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface HocrNode
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'ocr_page' \| 'ocr_carea' \| 'ocr_par' \| 'ocr_line' \| 'ocrx_word'` |  |
| `bbox` | `OcrRect` | `[x1, y1, x2, y2]` in pixels of the source image. |
| `text?` | `string` |  |
| `x_wconf?` | `number` | Word confidence, 0 to 100, as hOCR's `x_wconf`. |
| `baseline?` | `[number, number]` | Baseline as hOCR writes it: slope, then offset from the bottom of the line box. |
| `textangle?` | `number` | Page only: clockwise turn that was undone, as hOCR's `textangle`. |
| `children?` | `HocrNode[]` |  |

### ModelHeader

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface ModelHeader
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `script` | `string` | ISO 15924 code of the script the model reads, such as `Latn`. |
| `languages` | `string[]` |  |
| `charset` | `string` | Class `i + 1` is `charset[i]` (by code point); class 0 is the CTC blank. |
| `lineHeight` | `number` |  |
| `stretch` | `number` |  |
| `widthStride` | `number` |  |
| `layers` | `ModelLayer[]` |  |
| `tensors` | `TensorEntry[]` |  |

### OcrBlockResult

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrBlockResult
```

| Property | Type | Description |
| --- | --- | --- |
| `kind` | `'text' \| 'table'` |  |
| `rect` | `OcrRect` |  |
| `columnIndex` | `number` | Index of the column the block sits in, counted left to right within the page. |
| `paragraphs` | `OcrParagraphResult[]` |  |

### OcrCharacter

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrCharacter
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `confidence` | `number` |  |
| `x1` | `number` | Horizontal extent in pixels of the source image. |
| `x2` | `number` |  |

### OcrDocument

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrDocument
```

The part of a document session (`openPdfDocument`) the engine drives.

| Property | Type | Description |
| --- | --- | --- |
| `getPages?` | `() => readonly unknown[]` |  |
| `recognizeText` | `(options: { recognizeText: (image: OcrPageImage) => OcrWord[] \| Promise<OcrWord[]>; pages?: number[]; includePagesWithText?: boolean; renderPage?: (pageIndex: number) => OcrRenderedPage \| undefined \| Promise<OcrRenderedPage \| undefined>; }) => Promise<{ pageIndex: number; words: number; skippedWords: number; status: OcrPageStatus['status'] }[]>` |  |
| `save?` | `() => Promise<{ bytes: Uint8Array }>` |  |

### OcrDocumentRunOptions

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrDocumentRunOptions extends OcrPageRunOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `pages?` | `number[]` | Pages to work on, from 0. All pages by default. |
| `onPage?` | `(page: OcrPageStatus) => void` |  |
| `includePagesWithText?` | `boolean \| undefined` | Recognise the page even when it already has text. Inherited from OcrPageRunOptions. |
| `renderPage?` | `((pageIndex: number, dpi: number) => OcrRenderedPage \| undefined \| Promise<OcrRenderedPage \| undefined>) \| undefined` | Supplies a rendering of the whole page at `dpi` instead of the page's embedded scan. Inherited from OcrPageRunOptions. |
| `onProgress?` | `((progress: OcrProgress) => void) \| undefined` | Inherited from OcrRunOptions. |
| `signal?` | `AbortSignal \| undefined` | Inherited from OcrRunOptions. |
| `dpi?` | `number \| undefined` | Resolution of the image when it is known; otherwise it is estimated from the text size. Inherited from PageOptions. |
| `detectOrientation?` | `boolean \| undefined` | Look for pages turned by 90, 180 or 270 degrees. On by default. Inherited from PageOptions. |
| `deskew?` | `boolean \| undefined` | Straighten skewed pages. On by default. Inherited from PageOptions. |
| `minConfidence?` | `number \| undefined` | Words below this confidence are left out. Default 0.3. Inherited from PageOptions. |
| `minLineConfidence?` | `number \| undefined` | Line segments whose mean character confidence is below this are left out as a whole: text in a script the model does not know, or a picture mistaken for text. Default 0.65. Inherited from PageOptions. |
| `maxPixels?` | `number \| undefined` | Upper bound on the pixels worked on; larger images are scaled down first. Inherited from PageOptions. |
| `maxLines?` | `number \| undefined` | Upper bound on the line segments read on one page, in reading order. Default 4000. Inherited from PageOptions. |
| `decoder?` | `"greedy" \| "beam" \| undefined` | Inherited from DecodeOptions. |
| `beam?` | `BeamOptions \| undefined` | Inherited from DecodeOptions. |
| `kernel?` | `KernelChoice \| undefined` | `js` keeps the arithmetic on plain typed arrays; `auto` uses the WebAssembly SIMD kernel where it starts. Inherited from DecodeOptions. |

### OcrEngine

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrEngine
```

| Property | Type | Description |
| --- | --- | --- |
| `load` | `() => Promise<void>` | Loads the model now instead of on first use. |
| `recognizeImage` | `(image: OcrImageInput, options?: OcrRunOptions) => Promise<OcrPageResult>` |  |
| `recognizeText` | `(image: OcrPageImage) => Promise<OcrWord[]>` | The callback `pdf.recognizeText({ recognizeText })` takes. |
| `recognizePage` | `(pdf: OcrDocument, pageIndex: number, options?: OcrPageRunOptions) => Promise<OcrPageStatus>` | Recognises one page, also when it already has text, unless `includePagesWithText` is false. |
| `recognizeDocument` | `(pdf: OcrDocument, options?: OcrDocumentRunOptions) => Promise<OcrPageStatus[]>` |  |
| `makeSearchable` | `(pdf: OcrDocument, options?: OcrDocumentRunOptions) => Promise<{ bytes: Uint8Array; pages: OcrPageStatus[] }>` | Recognises the pages without text and returns the document saved with its new text layer. |
| `readonly mode` | `'main' \| 'worker'` |  |
| `destroy` | `() => void` |  |

### OcrEngineOptions

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrEngineOptions extends PageOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `model?` | `OcrModelSource` | The model file, or a function that loads it. Without one the engine reads the model shipped in the package from disk, which only works where `import.meta.url` is a file (Node); in a browser pass a loader. |
| `languages?` | `string[]` | Languages expected on the page, as BCP 47 tags. One the model does not cover is reported once. |
| `worker?` | `boolean \| OcrWorkerLike` | `true` starts the worker shipped as `@birchui/pdf/ocr-worker`; a worker running that entry is used as is. |
| `onProgress?` | `(progress: OcrProgress) => void` |  |
| `signal?` | `AbortSignal` |  |
| `dpi?` | `number \| undefined` | Resolution of the image when it is known; otherwise it is estimated from the text size. Inherited from PageOptions. |
| `detectOrientation?` | `boolean \| undefined` | Look for pages turned by 90, 180 or 270 degrees. On by default. Inherited from PageOptions. |
| `deskew?` | `boolean \| undefined` | Straighten skewed pages. On by default. Inherited from PageOptions. |
| `minConfidence?` | `number \| undefined` | Words below this confidence are left out. Default 0.3. Inherited from PageOptions. |
| `minLineConfidence?` | `number \| undefined` | Line segments whose mean character confidence is below this are left out as a whole: text in a script the model does not know, or a picture mistaken for text. Default 0.65. Inherited from PageOptions. |
| `maxPixels?` | `number \| undefined` | Upper bound on the pixels worked on; larger images are scaled down first. Inherited from PageOptions. |
| `maxLines?` | `number \| undefined` | Upper bound on the line segments read on one page, in reading order. Default 4000. Inherited from PageOptions. |
| `decoder?` | `"greedy" \| "beam" \| undefined` | Inherited from DecodeOptions. |
| `beam?` | `BeamOptions \| undefined` | Inherited from DecodeOptions. |
| `kernel?` | `KernelChoice \| undefined` | `js` keeps the arithmetic on plain typed arrays; `auto` uses the WebAssembly SIMD kernel where it starts. Inherited from DecodeOptions. |

### OcrImageInput

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrImageInput
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `data` | `Uint8Array \| Uint8ClampedArray` | RGBA (4 bytes a pixel), RGB (3) or grey (1), row by row from the top left. |

### OcrLineResult

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrLineResult
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `rect` | `OcrRect` |  |
| `baseline` | `[number, number]` |  |
| `confidence` | `number` |  |
| `words` | `OcrWordResult[]` |  |

### OcrModel

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrModel
```

| Property | Type | Description |
| --- | --- | --- |
| `header` | `ModelHeader` |  |
| `characters` | `string[]` |  |
| `tensors` | `Map<string, Float32Array>` |  |

### OcrPageResult

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrPageResult
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `orientation` | `OcrOrientation` |  |
| `skew` | `number` | Skew that was corrected, in degrees, clockwise positive. |
| `dpi` | `number` | Resolution estimated from the text size, or the one the caller stated. |
| `inverted` | `boolean` |  |
| `confidence` | `number` |  |
| `text` | `string` |  |
| `blocks` | `OcrBlockResult[]` |  |
| `words` | `OcrWordResult[]` | Every word in reading order. |
| `regions` | `OcrRegion[]` |  |

### OcrPageRunOptions

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrPageRunOptions extends OcrRunOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `includePagesWithText?` | `boolean` | Recognise the page even when it already has text. |
| `renderPage?` | `(pageIndex: number, dpi: number) => OcrRenderedPage \| undefined \| Promise<OcrRenderedPage \| undefined>` | Supplies a rendering of the whole page at `dpi` instead of the page's embedded scan. |
| `onProgress?` | `((progress: OcrProgress) => void) \| undefined` | Inherited from OcrRunOptions. |
| `signal?` | `AbortSignal \| undefined` | Inherited from OcrRunOptions. |
| `dpi?` | `number \| undefined` | Resolution of the image when it is known; otherwise it is estimated from the text size. Inherited from PageOptions. |
| `detectOrientation?` | `boolean \| undefined` | Look for pages turned by 90, 180 or 270 degrees. On by default. Inherited from PageOptions. |
| `deskew?` | `boolean \| undefined` | Straighten skewed pages. On by default. Inherited from PageOptions. |
| `minConfidence?` | `number \| undefined` | Words below this confidence are left out. Default 0.3. Inherited from PageOptions. |
| `minLineConfidence?` | `number \| undefined` | Line segments whose mean character confidence is below this are left out as a whole: text in a script the model does not know, or a picture mistaken for text. Default 0.65. Inherited from PageOptions. |
| `maxPixels?` | `number \| undefined` | Upper bound on the pixels worked on; larger images are scaled down first. Inherited from PageOptions. |
| `maxLines?` | `number \| undefined` | Upper bound on the line segments read on one page, in reading order. Default 4000. Inherited from PageOptions. |
| `decoder?` | `"greedy" \| "beam" \| undefined` | Inherited from DecodeOptions. |
| `beam?` | `BeamOptions \| undefined` | Inherited from DecodeOptions. |
| `kernel?` | `KernelChoice \| undefined` | `js` keeps the arithmetic on plain typed arrays; `auto` uses the WebAssembly SIMD kernel where it starts. Inherited from DecodeOptions. |

### OcrPageStatus

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrPageStatus
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `status` | `'recognized' \| 'has-text' \| 'no-image' \| 'no-words'` |  |
| `words` | `number` | Words written to the text layer. |
| `skippedWords` | `number` | Words left out because no font of the document session can encode them. |
| `result?` | `OcrPageResult` |  |

### OcrParagraphResult

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrParagraphResult
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `rect` | `OcrRect` |  |
| `lines` | `OcrLineResult[]` |  |

### OcrProgress

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrProgress
```

| Property | Type | Description |
| --- | --- | --- |
| `stage` | `'load' \| 'prepare' \| 'layout' \| 'recognize' \| 'done'` |  |
| `progress` | `number` | 0 to 1 within the page. |
| `pageIndex?` | `number` |  |
| `pageCount?` | `number` |  |
| `pageNumber?` | `number` | Position of the page in the run, from 0. |

### OcrRegion

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrRegion
```

| Property | Type | Description |
| --- | --- | --- |
| `kind` | `'figure' \| 'rule' \| 'table' \| 'border'` |  |
| `rect` | `OcrRect` |  |

### OcrRenderedPage

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrRenderedPage
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `data` | `Uint8Array` |  |
| `matrix` | `[number, number, number, number, number, number]` |  |

### OcrRunOptions

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrRunOptions extends PageOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `onProgress?` | `(progress: OcrProgress) => void` |  |
| `signal?` | `AbortSignal` |  |
| `dpi?` | `number \| undefined` | Resolution of the image when it is known; otherwise it is estimated from the text size. Inherited from PageOptions. |
| `detectOrientation?` | `boolean \| undefined` | Look for pages turned by 90, 180 or 270 degrees. On by default. Inherited from PageOptions. |
| `deskew?` | `boolean \| undefined` | Straighten skewed pages. On by default. Inherited from PageOptions. |
| `minConfidence?` | `number \| undefined` | Words below this confidence are left out. Default 0.3. Inherited from PageOptions. |
| `minLineConfidence?` | `number \| undefined` | Line segments whose mean character confidence is below this are left out as a whole: text in a script the model does not know, or a picture mistaken for text. Default 0.65. Inherited from PageOptions. |
| `maxPixels?` | `number \| undefined` | Upper bound on the pixels worked on; larger images are scaled down first. Inherited from PageOptions. |
| `maxLines?` | `number \| undefined` | Upper bound on the line segments read on one page, in reading order. Default 4000. Inherited from PageOptions. |
| `decoder?` | `"greedy" \| "beam" \| undefined` | Inherited from DecodeOptions. |
| `beam?` | `BeamOptions \| undefined` | Inherited from DecodeOptions. |
| `kernel?` | `KernelChoice \| undefined` | `js` keeps the arithmetic on plain typed arrays; `auto` uses the WebAssembly SIMD kernel where it starts. Inherited from DecodeOptions. |

### OcrWordResult

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrWordResult
```

| Property | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `rect` | `OcrRect` | `[x1, y1, x2, y2]` in pixels of the source image, origin at the top left. |
| `confidence` | `number` |  |
| `baseline` | `[number, number]` | Y of the baseline at the left and right edge of the word, in pixels of the source image. |
| `characters` | `OcrCharacter[]` |  |
| `blockIndex` | `number` |  |
| `paragraphIndex` | `number` |  |
| `lineIndex` | `number` |  |

### OcrWorkerLike

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface OcrWorkerLike
```

What the engine needs of a worker: a Web Worker, or a `worker_threads` Worker in Node.

| Property | Type | Description |
| --- | --- | --- |
| `postMessage` | `(message: unknown, transfer?: Transferable[]) => void` |  |
| `terminate` | `() => unknown` |  |
| `addEventListener?` | `(type: 'message' \| 'error', listener: (event: { data?: unknown; message?: string }) => void) => void` |  |
| `removeEventListener?` | `(type: 'message' \| 'error', listener: (event: { data?: unknown; message?: string }) => void) => void` |  |
| `on?` | `(type: 'message' \| 'error', listener: (value: unknown) => void) => unknown` |  |
| `off?` | `(type: 'message' \| 'error', listener: (value: unknown) => void) => unknown` |  |

### PageHooks

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface PageHooks
```

| Property | Type | Description |
| --- | --- | --- |
| `onProgress?` | `(progress: OcrProgress) => void` |  |
| `signal?` | `AbortSignal` |  |

### PageOptions

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface PageOptions extends DecodeOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `dpi?` | `number` | Resolution of the image when it is known; otherwise it is estimated from the text size. |
| `detectOrientation?` | `boolean` | Look for pages turned by 90, 180 or 270 degrees. On by default. |
| `deskew?` | `boolean` | Straighten skewed pages. On by default. |
| `minConfidence?` | `number` | Words below this confidence are left out. Default 0.3. |
| `minLineConfidence?` | `number` | Line segments whose mean character confidence is below this are left out as a whole: text in a script the model does not know, or a picture mistaken for text. Default 0.65. |
| `maxPixels?` | `number` | Upper bound on the pixels worked on; larger images are scaled down first. |
| `maxLines?` | `number` | Upper bound on the line segments read on one page, in reading order. Default 4000. |
| `decoder?` | `"greedy" \| "beam" \| undefined` | Inherited from DecodeOptions. |
| `beam?` | `BeamOptions \| undefined` | Inherited from DecodeOptions. |
| `kernel?` | `KernelChoice \| undefined` | `js` keeps the arithmetic on plain typed arrays; `auto` uses the WebAssembly SIMD kernel where it starts. Inherited from DecodeOptions. |

### TensorEntry

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface TensorEntry
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `dtype` | `'f32' \| 'i8'` |  |
| `shape` | `number[]` |  |
| `offset` | `number` | Byte offset inside the tensor region. |
| `scales?` | `string` | For `i8`: name of the `f32` tensor with one factor per row. |

### TensorInput

Kind: interface. Import from `@birchui/pdf/ocr`.

```ts
interface TensorInput
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `shape` | `number[]` |  |
| `values` | `Float32Array` |  |
| `quantize?` | `boolean` | Store as 8-bit with one scale per row. |

### KernelChoice

Kind: type. Import from `@birchui/pdf/ocr`.

```ts
type KernelChoice = 'auto' | 'js';
```

### ModelLayer

Kind: type. Import from `@birchui/pdf/ocr`.

```ts
type ModelLayer = ConvLayer | GruLayer | LinearLayer | { op: 'save' } | { op: 'add' } | { op: 'sequence' };
```

### OcrModelSource

Kind: type. Import from `@birchui/pdf/ocr`.

```ts
type OcrModelSource = Uint8Array | (() => Uint8Array | Promise<Uint8Array>);
```

### OcrOrientation

Kind: type. Import from `@birchui/pdf/ocr`.

```ts
type OcrOrientation = 0 | 90 | 180 | 270;
```

### OcrRect

Kind: type. Import from `@birchui/pdf/ocr`.

```ts
type OcrRect = [number, number, number, number];
```

### OcrWorkerRequest

Kind: type. Import from `@birchui/pdf/ocr`.

```ts
type OcrWorkerRequest =
  | { type: 'init'; model: Uint8Array }
  | { type: 'recognize'; id: number; image: OcrImageInput; options: PageOptions }
  | { type: 'cancel'; id: number };
```

### OcrWorkerResponse

Kind: type. Import from `@birchui/pdf/ocr`.

```ts
type OcrWorkerResponse =
  | { type: 'ready' }
  | { type: 'progress'; id: number; progress: OcrProgress }
  | { type: 'result'; id: number; result: OcrPageResult }
  | { type: 'error'; id: number; code: 'aborted' | 'model' | 'input' | 'worker'; message: string };
```

## @birchui/pdf/render

### cmapCollectionOf

Kind: function. Import from `@birchui/pdf/render`.

```ts
function cmapCollectionOf(name: string): CMapCollection | undefined
```

The collection a predefined CMap name of ISO 32000-1 table 118 (or a sibling of one) belongs to.

| Parameter | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |

### comparePdfVisual

Kind: function. Import from `@birchui/pdf/render`.

```ts
function comparePdfVisual(a: Uint8Array | ArrayBuffer, b: Uint8Array | ArrayBuffer, options: ComparePdfVisualOptions = {}): Promise<PdfVisualComparison>
```

Compares two PDF files by their text and by their rendered pages. Pages are paired as the text comparison aligned
them and every pair is rendered with the package's own engine, so this runs in Node and in a worker. It is part
of the render entry, which carries the engine.

| Parameter | Type | Description |
| --- | --- | --- |
| `a` | `Uint8Array \| ArrayBuffer` |  |
| `b` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `ComparePdfVisualOptions` |  |

### createCanvasTarget

Kind: function. Import from `@birchui/pdf/render`.

```ts
function createCanvasTarget(context: Canvas2D, factory: CanvasFactory = defaultCanvasFactory): RenderTarget
```

| Parameter | Type | Description |
| --- | --- | --- |
| `context` | `Canvas2D` |  |
| `factory?` | `CanvasFactory` |  |

### createRenderEngine

Kind: function. Import from `@birchui/pdf/render`.

```ts
function createRenderEngine(defaults: RenderEngineOptions = {}): RenderEngine
```

The engine behind the surface a viewer expects from a renderer: `getDocument` returning a loading task, annotation
mode constants and a range transport.

| Parameter | Type | Description |
| --- | --- | --- |
| `defaults?` | `RenderEngineOptions` |  |

### createRenderWorker

Kind: function. Import from `@birchui/pdf/render`.

```ts
function createRenderWorker(options: RenderWorkerOptions = {}): RenderWorkerClient
```

| Parameter | Type | Description |
| --- | --- | --- |
| `options?` | `RenderWorkerOptions` |  |

### createViewport

Kind: function. Import from `@birchui/pdf/render`.

```ts
function createViewport(viewBox: readonly number[], userUnit: number, pageRotation: number, parameters: ViewportParameters): PageViewport
```

| Parameter | Type | Description |
| --- | --- | --- |
| `viewBox` | `readonly number[]` |  |
| `userUnit` | `number` |  |
| `pageRotation` | `number` |  |
| `parameters` | `ViewportParameters` |  |

### openProgressiveDocument

Kind: function. Import from `@birchui/pdf/render`.

```ts
function openProgressiveDocument(loader: RangeLoader, options: ProgressiveOptions = {}): Promise<PdfRenderDocument>
```

Opens a document through a range loader. The first page becomes available as soon as the bytes it needs have
arrived: the first-page section of a linearized file, or the cross-reference data and the objects of page 1 of any
other file. Every other call waits for the whole file, which is fetched in chunks.

| Parameter | Type | Description |
| --- | --- | --- |
| `loader` | `RangeLoader` |  |
| `options?` | `ProgressiveOptions` |  |

### openRenderDocument

Kind: function. Import from `@birchui/pdf/render`.

```ts
function openRenderDocument(data: Uint8Array | ArrayBuffer, options: OpenDocumentOptions = {}): Promise<PdfRenderDocument>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `data` | `Uint8Array \| ArrayBuffer` |  |
| `options?` | `OpenDocumentOptions` |  |

### registerPredefinedCMaps

Kind: function. Import from `@birchui/pdf/render`.

```ts
function registerPredefinedCMaps(...data: (PredefinedCMapData | undefined)[]): void
```

Makes the predefined CMaps of a collection available to every document read afterwards, the synchronous text
extractor included. Data that cannot be decoded is ignored when it is first used.

| Parameter | Type | Description |
| --- | --- | --- |
| `...data` | `(PredefinedCMapData \| undefined)[]` |  |

### unregisterPredefinedCMaps

Kind: function. Import from `@birchui/pdf/render`.

```ts
function unregisterPredefinedCMaps(...collections: CMapCollection[]): void
```

Forgets registered data: every collection, or the ones named.

| Parameter | Type | Description |
| --- | --- | --- |
| `...collections` | `CMapCollection[]` |  |

### PathData

Kind: class. Import from `@birchui/pdf/render`.

```ts
class PathData
new PathData()
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly commands` | `number[]` |  |
| `readonly coords` | `number[]` |  |
| `isEmpty` | `boolean` |  |
| `moveTo` | `(x: number, y: number) => this` |  |
| `lineTo` | `(x: number, y: number) => this` |  |
| `quadTo` | `(cx: number, cy: number, x: number, y: number) => this` |  |
| `cubicTo` | `(c1x: number, c1y: number, c2x: number, c2y: number, x: number, y: number) => this` |  |
| `close` | `() => this` |  |
| `rect` | `(x: number, y: number, width: number, height: number) => this` |  |
| `lastPoint` | `() => [number, number] \| undefined` |  |
| `append` | `(other: PathData, m?: Readonly<Matrix>) => this` |  |
| `transform` | `(m: Readonly<Matrix>) => PathData` |  |
| `clone` | `() => PathData` |  |
| `bounds` | `() => [number, number, number, number] \| undefined` |  |

### PdfRenderError

Kind: class. Import from `@birchui/pdf/render`.

```ts
class PdfRenderError extends Error
new PdfRenderError(readonly code: PdfRenderErrorCode, message: string, readonly detail?: unknown)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly code` | `PdfRenderErrorCode` |  |
| `readonly detail?` | `unknown` |  |

### RangeTransport

Kind: class. Import from `@birchui/pdf/render`.

```ts
class RangeTransport
new RangeTransport(readonly length: number, readonly initialData: Uint8Array | null)
```

Hands byte ranges to the engine: the host overrides `requestDataRange` and answers through `onDataRange`.

| Property | Type | Description |
| --- | --- | --- |
| `readonly length` | `number` |  |
| `readonly initialData` | `Uint8Array \| null` |  |
| `requestDataRange` | `(_begin: number, _end: number) => void` |  |
| `onDataRange` | `(begin: number, chunk: Uint8Array) => void` |  |
| `abort` | `() => void` |  |
| `read` | `(begin: number, end: number) => Promise<Uint8Array>` |  |

### ANNOTATION_MODE

Kind: const. Import from `@birchui/pdf/render`.

```ts
const ANNOTATION_MODE: { readonly DISABLE: 0; readonly ENABLE: 1; readonly ENABLE_FORMS: 2; readonly ENABLE_STORAGE: 3; }
```

### DEFAULT_RENDER_LIMITS

Kind: const. Import from `@birchui/pdf/render`.

```ts
const DEFAULT_RENDER_LIMITS: Readonly<RenderLimits>
```

### AlphaMask

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface AlphaMask
```

| Property | Type | Description |
| --- | --- | --- |
| `x` | `number` | Device-pixel position of the mask's top-left corner on the surface it applies to. |
| `y` | `number` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `data` | `Uint8Array` |  |
| `outside` | `number` | Alpha used outside the mask rectangle, 0..255. |

### AnnotationData

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface AnnotationData
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `subtype` | `string` |  |
| `annotationType` | `string` |  |
| `rect` | `number[]` |  |
| `annotationFlags` | `number` |  |
| `hasAppearance` | `boolean` |  |
| `contents` | `string` |  |
| `url?` | `string` |  |
| `dest?` | `string \| ExplicitDestination \| null` |  |
| `action?` | `string` |  |
| `newWindow?` | `boolean` |  |
| `fieldType?` | `string` |  |
| `fieldName?` | `string` |  |
| `color?` | `number[] \| null` |  |
| `quadPoints?` | `number[]` |  |

### ColorPaint

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface ColorPaint
```

| Property | Type | Description |
| --- | --- | --- |
| `kind` | `'color'` |  |
| `r` | `number` |  |
| `g` | `number` |  |
| `b` | `number` |  |

### ComparePdfVisualOptions

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface ComparePdfVisualOptions extends ComparePdfAsyncOptions, VisualCompareOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `password?` | `string \| undefined` | Inherited from ComparePdfAsyncOptions. |
| `otherPassword?` | `string \| undefined` | Inherited from ComparePdfAsyncOptions. |
| `ignoreCase?` | `boolean \| undefined` | Inherited from ComparePdfOptions. |
| `ignoreWhitespace?` | `boolean \| undefined` | Inherited from ComparePdfOptions. |
| `annotations?` | `boolean \| undefined` | Inherited from ComparePdfOptions. |
| `minMoveWords?` | `number \| undefined` | Inherited from ComparePdfOptions. |
| `pageSimilarityThreshold?` | `number \| undefined` | Inherited from ComparePdfOptions. |
| `colors?` | `{ inserted?: string; deleted?: string; moved?: string; } \| undefined` | Inherited from ComparePdfOptions. |
| `author?` | `string \| undefined` | Inherited from ComparePdfOptions. |
| `scale?` | `number \| undefined` | Pixels per point of the pages that are compared. Default 1.5. Inherited from VisualCompareOptions. |
| `tolerance?` | `number \| undefined` | Largest difference of a colour channel that still counts as equal, 0 to 255. Default 16. Inherited from VisualCompareOptions. |
| `mergeDistance?` | `number \| undefined` | Changed areas closer than this many pixels are reported as one. Default 12. Inherited from VisualCompareOptions. |
| `maxPixels?` | `number \| undefined` | Upper bound of the pixels of one rendered page; larger pages are compared at a lower scale. Inherited from VisualCompareOptions. |
| `standardFonts?` | `(() => Promise<SubstituteFontProvider \| undefined>) \| undefined` | Supplies the substitute faces for fonts that are not embedded, as for `openRenderDocument`. Inherited from VisualCompareOptions. |

### CompositeOptions

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface CompositeOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `alpha?` | `number` |  |
| `blendMode?` | `BlendMode` |  |
| `mask?` | `AlphaMask` |  |

### DestinationRef

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface DestinationRef
```

| Property | Type | Description |
| --- | --- | --- |
| `num` | `number` |  |
| `gen` | `number` |  |

### DocumentEvents

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface DocumentEvents
```

| Property | Type | Description |
| --- | --- | --- |
| `renderWarning` | `RenderWarningEvent` |  |

### DocumentInfo

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface DocumentInfo
```

| Property | Type | Description |
| --- | --- | --- |
| `info` | `Record<string, unknown>` |  |
| `metadata` | `string \| null` |  |

### DocumentSource

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface DocumentSource
```

| Property | Type | Description |
| --- | --- | --- |
| `data?` | `Uint8Array \| ArrayBuffer` |  |
| `url?` | `string` |  |
| `httpHeaders?` | `Record<string, string>` |  |
| `withCredentials?` | `boolean` |  |
| `range?` | `Pick<RangeTransport, 'requestDataRange' \| 'onDataRange' \| 'abort'>` | An instance of the engine's `RangeTransport`. |
| `length?` | `number` |  |
| `password?` | `string` |  |
| `rangeChunkSize?` | `number` |  |
| `allowFetch?` | `boolean` |  |
| `fetchDocument?` | `FetchDocument` |  |

### FetchDocumentReply

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface FetchDocumentReply
```

| Property | Type | Description |
| --- | --- | --- |
| `bytes` | `Uint8Array \| ArrayBuffer` |  |
| `total?` | `number` | Size of the whole file. A value above the bytes returned switches to range loading. |

### FetchDocumentRequest

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface FetchDocumentRequest
```

| Property | Type | Description |
| --- | --- | --- |
| `url` | `string` |  |
| `range?` | `{ begin: number; end: number }` | Bytes `begin` (inclusive) to `end` (exclusive); absent when the whole file is wanted. |
| `headers?` | `Record<string, string>` |  |
| `withCredentials` | `boolean` |  |
| `signal` | `AbortSignal` |  |

### LoadingTask

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface LoadingTask
```

| Property | Type | Description |
| --- | --- | --- |
| `promise` | `Promise<PdfRenderDocument>` |  |
| `destroy` | `() => Promise<void>` |  |
| `onPassword?` | `(update: (password: string) => void, reason: number) => void` | Called when a password is needed: reason 1 the first time, 2 after a wrong password. |
| `onProgress?` | `(progress: { loaded: number; total: number }) => void` |  |

### MarkedContentItem

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface MarkedContentItem
```

| Property | Type | Description |
| --- | --- | --- |
| `type` | `'beginMarkedContent' \| 'beginMarkedContentProps' \| 'endMarkedContent'` |  |
| `id?` | `string` |  |
| `tag?` | `string` |  |

### OpenDocumentOptions

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface OpenDocumentOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `password?` | `string` |  |
| `onPassword?` | `(reason: PasswordReason) => string \| undefined \| Promise<string \| undefined>` | Asked for a password when the document needs one; resolve with undefined to give up. |
| `limits?` | `Partial<PdfLimits>` |  |
| `renderLimits?` | `Partial<RenderLimits>` |  |
| `substituteFont?` | `SubstituteFontProvider` | Font bytes for fonts the document does not embed. Without it such text goes through canvas fonts. |
| `standardFonts?` | `() => Promise<SubstituteFontProvider \| undefined>` | Loads outlines for fonts the document does not embed the first time a page needs them, for example the provider of `@birchui/pdf/render-fonts`. `substituteFont` is asked first, and text falls back to canvas fonts when neither has the font. |
| `predefinedCMaps?` | `(collection: CMapCollection) => Promise<PredefinedCMapData \| undefined>` | Loads the predefined CMaps of a character collection (Japan1, GB1, CNS1, Korea1) the first time a page names one as the encoding of a composite font, for example `loadPredefinedCMaps` of `@birchui/pdf/render-cmaps`. Without it such a font is not drawn when it is embedded, and its text is not read. |
| `canvasFactory?` | `CanvasFactory` |  |

### OptionalContentConfig

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface OptionalContentConfig
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly name` | `string \| null` |  |
| `readonly creator` | `string \| null` |  |
| `getOrder` | `() => OptionalContentOrder \| null` |  |
| `getGroup` | `(id: string) => OptionalContentGroup \| null` |  |
| `getGroups` | `() => Record<string, OptionalContentGroup> \| null` |  |
| `setVisibility` | `(id: string, visible?: boolean, preserveRB?: boolean) => void` |  |
| `isVisible` | `(optionalContent: PdfValue \| undefined) => boolean` |  |

### OptionalContentGroup

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface OptionalContentGroup
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string \| null` |  |
| `visible` | `boolean` |  |
| `intent` | `string \| string[]` |  |
| `usage` | `Record<string, unknown>` |  |
| `rbGroups` | `Set<string>[]` |  |

### OutlineNode

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface OutlineNode
```

| Property | Type | Description |
| --- | --- | --- |
| `title` | `string` |  |
| `dest` | `string \| ExplicitDestination \| null` |  |
| `url` | `string \| null` |  |
| `newWindow?` | `boolean` |  |
| `bold` | `boolean` |  |
| `italic` | `boolean` |  |
| `color` | `[number, number, number]` |  |
| `count` | `number \| undefined` |  |
| `items` | `OutlineNode[]` |  |

### PageViewport

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface PageViewport
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly viewBox` | `[number, number, number, number]` |  |
| `readonly width` | `number` |  |
| `readonly height` | `number` |  |
| `readonly scale` | `number` |  |
| `readonly rotation` | `number` |  |
| `readonly offsetX` | `number` |  |
| `readonly offsetY` | `number` |  |
| `readonly transform` | `Matrix` | Maps PDF user space to viewport pixels (origin top-left, y down). |
| `clone` | `(parameters?: Partial<ViewportParameters>) => PageViewport` |  |
| `convertToViewportPoint` | `(x: number, y: number) => [number, number]` |  |
| `convertToPdfPoint` | `(x: number, y: number) => [number, number]` |  |

### PatternPaint

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface PatternPaint
```

| Property | Type | Description |
| --- | --- | --- |
| `kind` | `'pattern'` |  |
| `tile` | `RasterImage \| RenderTarget` | One repeat cell. It repeats in both directions of its own pixel grid. |
| `matrix` | `Matrix` | Maps tile pixel space (origin top-left, y down) to device pixels. |

### PdfRenderDocument

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface PdfRenderDocument
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly numPages` | `number` |  |
| `readonly pageCount` | `number` |  |
| `readonly isEncrypted` | `boolean` |  |
| `readonly fingerprints` | `[string, string \| null]` |  |
| `getPage` | `(pageNumber: number) => Promise<PdfRenderPage>` |  |
| `getPageIndex` | `(ref: DestinationRef \| { num: number; gen?: number }) => Promise<number>` |  |
| `getOutline` | `() => Promise<OutlineNode[] \| null>` |  |
| `getDestination` | `(id: string) => Promise<ExplicitDestination \| null>` |  |
| `getPageLabels` | `() => Promise<string[] \| null>` |  |
| `getMetadata` | `() => Promise<DocumentInfo>` |  |
| `getAttachments` | `() => Promise<Record<string, { filename: string; content: Uint8Array; description?: string }> \| null>` |  |
| `getOptionalContentConfig` | `(parameters?: { intent?: string }) => Promise<OptionalContentConfig>` |  |
| `getData` | `() => Promise<Uint8Array>` |  |
| `on` | `<K extends keyof DocumentEvents>(event: K, listener: (payload: DocumentEvents[K]) => void) => () => void` |  |
| `cleanup` | `() => Promise<void>` |  |
| `destroy` | `() => Promise<void>` |  |

### PdfRenderPage

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface PdfRenderPage
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly pageNumber` | `number` |  |
| `readonly pageIndex` | `number` |  |
| `readonly ref` | `DestinationRef` |  |
| `readonly view` | `number[]` | The visible box (CropBox clipped to MediaBox) in default user space. |
| `readonly rotate` | `number` |  |
| `readonly userUnit` | `number` |  |
| `getViewport` | `(parameters: ViewportParameters) => PageViewport` |  |
| `render` | `(parameters: RenderParameters) => RenderTask` |  |
| `getText` | `(parameters?: TextParameters) => Promise<string>` | Plain text of the page in reading (logical) order, from the package's text extractor. |
| `getTextContent` | `(parameters?: TextParameters & { includeMarkedContent?: boolean; signal?: AbortSignal }) => Promise<TextContent>` |  |
| `getAnnotations` | `(parameters?: { intent?: string }) => Promise<AnnotationData[]>` |  |
| `getStructTree` | `() => Promise<StructElement \| null>` |  |
| `cleanup` | `() => void` |  |

### PdfVisualComparison

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface PdfVisualComparison extends PdfComparison
```

| Property | Type | Description |
| --- | --- | --- |
| `visual` | `VisualPageComparison[]` |  |
| `pages` | `PdfPageComparison[]` | Inherited from PdfComparison. |
| `changes` | `PdfTextChange[]` | Inherited from PdfComparison. |
| `summary` | `PdfComparisonSummary` | Inherited from PdfComparison. |
| `annotations?` | `{ a: AnnotationInput[]; b: AnnotationInput[]; } \| undefined` | Inherited from PdfComparison. |

### PredefinedCMapData

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface PredefinedCMapData
```

The packed CMaps and the CID to Unicode table of one collection, as `@birchui/pdf/render-cmaps` supplies them.

| Property | Type | Description |
| --- | --- | --- |
| `collection` | `CMapCollection` |  |
| `data` | `Uint8Array` | Raw deflate data written by the package's CMap generator. |

### ProgressiveOptions

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface ProgressiveOptions extends OpenDocumentOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `chunkSize?` | `number` | Bytes per request while the rest of the file is fetched. |
| `onProgress?` | `(progress: { loaded: number; total: number }) => void` |  |
| `signal?` | `AbortSignal` |  |
| `openComplete?` | `(bytes: Uint8Array, options: OpenDocumentOptions) => Promise<PdfRenderDocument>` | Opens the complete file once every byte has arrived. Defaults to opening it on the calling thread. |
| `password?` | `string \| undefined` | Inherited from OpenDocumentOptions. |
| `onPassword?` | `((reason: PasswordReason) => string \| undefined \| Promise<string \| undefined>) \| undefined` | Asked for a password when the document needs one; resolve with undefined to give up. Inherited from OpenDocumentOptions. |
| `limits?` | `Partial<PdfLimits> \| undefined` | Inherited from OpenDocumentOptions. |
| `renderLimits?` | `Partial<RenderLimits> \| undefined` | Inherited from OpenDocumentOptions. |
| `substituteFont?` | `SubstituteFontProvider \| undefined` | Font bytes for fonts the document does not embed. Without it such text goes through canvas fonts. Inherited from OpenDocumentOptions. |
| `standardFonts?` | `(() => Promise<SubstituteFontProvider \| undefined>) \| undefined` | Loads outlines for fonts the document does not embed the first time a page needs them, for example the provider of `@birchui/pdf/render-fonts`. `substituteFont` is asked first, and text falls back to canvas fonts when neither has the font. Inherited from OpenDocumentOptions. |
| `predefinedCMaps?` | `((collection: CMapCollection) => Promise<PredefinedCMapData \| undefined>) \| undefined` | Loads the predefined CMaps of a character collection (Japan1, GB1, CNS1, Korea1) the first time a page names one as the encoding of a composite font, for example `loadPredefinedCMaps` of `@birchui/pdf/render-cmaps`. Without it such a font is not drawn when it is embedded, and its text is not read. Inherited from OpenDocumentOptions. |
| `canvasFactory?` | `CanvasFactory \| undefined` | Inherited from OpenDocumentOptions. |

### RangeLoader

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface RangeLoader
```

| Property | Type | Description |
| --- | --- | --- |
| `length` | `number` |  |
| `read` | `(begin: number, end: number) => Promise<Uint8Array>` |  |
| `initialData?` | `Uint8Array \| null` |  |

### RasterImage

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface RasterImage
```

| Property | Type | Description |
| --- | --- | --- |
| `width` | `number` |  |
| `height` | `number` |  |
| `data` | `Uint8ClampedArray` | RGBA, 8 bits per channel, not premultiplied, row 0 at the top. |
| `bitmap?` | `unknown` | Set by a target that decoded the image natively (ImageBitmap in a browser). |

### RenderEngine

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface RenderEngine
```

| Property | Type | Description |
| --- | --- | --- |
| `getDocument` | `(source: DocumentSource) => LoadingTask` |  |
| `AnnotationMode` | `typeof ANNOTATION_MODE` |  |
| `RangeTransport` | `typeof RangeTransport` |  |
| `readonly mode` | `'worker' \| 'main'` | Where documents opened from now on are parsed and rasterised. |
| `destroy` | `() => void` |  |

### RenderEngineOptions

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface RenderEngineOptions extends Omit<OpenDocumentOptions, 'standardFonts' | 'predefinedCMaps'>
```

| Property | Type | Description |
| --- | --- | --- |
| `standardFonts?` | `boolean \| NonNullable<OpenDocumentOptions['standardFonts']>` | Draws fonts a document does not embed from the bundled outlines of `@birchui/pdf/render-fonts`, which are loaded the first time a page needs them. On by default; `false` leaves such text to canvas fonts, and a function supplies another provider (calling thread only). |
| `predefinedCMaps?` | `boolean \| NonNullable<OpenDocumentOptions['predefinedCMaps']>` | Reads composite fonts encoded with a predefined CJK CMap (for example `90ms-RKSJ-H` or `GBK-EUC-H`) with the tables of `@birchui/pdf/render-cmaps`; the table of a character collection is loaded the first time a page needs it. On by default; `false` leaves such fonts undrawn when they are embedded, and a function supplies the data. |
| `worker?` | `Worker \| (() => Worker)` | A worker running the `@birchui/pdf/render-worker` entry, or a factory for one. Without it work runs on the calling thread. A worker made by the factory is terminated by `destroy()`; one passed in stays with its owner. |
| `onWorkerFallback?` | `(error: unknown) => void` | Called once when the worker cannot be constructed or started and the engine continues on the calling thread. |
| `allowFetch?` | `boolean` | Lets the engine load `url` sources with the global `fetch`. Off by default: the engine makes no network calls of its own. |
| `fetchDocument?` | `FetchDocument` | Loads `url` sources on behalf of the engine; takes precedence over `allowFetch`. |
| `limits?` | `Partial<PdfLimits> \| undefined` | Inherited from OpenDocumentOptions. |
| `password?` | `string \| undefined` | Inherited from OpenDocumentOptions. |
| `onPassword?` | `((reason: PasswordReason) => string \| undefined \| Promise<string \| undefined>) \| undefined` | Asked for a password when the document needs one; resolve with undefined to give up. Inherited from OpenDocumentOptions. |
| `renderLimits?` | `Partial<RenderLimits> \| undefined` | Inherited from OpenDocumentOptions. |
| `substituteFont?` | `SubstituteFontProvider \| undefined` | Font bytes for fonts the document does not embed. Without it such text goes through canvas fonts. Inherited from OpenDocumentOptions. |
| `canvasFactory?` | `CanvasFactory \| undefined` | Inherited from OpenDocumentOptions. |

### RenderLimits

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface RenderLimits
```

| Property | Type | Description |
| --- | --- | --- |
| `maxOperators` | `number` | Operators executed for one page, nested streams included. |
| `maxRenderMs` | `number` | Wall-clock budget for one page render in milliseconds; 0 disables the cap. |
| `maxFormDepth` | `number` | Nesting of form XObjects, patterns, Type 3 glyphs and soft masks. |
| `maxStateDepth` | `number` | Depth of the graphics state stack. |
| `maxSurfacePixels` | `number` | Pixels of one offscreen surface (pattern tiles, groups, soft masks). |
| `maxImageCacheBytes` | `number` | Bytes of decoded image pixels kept in the per-document cache. |
| `maxContentBytes` | `number` | Bytes of one decoded content stream. |
| `maxPageContentBytes` | `number` | Content bytes interpreted for one page, every reference to a stream counted. |
| `maxFontBytes` | `number` | Bytes of one embedded font program. |
| `maxMeshElements` | `number` | Vertices or patches read from one mesh shading. |
| `maxPatternTiles` | `number` | Pattern cells kept as rasters during one page. |

### RenderParameters

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface RenderParameters
```

| Property | Type | Description |
| --- | --- | --- |
| `viewport` | `PageViewport` |  |
| `canvasContext?` | `Canvas2D` |  |
| `canvas?` | `HTMLCanvasElement \| OffscreenCanvas \| null` |  |
| `target?` | `RenderTarget` | Any surface implementing RenderTarget; takes precedence over the canvas. |
| `transform?` | `number[]` | Extra device-space transform applied after the viewport, for example a HiDPI scale. |
| `background?` | `string \| null` | CSS colour painted first; 'transparent' paints nothing. Targets other than a canvas accept white only. |
| `intent?` | `'display' \| 'print'` |  |
| `annotationMode?` | `number` |  |
| `optionalContentConfigPromise?` | `Promise<OptionalContentConfig \| null \| undefined>` |  |
| `signal?` | `AbortSignal` |  |
| `timeSlice?` | `number` | Milliseconds of uninterrupted work before yielding to the event loop; 0 renders in one go. |
| `pixelAlignment?` | `boolean` | Places upright rectangles, solid horizontal and vertical strokes, small glyphs and upright images on whole device pixels. On by default; `false` keeps every coordinate exact, which suits output that is scaled again. |

### RenderTarget

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface RenderTarget
```

The drawing surface the interpreter paints on. Coordinates given to path, image and text calls are in user space
and go through the current transform to device pixels (origin top-left, y down). `save`/`restore` cover the
transform, the clip, the alpha and the blend mode.

| Property | Type | Description |
| --- | --- | --- |
| `readonly width` | `number` |  |
| `readonly height` | `number` |  |
| `save` | `() => void` |  |
| `restore` | `() => void` |  |
| `setTransform` | `(matrix: Readonly<Matrix>) => void` |  |
| `setAlpha` | `(alpha: number) => void` |  |
| `setBlendMode` | `(mode: BlendMode) => void` |  |
| `fillPath` | `(path: PathData, rule: FillRule, paint: Paint) => void` |  |
| `strokePath` | `(path: PathData, style: StrokeStyle, paint: Paint) => void` |  |
| `clipPath` | `(path: PathData, rule: FillRule) => void` |  |
| `drawImage` | `(image: RasterImage, smooth: boolean) => void` | Paints the image on the unit square (0,0)-(1,1) of user space; image row 0 lands on y = 1. |
| `createSurface` | `(width: number, height: number) => RenderTarget` | An offscreen surface of the same kind, transparent, with an identity transform and no clip. |
| `drawSurface` | `(surface: RenderTarget, x: number, y: number, options?: CompositeOptions) => void` | Composites another surface at device position (x, y), ignoring the current transform, alpha and blend mode but honouring the current clip. |
| `readPixels` | `(x: number, y: number, width: number, height: number) => Uint8ClampedArray` | RGBA, not premultiplied. |
| `drawText?` | `(text: string, font: SystemFont, paint: Paint, mode: 'fill' \| 'stroke', lineWidth: number) => void` | Text through fonts installed on the system; absent on targets that have no font access. The text is set at a font size of one user unit with its baseline origin at (0, 0) of a y-up user space; `measureText` returns the advance in the same unit. |
| `measureText?` | `(text: string, font: SystemFont) => number` |  |
| `setKnockout?` | `(isKnockout: boolean) => void` | Knockout group, ISO 32000-1 11.4.6: while on, every object first removes what the surface already holds under its shape, so it composites with the backdrop of the group and not with the objects before it. |
| `readonly acceptsBitmaps?` | `boolean` | True when `drawImage` takes images that carry a natively decoded `bitmap` and no pixel data. |
| `dispose?` | `() => void` | Releases backing memory of an offscreen surface. |

### RenderTask

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface RenderTask
```

| Property | Type | Description |
| --- | --- | --- |
| `promise` | `Promise<void>` |  |
| `cancel` | `() => void` |  |
| `readonly warnings` | `RenderWarning[]` | Unsupported features met while rendering; complete once the promise settles. |

### RenderWarning

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface RenderWarning
```

| Property | Type | Description |
| --- | --- | --- |
| `code` | `RenderWarningCode` |  |
| `feature` | `string` |  |
| `message` | `string` |  |
| `count` | `number` |  |

### RenderWarningEvent

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface RenderWarningEvent
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndex` | `number` |  |
| `warnings` | `RenderWarning[]` |  |

### RenderWorkerClient

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface RenderWorkerClient
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly mode` | `'worker' \| 'main'` |  |
| `open` | `(data: Uint8Array \| ArrayBuffer, options?: OpenDocumentOptions) => Promise<PdfRenderDocument>` |  |
| `destroy` | `() => void` |  |

### RenderWorkerOptions

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface RenderWorkerOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `worker?` | `Worker` | A worker running the `@birchui/pdf/render-worker` entry. Without one, or without OffscreenCanvas, work runs on the calling thread. |
| `terminateOnDestroy?` | `boolean` | Terminate the worker when the client is destroyed. Default true. |
| `standardFonts?` | `() => Promise<StandardFontFaces \| undefined>` | Loads the font files the worker draws fonts that are not embedded with, asked for the first time a page needs them: for example `standardFontFaces` of `@birchui/pdf/render-fonts`. Without it the worker uses canvas fonts. |
| `predefinedCMaps?` | `(collection: CMapCollection) => Promise<PredefinedCMapData \| undefined>` | Loads the predefined CMaps of a character collection for the worker, asked for the first time a page needs them: for example `loadPredefinedCMaps` of `@birchui/pdf/render-cmaps`. |

### StrokeStyle

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface StrokeStyle
```

| Property | Type | Description |
| --- | --- | --- |
| `lineWidth` | `number` |  |
| `cap` | `0 \| 1 \| 2` |  |
| `join` | `0 \| 1 \| 2` |  |
| `miterLimit` | `number` |  |
| `dash` | `number[]` |  |
| `dashPhase` | `number` |  |

### StructElement

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface StructElement
```

| Property | Type | Description |
| --- | --- | --- |
| `role` | `string` |  |
| `children` | `(StructElement \| { type: 'content' \| 'object' \| 'annotation'; id: string })[]` |  |
| `alt?` | `string` |  |
| `lang?` | `string` |  |

### SubstituteFontRequest

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface SubstituteFontRequest
```

| Property | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |
| `family` | `'serif' \| 'sans-serif' \| 'monospace' \| 'symbol' \| 'dingbats'` |  |
| `isBold` | `boolean` |  |
| `isItalic` | `boolean` |  |
| `ordering?` | `string` | Character collection of a composite font, for example Japan1, GB1, CNS1 or Korea1. |

### SystemFont

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface SystemFont
```

| Property | Type | Description |
| --- | --- | --- |
| `family` | `string` | CSS font-family list. |
| `weight` | `number` |  |
| `italic` | `boolean` |  |

### TextContent

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface TextContent
```

| Property | Type | Description |
| --- | --- | --- |
| `items` | `(TextItem \| MarkedContentItem)[]` |  |
| `styles` | `Record<string, TextStyle>` |  |
| `lang` | `string \| null` |  |

### TextItem

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface TextItem
```

| Property | Type | Description |
| --- | --- | --- |
| `str` | `string` |  |
| `dir` | `'ltr' \| 'rtl' \| 'ttb'` |  |
| `transform` | `number[]` | [a, b, c, d, x, y]: font-size-scaled text matrix in PDF user space, origin at the baseline start. |
| `width` | `number` |  |
| `height` | `number` |  |
| `fontName` | `string` |  |
| `hasEOL` | `boolean` |  |

### TextStyle

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface TextStyle
```

| Property | Type | Description |
| --- | --- | --- |
| `fontFamily` | `string` |  |
| `ascent` | `number` |  |
| `descent` | `number` |  |
| `vertical` | `boolean` |  |

### ViewportParameters

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface ViewportParameters
```

| Property | Type | Description |
| --- | --- | --- |
| `scale` | `number` |  |
| `rotation?` | `number` |  |
| `offsetX?` | `number` |  |
| `offsetY?` | `number` |  |
| `dontFlip?` | `boolean` |  |

### VisualCompareOptions

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface VisualCompareOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `scale?` | `number` | Pixels per point of the pages that are compared. Default 1.5. |
| `tolerance?` | `number` | Largest difference of a colour channel that still counts as equal, 0 to 255. Default 16. |
| `mergeDistance?` | `number` | Changed areas closer than this many pixels are reported as one. Default 12. |
| `maxPixels?` | `number` | Upper bound of the pixels of one rendered page; larger pages are compared at a lower scale. |
| `standardFonts?` | `OpenDocumentOptions['standardFonts']` | Supplies the substitute faces for fonts that are not embedded, as for `openRenderDocument`. |

### VisualPageComparison

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface VisualPageComparison
```

| Property | Type | Description |
| --- | --- | --- |
| `pageIndexA?` | `number` |  |
| `pageIndexB?` | `number` |  |
| `status` | `'equal' \| 'changed' \| 'only-a' \| 'only-b'` | `only-a` and `only-b` mark a page that has no partner; such a page is not rendered. |
| `scale` | `number` |  |
| `width` | `number` |  |
| `height` | `number` |  |
| `changedPixels` | `number` |  |
| `changedRatio` | `number` |  |
| `regions` | `VisualRegion[]` |  |

### VisualRegion

Kind: interface. Import from `@birchui/pdf/render`.

```ts
interface VisualRegion extends PixelDiffRegion
```

| Property | Type | Description |
| --- | --- | --- |
| `rect` | `PdfRect` | The area in points, with the origin at the top left of the page as it is shown. |
| `x` | `number` | Inherited from PixelDiffRegion. |
| `y` | `number` | Inherited from PixelDiffRegion. |
| `width` | `number` | Inherited from PixelDiffRegion. |
| `height` | `number` | Inherited from PixelDiffRegion. |
| `changedPixels` | `number` | Inherited from PixelDiffRegion. |

### BlendMode

Kind: type. Import from `@birchui/pdf/render`.

```ts
type BlendMode =
  | 'normal'
  | 'multiply'
  | 'screen'
  | 'overlay'
  | 'darken'
  | 'lighten'
  | 'color-dodge'
  | 'color-burn'
  | 'hard-light'
  | 'soft-light'
  | 'difference'
  | 'exclusion'
  | 'hue'
  | 'saturation'
  | 'color'
  | 'luminosity';
```

### Canvas2D

Kind: type. Import from `@birchui/pdf/render`.

```ts
type Canvas2D = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;
```

### CanvasFactory

Kind: type. Import from `@birchui/pdf/render`.

```ts
type CanvasFactory = (width: number, height: number) => AnyCanvas;
```

### CMapCollection

Kind: type. Import from `@birchui/pdf/render`.

```ts
type CMapCollection = 'Japan1' | 'GB1' | 'CNS1' | 'Korea1' | 'Japan2' | 'KR';
```

A character collection of the Adobe registry whose predefined CMaps can be loaded.

### ExplicitDestination

Kind: type. Import from `@birchui/pdf/render`.

```ts
type ExplicitDestination = (DestinationRef | { name: string } | number | null)[];
```

Explicit destination in the shape viewers expect: [page reference or index, { name: fit mode }, ...numbers].

### FetchDocument

Kind: type. Import from `@birchui/pdf/render`.

```ts
type FetchDocument = (request: FetchDocumentRequest) => Promise<FetchDocumentReply>;
```

### FillRule

Kind: type. Import from `@birchui/pdf/render`.

```ts
type FillRule = 'nonzero' | 'evenodd';
```

### Matrix

Kind: type. Import from `@birchui/pdf/render`.

```ts
type Matrix = [a: number, b: number, c: number, d: number, e: number, f: number];
```

### OptionalContentOrder

Kind: type. Import from `@birchui/pdf/render`.

```ts
type OptionalContentOrder = (string | { name: string | null; order: OptionalContentOrder })[];
```

### Paint

Kind: type. Import from `@birchui/pdf/render`.

```ts
type Paint = ColorPaint | PatternPaint;
```

### PasswordReason

Kind: type. Import from `@birchui/pdf/render`.

```ts
type PasswordReason = 'password-required' | 'password-incorrect';
```

### PdfRenderErrorCode

Kind: type. Import from `@birchui/pdf/render`.

```ts
type PdfRenderErrorCode =
  | 'cancelled'
  | 'invalid-document'
  | 'invalid-page'
  | 'password-required'
  | 'password-incorrect'
  | 'limit-exceeded'
  | 'unsupported'
  | 'fetch-not-allowed'
  | 'destroyed'
  | 'internal';
```

### RenderWarningCode

Kind: type. Import from `@birchui/pdf/render`.

```ts
type RenderWarningCode =
  | 'unsupported-operator'
  | 'unsupported-colorspace'
  | 'unsupported-shading'
  | 'unsupported-pattern'
  | 'unsupported-font'
  | 'unsupported-image'
  | 'unsupported-transparency'
  | 'unsupported-function'
  | 'substituted-font'
  | 'malformed-content'
  | 'limit-reached';
```

### SubstituteFontProvider

Kind: type. Import from `@birchui/pdf/render`.

```ts
type SubstituteFontProvider = (request: SubstituteFontRequest) => Uint8Array | undefined;
```

Supplies the bytes of a TrueType, OpenType or Type 1 font to draw a font that is not embedded in the document.

## @birchui/pdf/render-cmaps

### cmapCollectionOf

Kind: function. Import from `@birchui/pdf/render-cmaps`.

```ts
function cmapCollectionOf(name: string): CMapCollection | undefined
```

The collection a predefined CMap name of ISO 32000-1 table 118 (or a sibling of one) belongs to.

| Parameter | Type | Description |
| --- | --- | --- |
| `name` | `string` |  |

### loadPredefinedCMaps

Kind: function. Import from `@birchui/pdf/render-cmaps`.

```ts
function loadPredefinedCMaps(collection: CMapCollection): Promise<PredefinedCMapData | undefined>
```

The predefined CMaps and the CID to Unicode table of one character collection. Each collection is a chunk of its
own, fetched the first time it is asked for. Pass the function as `predefinedCMaps` when opening a document, or
hand the result to `registerPredefinedCMaps`.

| Parameter | Type | Description |
| --- | --- | --- |
| `collection` | `CMapCollection` |  |

### registerAllPredefinedCMaps

Kind: function. Import from `@birchui/pdf/render-cmaps`.

```ts
function registerAllPredefinedCMaps(): Promise<void>
```

Loads and registers every collection, for code that reads text synchronously afterwards.

### registerPredefinedCMaps

Kind: function. Import from `@birchui/pdf/render-cmaps`.

```ts
function registerPredefinedCMaps(...data: (PredefinedCMapData | undefined)[]): void
```

Makes the predefined CMaps of a collection available to every document read afterwards, the synchronous text
extractor included. Data that cannot be decoded is ignored when it is first used.

| Parameter | Type | Description |
| --- | --- | --- |
| `...data` | `(PredefinedCMapData \| undefined)[]` |  |

### unregisterPredefinedCMaps

Kind: function. Import from `@birchui/pdf/render-cmaps`.

```ts
function unregisterPredefinedCMaps(...collections: CMapCollection[]): void
```

Forgets registered data: every collection, or the ones named.

| Parameter | Type | Description |
| --- | --- | --- |
| `...collections` | `CMapCollection[]` |  |

### CMAP_COLLECTIONS

Kind: const. Import from `@birchui/pdf/render-cmaps`.

```ts
const CMAP_COLLECTIONS: readonly CMapCollection[]
```

### loadCns1CMaps

Kind: const. Import from `@birchui/pdf/render-cmaps`.

```ts
const loadCns1CMaps: () => Promise<PredefinedCMapData | undefined>
```

### loadGb1CMaps

Kind: const. Import from `@birchui/pdf/render-cmaps`.

```ts
const loadGb1CMaps: () => Promise<PredefinedCMapData | undefined>
```

### loadJapan1CMaps

Kind: const. Import from `@birchui/pdf/render-cmaps`.

```ts
const loadJapan1CMaps: () => Promise<PredefinedCMapData | undefined>
```

### loadJapan2CMaps

Kind: const. Import from `@birchui/pdf/render-cmaps`.

```ts
const loadJapan2CMaps: () => Promise<PredefinedCMapData | undefined>
```

### loadKorea1CMaps

Kind: const. Import from `@birchui/pdf/render-cmaps`.

```ts
const loadKorea1CMaps: () => Promise<PredefinedCMapData | undefined>
```

### loadKrCMaps

Kind: const. Import from `@birchui/pdf/render-cmaps`.

```ts
const loadKrCMaps: () => Promise<PredefinedCMapData | undefined>
```

### PREDEFINED_CMAP_SOURCES

Kind: const. Import from `@birchui/pdf/render-cmaps`.

```ts
const PREDEFINED_CMAP_SOURCES: readonly [{ readonly collections: "Japan1, GB1, CNS1, Korea1, Japan2, KR"; readonly source: "Adobe CMap resources"; readonly license: "BSD-3-Clause"; }]
```

Where the tables come from; the licence text ships in the `licenses` folder of the package.

### PredefinedCMapData

Kind: interface. Import from `@birchui/pdf/render-cmaps`.

```ts
interface PredefinedCMapData
```

The packed CMaps and the CID to Unicode table of one collection, as `@birchui/pdf/render-cmaps` supplies them.

| Property | Type | Description |
| --- | --- | --- |
| `collection` | `CMapCollection` |  |
| `data` | `Uint8Array` | Raw deflate data written by the package's CMap generator. |

### CMapCollection

Kind: type. Import from `@birchui/pdf/render-cmaps`.

```ts
type CMapCollection = 'Japan1' | 'GB1' | 'CNS1' | 'Korea1' | 'Japan2' | 'KR';
```

A character collection of the Adobe registry whose predefined CMaps can be loaded.

## @birchui/pdf/render-fonts

### createStandardFontProvider

Kind: function. Import from `@birchui/pdf/render-fonts`.

```ts
function createStandardFontProvider(fallback?: SubstituteFontProvider): SubstituteFontProvider
```

Outlines for fonts a document does not embed: faces that are metric-compatible with Helvetica, Times and
Courier, and substitutes for Symbol and ZapfDingbats. Pass the result as `substituteFont`.

| Parameter | Type | Description |
| --- | --- | --- |
| `fallback?` | `SubstituteFontProvider` |  |

### standardFontData

Kind: function. Import from `@birchui/pdf/render-fonts`.

```ts
function standardFontData(face: StandardFontFace): Uint8Array | undefined
```

The TrueType data of one face: Windows-1252 and common punctuation, or the Symbol or Dingbats repertoire.

| Parameter | Type | Description |
| --- | --- | --- |
| `face` | `StandardFontFace` |  |

### standardFontFaceFor

Kind: function. Import from `@birchui/pdf/render-fonts`.

```ts
function standardFontFaceFor(request: SubstituteFontRequest): StandardFontFace | undefined
```

| Parameter | Type | Description |
| --- | --- | --- |
| `request` | `SubstituteFontRequest` |  |

### standardFontFaces

Kind: function. Import from `@birchui/pdf/render-fonts`.

```ts
function standardFontFaces(): StandardFontFaces
```

Every face of the pack, decoded; this is what a render worker is sent.

### STANDARD_FONT_FACES

Kind: const. Import from `@birchui/pdf/render-fonts`.

```ts
const STANDARD_FONT_FACES: readonly StandardFontFace[]
```

### STANDARD_FONT_SOURCES

Kind: const. Import from `@birchui/pdf/render-fonts`.

```ts
const STANDARD_FONT_SOURCES: readonly [{ readonly faces: "sans, serif, mono"; readonly source: "Liberation Fonts"; readonly license: "SIL Open Font License 1.1"; }, { readonly faces: "symbol, dingbats"; readonly source: "DejaVu Fonts"; readonly license: "Bitstream Vera Fonts licence, public domain"; }]
```

Where the outlines come from; the licence texts ship in the `licenses` folder of the package.

### StandardFontFace

Kind: type. Import from `@birchui/pdf/render-fonts`.

```ts
type StandardFontFace =
  | 'sans'
  | 'sans-bold'
  | 'sans-italic'
  | 'sans-bold-italic'
  | 'serif'
  | 'serif-bold'
  | 'serif-italic'
  | 'serif-bold-italic'
  | 'mono'
  | 'mono-bold'
  | 'mono-italic'
  | 'mono-bold-italic'
  | 'symbol'
  | 'dingbats';
```

### StandardFontFaces

Kind: type. Import from `@birchui/pdf/render-fonts`.

```ts
type StandardFontFaces = Partial<Record<StandardFontFace, Uint8Array>>;
```
