@birchui/pdf
PDF: createPdfViewer, annotations, forms, page tools, redaction and saving.
Key exports: createPdfViewer, PdfViewerOptions, PdfViewerApi, PdfViewerEvents, PdfAnnotation
Guides: Accessibility, Annotations, PDF API and events, Attachments and portfolios, Collaboration, Comparing documents
@birchui/pdf#
addDocumentTimestampfunction#
function addDocumentTimestamp(data: Uint8Array | ArrayBuffer, options: AddDocumentTimestampOptions): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
options | AddDocumentTimestampOptions | — |
Defined in packages/pdf/src/signatures/document-timestamp.ts:24
addValidationDatafunction#
function addValidationData(data: Uint8Array | ArrayBuffer, options: AddValidationDataOptions = {}): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | AddValidationDataOptions | — |
Defined in packages/pdf/src/signatures/dss.ts:262
analyzeLayoutfunction#
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 | — |
optionsoptional | OfficeExportOptions | — |
Defined in packages/pdf/src/tools/export-office.ts:170
angleBetweenfunction#
function angleBetween(a: PdfPoint, vertex: PdfPoint, b: PdfPoint): numberDefined in packages/pdf/src/annotations/geometry.ts:332
annotationBoundsfunction#
function annotationBounds(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>): PdfRect| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'rect' | 'rotation'> | — |
Defined in packages/pdf/src/annotations/rotation.ts:100
annotationCornersfunction#
function annotationCorners(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>): PdfPoint[]| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'rect' | 'rotation'> | — |
Defined in packages/pdf/src/annotations/rotation.ts:96
annotationFlagsfunction#
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' > | — |
extraoptional | unknown | — |
Defined in packages/pdf/src/annotations/pdf-annotations.ts:137
annotationInputFromPresetfunction#
function annotationInputFromPreset(preset: AnnotationPreset, placement: Partial<Omit<AnnotationInput, 'type'>> & { pageIndex: number }): AnnotationInput| Parameter | Type | Description |
|---|---|---|
preset | AnnotationPreset | — |
placement | Partial<Omit<AnnotationInput, 'type'>> & { pageIndex: number } | — |
Defined in packages/pdf/src/annotations/presets.ts:118
annotationPermissionsfunction#
function annotationPermissions(annotation: PdfAnnotation, user: AnnotationUser | string, options: AnnotationPermissionOptions = {}): AnnotationPermissions| Parameter | Type | Description |
|---|---|---|
annotation | PdfAnnotation | — |
user | AnnotationUser | string | — |
optionsoptional | AnnotationPermissionOptions | — |
Defined in packages/pdf/src/annotations/permissions.ts:36
annotationPresetsFromJsonfunction#
function annotationPresetsFromJson(value: unknown): AnnotationPreset[]| Parameter | Type | Description |
|---|---|---|
value | unknown | — |
Defined in packages/pdf/src/annotations/presets.ts:147
annotationPresetsToJsonfunction#
function annotationPresetsToJson(presets: readonly AnnotationPreset[]): AnnotationPresetsJson| Parameter | Type | Description |
|---|---|---|
presets | readonly AnnotationPreset[] | — |
Defined in packages/pdf/src/annotations/presets.ts:133
annotationRichDefaultsfunction#
function annotationRichDefaults(annotation: Pick<PdfAnnotation, 'fontSize' | 'fontColor' | 'color' | 'fontFamily' | 'textAlign'>): RichTextDefaults| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'fontSize' | 'fontColor' | 'color' | 'fontFamily' | 'textAlign'> | — |
Defined in packages/pdf/src/annotations/rich-text.ts:75
annotationsFromJsonfunction#
function annotationsFromJson(value: unknown): AnnotationInput[]| Parameter | Type | Description |
|---|---|---|
value | unknown | — |
Defined in packages/pdf/src/annotations/xfdf.ts:661
annotationsToFdffunction#
function annotationsToFdf(annotations: readonly PdfAnnotation[], options: AnnotationsFdfOptions = {}): Uint8Array| Parameter | Type | Description |
|---|---|---|
annotations | readonly PdfAnnotation[] | — |
optionsoptional | AnnotationsFdfOptions | — |
Defined in packages/pdf/src/annotations/annotations-fdf.ts:38
annotationsToJsonfunction#
function annotationsToJson(annotations: readonly PdfAnnotation[]): AnnotationsJson| Parameter | Type | Description |
|---|---|---|
annotations | readonly PdfAnnotation[] | — |
Defined in packages/pdf/src/annotations/xfdf.ts:645
annotationsToXfdffunction#
function annotationsToXfdf(annotations: readonly PdfAnnotation[], fields: readonly PdfFormField[] = [], fileName?: string): string| Parameter | Type | Description |
|---|---|---|
annotations | readonly PdfAnnotation[] | — |
fieldsoptional | readonly PdfFormField[] | — |
fileNameoptional | string | — |
Defined in packages/pdf/src/annotations/xfdf.ts:202
arcPointsfunction#
function arcPoints(points: readonly PdfPoint[], segments = 48): PdfPoint[]| Parameter | Type | Description |
|---|---|---|
points | readonly PdfPoint[] | — |
segmentsoptional | unknown | — |
Defined in packages/pdf/src/annotations/geometry.ts:320
arcThroughfunction#
function arcThrough(start: PdfPoint, through: PdfPoint, end: PdfPoint): ArcGeometry | undefinedDefined in packages/pdf/src/annotations/geometry.ts:307
blocksTextfunction#
function blocksText(blocks: readonly OfficeBlock[]): stringThe text of the blocks, one block per line; cells of a table row are separated by tabs.
| Parameter | Type | Description |
|---|---|---|
blocks | readonly OfficeBlock[] | — |
Defined in packages/pdf/src/tools/export-office.ts:250
blocksToDocxfunction#
function blocksToDocx(blocks: readonly OfficeBlock[], options: { title?: string } = {}): PdfBytesWrites the blocks as a Word document: heading styles, bulleted and numbered lists, and bordered tables.
| Parameter | Type | Description |
|---|---|---|
blocks | readonly OfficeBlock[] | — |
optionsoptional | { title?: string } | — |
Defined in packages/pdf/src/tools/export-office.ts:320
bookletOrderfunction#
function bookletOrder(pageCount: number, isRightToLeft = false): number[][]| Parameter | Type | Description |
|---|---|---|
pageCount | number | — |
isRightToLeftoptional | unknown | — |
Defined in packages/pdf/src/tools/impose.ts:33
buildCompareReportfunction#
function buildCompareReport(comparison: PdfComparison, options: CompareReportOptions = {}): string| Parameter | Type | Description |
|---|---|---|
comparison | PdfComparison | — |
optionsoptional | CompareReportOptions | — |
Defined in packages/pdf/src/compare/report.ts:69
buildSrgbProfilefunction#
function buildSrgbProfile(): Uint8ArrayDefined in packages/pdf/src/tools/pdfa.ts:63
canonicalFontNamefunction#
function canonicalFontName(baseFont: string): string| Parameter | Type | Description |
|---|---|---|
baseFont | string | — |
Defined in packages/pdf/src/tools/pdfa-fonts.ts:24
certificateToDerfunction#
function certificateToDer(input: Uint8Array | string): Uint8Array| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | string | — |
Defined in packages/pdf/src/signatures/pem.ts:59
checkArchiveReadinessfunction#
function checkArchiveReadiness(input: Uint8Array | ArrayBuffer | ArchiveSource): ArchiveReport| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | ArchiveSource | — |
Defined in packages/pdf/src/tools/archive-check.ts:258
checkChainConstraintsfunction#
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 | — |
Defined in packages/pdf/src/signatures/x509.ts:437
checkFieldValuefunction#
function checkFieldValue(field: ValidatedField, value: FormValue, resolve?: FieldValueResolver): FieldIssue | undefined| Parameter | Type | Description |
|---|---|---|
field | ValidatedField | — |
value | FormValue | — |
resolveoptional | FieldValueResolver | — |
Defined in packages/pdf/src/forms/scripts.ts:341
circleThroughfunction#
function circleThrough(a: PdfPoint, b: PdfPoint, c: PdfPoint): { center: PdfPoint; radius: number } | undefinedDefined in packages/pdf/src/annotations/geometry.ts:285
classifyScriptfunction#
function classifyScript(trigger: FieldScriptTrigger, source: string | undefined): FieldScriptInfo| Parameter | Type | Description |
|---|---|---|
trigger | FieldScriptTrigger | — |
source | string | undefined | — |
Defined in packages/pdf/src/forms/scripts.ts:515
comparePageTextsfunction#
function comparePageTexts(textsA: readonly ComparablePageText[], textsB: readonly ComparablePageText[], options: ComparePdfOptions = {}): PdfComparison| Parameter | Type | Description |
|---|---|---|
textsA | readonly ComparablePageText[] | — |
textsB | readonly ComparablePageText[] | — |
optionsoptional | ComparePdfOptions | — |
Defined in packages/pdf/src/compare/compare.ts:275
comparePdffunction#
function comparePdf(a: CompareInput, b: CompareInput, options: ComparePdfOptions = {}): PdfComparison| Parameter | Type | Description |
|---|---|---|
a | CompareInput | — |
b | CompareInput | — |
optionsoptional | ComparePdfOptions | — |
Defined in packages/pdf/src/compare/compare.ts:339
comparePdfAsyncfunction#
function comparePdfAsync(a: CompareInput, b: CompareInput, options: ComparePdfAsyncOptions = {}): Promise<PdfComparison>| Parameter | Type | Description |
|---|---|---|
a | CompareInput | — |
b | CompareInput | — |
optionsoptional | ComparePdfAsyncOptions | — |
Defined in packages/pdf/src/compare/compare.ts:343
compareSyncClocksfunction#
function compareSyncClocks(a: SyncClock, b: SyncClock): numberDefined in packages/pdf/src/annotations/sync.ts:117
comparisonAnnotationsfunction#
function comparisonAnnotations(changes: readonly PdfTextChange[], options: Pick<ComparePdfOptions, 'colors' | 'author'> = {}): { a: AnnotationInput[]; b: AnnotationInput[] }| Parameter | Type | Description |
|---|---|---|
changes | readonly PdfTextChange[] | — |
optionsoptional | Pick<ComparePdfOptions, 'colors' | 'author'> | — |
Defined in packages/pdf/src/compare/compare.ts:213
convertMailFilefunction#
function convertMailFile(bytes: Uint8Array, hint: MailFileHint = {}, options: MailToPdfOptions = {}): Promise<MailConversion>| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
hintoptional | MailFileHint | — |
optionsoptional | MailToPdfOptions | — |
Defined in packages/pdf/src/formats/mail/convert.ts:18
convertToPdfAfunction#
function convertToPdfA(data: Uint8Array | ArrayBuffer, options: PdfAConversionOptions = {}): Promise<PdfAConversionResult>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | PdfAConversionOptions | — |
Defined in packages/pdf/src/tools/pdfa.ts:208
createAnnotationSyncfunction#
function createAnnotationSync(host: AnnotationSyncHost, options: AnnotationSyncOptions): AnnotationSync| Parameter | Type | Description |
|---|---|---|
host | AnnotationSyncHost | — |
options | AnnotationSyncOptions | — |
Defined in packages/pdf/src/annotations/sync.ts:271
createFontRegistryfunction#
function createFontRegistry(fonts: readonly PdfFontSource[] = []): FontRegistry| Parameter | Type | Description |
|---|---|---|
fontsoptional | readonly PdfFontSource[] | — |
Defined in packages/pdf/src/fonts/registry.ts:429
createFormSyncfunction#
function createFormSync(host: FormSyncHost, options: FormSyncOptions): FormSync| Parameter | Type | Description |
|---|---|---|
host | FormSyncHost | — |
options | FormSyncOptions | — |
Defined in packages/pdf/src/annotations/sync-forms.ts:68
createPageSyncfunction#
function createPageSync(host: PageSyncHost, options: PageSyncOptions): PageSync| Parameter | Type | Description |
|---|---|---|
host | PageSyncHost | — |
options | PageSyncOptions | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:208
createPdfViewerfunction#
function createPdfViewer(container: HTMLElement, options: PdfViewerOptions = {}): PdfViewerApi| Parameter | Type | Description |
|---|---|---|
container | HTMLElement | — |
optionsoptional | PdfViewerOptions | — |
Defined in packages/pdf/src/viewer/viewer.ts:71
createPresenceTrackerfunction#
function createPresenceTracker(options: { actorId?: string; timeout?: number; onChange?: (states: PresenceState[]) => void; now?: () => number; } = {}): PresenceTracker| Parameter | Type | Description |
|---|---|---|
optionsoptional | { actorId?: string; timeout?: number; onChange?: (states: PresenceState[]) => void; now?: () => number; } | — |
Defined in packages/pdf/src/annotations/sync.ts:612
createSyncChannelfunction#
function createSyncChannel(transport: SyncTransport, options: SyncChannelOptions = {}): AnnotationSyncChannel| Parameter | Type | Description |
|---|---|---|
transport | SyncTransport | — |
optionsoptional | SyncChannelOptions | — |
Defined in packages/pdf/src/viewer/collaboration-channel.ts:32
createZipfunction#
function createZip(entries: readonly ZipEntry[]): PdfBytes| Parameter | Type | Description |
|---|---|---|
entries | readonly ZipEntry[] | — |
Defined in packages/pdf/src/tools/zip.ts:57
decodeImageFilefunction#
function decodeImageFile(bytes: Uint8Array, options: PrepareImageOptions = {}): Promise<DecodedImage>| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
optionsoptional | PrepareImageOptions | — |
Defined in packages/pdf/src/formats/image/prepare.ts:36
decodeJpegfunction#
function decodeJpeg(bytes: Uint8Array, options: JpegDecodeOptions = {}): JpegImage| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
optionsoptional | JpegDecodeOptions | — |
Defined in packages/pdf/src/pdf/jpeg.ts:587
decompressRtffunction#
function decompressRtf(data: Uint8Array, options: DecompressRtfOptions = {}): Uint8Array| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | — |
optionsoptional | DecompressRtfOptions | — |
Defined in packages/pdf/src/formats/mail/rtf.ts:38
decryptPdffunction#
function decryptPdf(data: Uint8Array | ArrayBuffer, password?: string): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
passwordoptional | string | — |
Defined in packages/pdf/src/document/headless.ts:380
derToPemfunction#
function derToPem(der: Uint8Array, label: string): string| Parameter | Type | Description |
|---|---|---|
der | Uint8Array | — |
label | string | — |
Defined in packages/pdf/src/signatures/pem.ts:19
describeLinkActionfunction#
function describeLinkAction(action: LinkAction | undefined): string| Parameter | Type | Description |
|---|---|---|
action | LinkAction | undefined | — |
Defined in packages/pdf/src/annotations/links.ts:295
describeScriptsfunction#
function describeScripts(field: Pick<PdfFormField, 'format' | 'calculation' | 'range' | 'scripts'>): FieldScriptReport| Parameter | Type | Description |
|---|---|---|
field | Pick<PdfFormField, 'format' | 'calculation' | 'range' | 'scripts'> | — |
Defined in packages/pdf/src/forms/scripts.ts:530
detectFieldsfunction#
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 | — |
optionsoptional | DetectFieldsOptions | — |
Defined in packages/pdf/src/forms/detect.ts:229
detectImageFormatfunction#
function detectImageFormat(bytes: Uint8Array): ImageFileFormat | undefined| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
Defined in packages/pdf/src/formats/image/detect.ts:25
detectMailFormatfunction#
function detectMailFormat(bytes: Uint8Array, hint: MailFileHint = {}): MailFormat | undefined| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
hintoptional | MailFileHint | — |
Defined in packages/pdf/src/formats/mail/detect.ts:19
diffPixelsfunction#
function diffPixels(a: PixelBuffer, b: PixelBuffer, options: PixelDiffOptions = {}): PixelDiffResult| Parameter | Type | Description |
|---|---|---|
a | PixelBuffer | — |
b | PixelBuffer | — |
optionsoptional | PixelDiffOptions | — |
Defined in packages/pdf/src/compare/pixel-diff.ts:113
embedMissingFontsfunction#
function embedMissingFonts(editor: PdfEditor, fonts: Readonly<Record<string, Uint8Array>> = {}): PdfAFontReplacement[]| Parameter | Type | Description |
|---|---|---|
editor | PdfEditor | — |
fontsoptional | Readonly<Record<string, Uint8Array>> | — |
Defined in packages/pdf/src/tools/pdfa-fonts.ts:217
encryptPdffunction#
function encryptPdf(data: Uint8Array | ArrayBuffer, options: EncryptOptions & { password?: string }): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
options | EncryptOptions & { password?: string } | — |
Defined in packages/pdf/src/document/headless.ts:370
fieldKindfunction#
function fieldKind(field: Pick<PdfFormField, 'type' | 'barcode'>): PdfFieldType| Parameter | Type | Description |
|---|---|---|
field | Pick<PdfFormField, 'type' | 'barcode'> | — |
Defined in packages/pdf/src/forms/form-tools.ts:373
filterFieldKeystrokefunction#
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 | — |
selEndoptional | number | — |
Defined in packages/pdf/src/forms/keystroke.ts:76
formatBatesNumberfunction#
function formatBatesNumber(index: number, options: BatesOptions = {}): string| Parameter | Type | Description |
|---|---|---|
index | number | — |
optionsoptional | BatesOptions | — |
Defined in packages/pdf/src/tools/stamping.ts:394
formatFieldValuefunction#
function formatFieldValue(field: Pick<PdfFormField, 'format' | 'value'> & { scripts?: FieldScripts }, value: FormValue = field.value): string| Parameter | Type | Description |
|---|---|---|
field | Pick<PdfFormField, 'format' | 'value'> & { scripts?: FieldScripts } | — |
valueoptional | FormValue | — |
Defined in packages/pdf/src/forms/scripts.ts:208
formatFormMessagefunction#
function formatFormMessage(key: FormMessageKey, params: FormMessageParams = {}, messages: Partial<Record<FormMessageKey, string>> = {}): string| Parameter | Type | Description |
|---|---|---|
key | FormMessageKey | — |
paramsoptional | FormMessageParams | — |
messagesoptional | Partial<Record<FormMessageKey, string>> | — |
Defined in packages/pdf/src/forms/form-messages.ts:32
formatMeasurementfunction#
function formatMeasurement(annotation: Measurable): string| Parameter | Type | Description |
|---|---|---|
annotation | Measurable | — |
Defined in packages/pdf/src/annotations/geometry.ts:647
formSyncHostfunction#
function formSyncHost(document: SyncableDocument): FormSyncHost| Parameter | Type | Description |
|---|---|---|
document | SyncableDocument | — |
Defined in packages/pdf/src/annotations/sync-hosts.ts:18
fromSyncJsonfunction#
function fromSyncJson(value: SyncJson): unknown| Parameter | Type | Description |
|---|---|---|
value | SyncJson | — |
Defined in packages/pdf/src/annotations/sync.ts:149
getDefaultPdfLimitsfunction#
function getDefaultPdfLimits(): PdfLimitsDefined in packages/pdf/src/pdf/limits.ts:62
hitTestAnnotationfunction#
function hitTestAnnotation(annotation: PdfAnnotation, point: PdfPoint, tolerance = 4): boolean| Parameter | Type | Description |
|---|---|---|
annotation | PdfAnnotation | — |
point | PdfPoint | — |
toleranceoptional | unknown | — |
Defined in packages/pdf/src/annotations/geometry.ts:361
hitTestRotatedfunction#
function hitTestRotated(annotation: PdfAnnotation, p: PdfPoint, tolerance = 4): boolean| Parameter | Type | Description |
|---|---|---|
annotation | PdfAnnotation | — |
p | PdfPoint | — |
toleranceoptional | unknown | — |
Defined in packages/pdf/src/annotations/rotation.ts:109
imageMimeTypefunction#
function imageMimeType(format: ImageFileFormat): string| Parameter | Type | Description |
|---|---|---|
format | ImageFileFormat | — |
Defined in packages/pdf/src/formats/image/detect.ts:38
imagesToPdffunction#
function imagesToPdf(images: readonly (Uint8Array | ImagePageInput)[], options: ImagesToPdfOptions = {}): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
images | readonly (Uint8Array | ImagePageInput)[] | — |
optionsoptional | ImagesToPdfOptions | — |
Defined in packages/pdf/src/tools/images.ts:78
importPkcs12PrivateKeyfunction#
function importPkcs12PrivateKey(contents: Pkcs12Contents, hash: 'SHA-256' | 'SHA-384' | 'SHA-512' = 'SHA-256'): Promise<CryptoKey>| Parameter | Type | Description |
|---|---|---|
contents | Pkcs12Contents | — |
hashoptional | 'SHA-256' | 'SHA-384' | 'SHA-512' | — |
Defined in packages/pdf/src/signatures/pkcs12.ts:459
imposePdffunction#
function imposePdf(data: Uint8Array | ArrayBuffer, options: ImposeOptions): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
options | ImposeOptions | — |
Defined in packages/pdf/src/tools/impose.ts:81
isAnnotationOwnerfunction#
function isAnnotationOwner(annotation: Pick<PdfAnnotation, 'author' | 'customData'>, user: AnnotationUser | string): boolean| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'author' | 'customData'> | — |
user | AnnotationUser | string | — |
Defined in packages/pdf/src/annotations/permissions.ts:26
isMediaTypefunction#
function isMediaType(type: AnnotationType): type is MediaAnnotationType| Parameter | Type | Description |
|---|---|---|
type | AnnotationType | — |
Defined in packages/pdf/src/annotations/media.ts:39
isReadOnlyTypefunction#
function isReadOnlyType(type: AnnotationType): boolean| Parameter | Type | Description |
|---|---|---|
type | AnnotationType | — |
Defined in packages/pdf/src/annotations/media.ts:35
isSafeLinkUrifunction#
function isSafeLinkUri(uri: string | undefined | null): boolean| Parameter | Type | Description |
|---|---|---|
uri | string | undefined | null | — |
Defined in packages/pdf/src/annotations/links.ts:39
isTrustListExpiredfunction#
function isTrustListExpired(list: PdfTrustList, now: Date = new Date()): boolean| Parameter | Type | Description |
|---|---|---|
list | PdfTrustList | — |
nowoptional | Date | — |
Defined in packages/pdf/src/signatures/trust-list.ts:64
isUniformRichTextfunction#
function isUniformRichText(paragraphs: readonly RichTextParagraph[]): boolean| Parameter | Type | Description |
|---|---|---|
paragraphs | readonly RichTextParagraph[] | — |
Defined in packages/pdf/src/annotations/rich-text.ts:145
layoutRichTextfunction#
function layoutRichText(paragraphs: readonly RichTextParagraph[], maxWidth: number, defaults: RichTextDefaults = RICH_TEXT_DEFAULTS, registry?: FontRegistry): RichTextLine[]| Parameter | Type | Description |
|---|---|---|
paragraphs | readonly RichTextParagraph[] | — |
maxWidth | number | — |
defaultsoptional | RichTextDefaults | — |
registryoptional | FontRegistry | — |
Defined in packages/pdf/src/annotations/rich-text.ts:504
leaveMessagefunction#
function leaveMessage(actorId: string, sentAt: number = Date.now()): PresenceMessage| Parameter | Type | Description |
|---|---|---|
actorId | string | — |
sentAtoptional | number | — |
Defined in packages/pdf/src/annotations/sync.ts:608
linearizePdffunction#
function linearizePdf(data: Uint8Array | ArrayBuffer, options: LinearizeOptions = {}): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | LinearizeOptions | — |
Defined in packages/pdf/src/tools/linearize.ts:332
linkUriSchemefunction#
function linkUriScheme(uri: string): string | undefined| Parameter | Type | Description |
|---|---|---|
uri | string | — |
Defined in packages/pdf/src/annotations/links.ts:34
loadPdfDocumentfunction#
function loadPdfDocument(data: Uint8Array | ArrayBuffer, options: OpenPdfOptions = {}): Promise<PdfDocument>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | OpenPdfOptions | — |
Defined in packages/pdf/src/document/headless.ts:362
loadTrustListfunction#
function loadTrustList(input: PdfTrustListInput | string): PdfTrustListReads 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 | — |
Defined in packages/pdf/src/signatures/trust-list.ts:33
mailToPdffunction#
function mailToPdf(message: MailMessage, options: MailToPdfOptions = {}): Promise<MailPdfResult>| Parameter | Type | Description |
|---|---|---|
message | MailMessage | — |
optionsoptional | MailToPdfOptions | — |
Defined in packages/pdf/src/formats/mail/mail-to-pdf.ts:646
measureDetailsfunction#
function measureDetails(annotation: Measurable): MeasureDetails| Parameter | Type | Description |
|---|---|---|
annotation | Measurable | — |
Defined in packages/pdf/src/annotations/geometry.ts:571
measureValuefunction#
function measureValue(annotation: Measurable): number| Parameter | Type | Description |
|---|---|---|
annotation | Measurable | — |
Defined in packages/pdf/src/annotations/geometry.ts:643
mergeLineRectsfunction#
function mergeLineRects(rects: readonly PdfRect[], gap = 3): PdfRect[]| Parameter | Type | Description |
|---|---|---|
rects | readonly PdfRect[] | — |
gapoptional | unknown | — |
Defined in packages/pdf/src/annotations/geometry.ts:137
mergePdfsfunction#
function mergePdfs(inputs: readonly MergeFileInput[], options: MergePdfsOptions = {}): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
inputs | readonly MergeFileInput[] | — |
optionsoptional | MergePdfsOptions | — |
Defined in packages/pdf/src/tools/merge.ts:30
mimeTypeForFileNamefunction#
function mimeTypeForFileName(fileName: string): string| Parameter | Type | Description |
|---|---|---|
fileName | string | — |
Defined in packages/pdf/src/pdf/file-spec.ts:88
normalizeDegreesfunction#
function normalizeDegrees(degrees: number): number| Parameter | Type | Description |
|---|---|---|
degrees | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:11
normalizeRichTextfunction#
function normalizeRichText(paragraphs: readonly RichTextParagraph[]): RichTextParagraph[]| Parameter | Type | Description |
|---|---|---|
paragraphs | readonly RichTextParagraph[] | — |
Defined in packages/pdf/src/annotations/rich-text.ts:111
openPdfDocumentfunction#
function openPdfDocument(data: Uint8Array | ArrayBuffer, options: OpenPdfOptions = {}): PdfDocument| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | OpenPdfOptions | — |
Defined in packages/pdf/src/document/headless.ts:357
optimizePdffunction#
function optimizePdf(data: Uint8Array | ArrayBuffer, options: OptimizeOptions = {}): Promise<OptimizeResult>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | OptimizeOptions | — |
Defined in packages/pdf/src/tools/optimize.ts:124
originalPageIdfunction#
function originalPageId(sourceIndex: number): string| Parameter | Type | Description |
|---|---|---|
sourceIndex | number | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:108
pageSyncHostfunction#
function pageSyncHost(document: SyncableDocument): PageSyncHost| Parameter | Type | Description |
|---|---|---|
document | SyncableDocument | — |
Defined in packages/pdf/src/annotations/sync-hosts.ts:38
parseAnnotationsFdffunction#
function parseAnnotationsFdf(data: Uint8Array | ArrayBuffer, fallbackAuthor = 'Unknown'): AnnotationsFdfImport| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
fallbackAuthoroptional | unknown | — |
Defined in packages/pdf/src/annotations/annotations-fdf.ts:137
parseCalculateScriptfunction#
function parseCalculateScript(script: string | undefined): FieldCalculation | undefined| Parameter | Type | Description |
|---|---|---|
script | string | undefined | — |
Defined in packages/pdf/src/forms/scripts.ts:107
parseEmlfunction#
function parseEml(bytes: Uint8Array | ArrayBuffer): MailMessage| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | ArrayBuffer | — |
Defined in packages/pdf/src/formats/mail/eml.ts:159
parseFormatScriptfunction#
function parseFormatScript(script: string | undefined): FieldFormat | undefined| Parameter | Type | Description |
|---|---|---|
script | string | undefined | — |
Defined in packages/pdf/src/forms/scripts.ts:97
parseMailfunction#
function parseMail(bytes: Uint8Array, hint: MailFileHint = {}): MailMessage| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
hintoptional | MailFileHint | — |
Defined in packages/pdf/src/formats/mail/convert.ts:12
parseMsgfunction#
function parseMsg(bytes: Uint8Array | ArrayBuffer): MailMessage| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | ArrayBuffer | — |
Defined in packages/pdf/src/formats/mail/msg.ts:243
parsePageRangesfunction#
function parsePageRanges(text: string, pageCount: number): [number, number][]| Parameter | Type | Description |
|---|---|---|
text | string | — |
pageCount | number | — |
Defined in packages/pdf/src/tools/split.ts:24
parsePkcs12function#
function parsePkcs12(data: Uint8Array | ArrayBuffer, password = ''): Promise<Pkcs12Contents>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
passwordoptional | unknown | — |
Defined in packages/pdf/src/signatures/pkcs12.ts:436
parseRichTextfunction#
function parseRichText(xhtml: string, defaults: Partial<RichTextDefaults> = {}): RichTextParagraph[] | undefined| Parameter | Type | Description |
|---|---|---|
xhtml | string | — |
defaultsoptional | Partial<RichTextDefaults> | — |
Defined in packages/pdf/src/annotations/rich-text.ts:420
parseValidateScriptfunction#
function parseValidateScript(script: string | undefined): FieldRange | undefined| Parameter | Type | Description |
|---|---|---|
script | string | undefined | — |
Defined in packages/pdf/src/forms/scripts.ts:121
parseXfdffunction#
function parseXfdf(xml: string): XfdfImport| Parameter | Type | Description |
|---|---|---|
xml | string | — |
Defined in packages/pdf/src/annotations/xfdf.ts:422
pemBlocksfunction#
function pemBlocks(pem: string, label: string): Uint8Array[]| Parameter | Type | Description |
|---|---|---|
pem | string | — |
label | string | — |
Defined in packages/pdf/src/signatures/pem.ts:11
pemToDerfunction#
function pemToDer(pem: string, label?: string): Uint8Array| Parameter | Type | Description |
|---|---|---|
pem | string | — |
labeloptional | string | — |
Defined in packages/pdf/src/signatures/pem.ts:1
permissionsFromFlagsfunction#
function permissionsFromFlags(flags: number): PdfPermissions| Parameter | Type | Description |
|---|---|---|
flags | number | — |
Defined in packages/pdf/src/security/standard.ts:77
permissionsToFlagsfunction#
function permissionsToFlags(permissions: Partial<PdfPermissions> = {}): number| Parameter | Type | Description |
|---|---|---|
permissionsoptional | Partial<PdfPermissions> | — |
Defined in packages/pdf/src/security/standard.ts:85
plainToRichTextfunction#
function plainToRichText(text: string, style: Omit<RichTextRun, 'text'> = {}): RichTextParagraph[]| Parameter | Type | Description |
|---|---|---|
text | string | — |
styleoptional | Omit<RichTextRun, 'text'> | — |
Defined in packages/pdf/src/annotations/rich-text.ts:141
polygonAreafunction#
function polygonArea(points: readonly PdfPoint[]): number| Parameter | Type | Description |
|---|---|---|
points | readonly PdfPoint[] | — |
Defined in packages/pdf/src/annotations/geometry.ts:534
polylineLengthfunction#
function polylineLength(points: readonly PdfPoint[], isClosed = false): number| Parameter | Type | Description |
|---|---|---|
points | readonly PdfPoint[] | — |
isClosedoptional | unknown | — |
Defined in packages/pdf/src/annotations/geometry.ts:524
positionBetweenfunction#
function positionBetween(before: string | undefined, after: string | undefined, actor = ''): string| Parameter | Type | Description |
|---|---|---|
before | string | undefined | — |
after | string | undefined | — |
actoroptional | unknown | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:135
prepareImagefunction#
function prepareImage(bytes: Uint8Array, options: PrepareImageOptions = {}): Promise<AnnotationImage>| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
optionsoptional | PrepareImageOptions | — |
Defined in packages/pdf/src/formats/image/prepare.ts:56
presenceMessagefunction#
function presenceMessage(state: PresenceState, sentAt: number = Date.now()): PresenceMessage| Parameter | Type | Description |
|---|---|---|
state | PresenceState | — |
sentAtoptional | number | — |
Defined in packages/pdf/src/annotations/sync.ts:600
presetFromAnnotationfunction#
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 } | — |
optionsoptional | { keepText?: boolean; keepSize?: boolean } | — |
Defined in packages/pdf/src/annotations/presets.ts:99
presetStylefunction#
function presetStyle(preset: AnnotationPreset): AnnotationPresetStyle| Parameter | Type | Description |
|---|---|---|
preset | AnnotationPreset | — |
Defined in packages/pdf/src/annotations/presets.ts:128
quadPointsFromQuadsfunction#
function quadPointsFromQuads(quads: readonly PdfQuad[]): number[]| Parameter | Type | Description |
|---|---|---|
quads | readonly PdfQuad[] | — |
Defined in packages/pdf/src/content/structured-text.ts:119
quadPointsFromRectsfunction#
function quadPointsFromRects(rects: readonly PdfRect[]): number[]| Parameter | Type | Description |
|---|---|---|
rects | readonly PdfRect[] | — |
Defined in packages/pdf/src/annotations/geometry.ts:123
quadsFromQuadPointsfunction#
function quadsFromQuadPoints(quadPoints: readonly number[]): [PdfPoint, PdfPoint, PdfPoint, PdfPoint][]| Parameter | Type | Description |
|---|---|---|
quadPoints | readonly number[] | — |
Defined in packages/pdf/src/annotations/geometry.ts:275
readImageInfofunction#
function readImageInfo(bytes: Uint8Array): AnnotationImage| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
Defined in packages/pdf/src/annotations/images.ts:234
rectsFromQuadPointsfunction#
function rectsFromQuadPoints(quadPoints: readonly number[]): PdfRect[]| Parameter | Type | Description |
|---|---|---|
quadPoints | readonly number[] | — |
Defined in packages/pdf/src/annotations/geometry.ts:127
resizeRotatedfunction#
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 | — |
minSizeoptional | unknown | — |
Defined in packages/pdf/src/annotations/rotation.ts:125
resolveShortcutsfunction#
function resolveShortcuts(overrides: ShortcutOverrides | undefined, warn: (message: string) => void = () => undefined): readonly Shortcut[]| Parameter | Type | Description |
|---|---|---|
overrides | ShortcutOverrides | undefined | — |
warnoptional | (message: string) => void | — |
Defined in packages/pdf/src/viewer/keyboard.ts:270
richTextDefaultStylefunction#
function richTextDefaultStyle(defaults: RichTextDefaults = RICH_TEXT_DEFAULTS): string| Parameter | Type | Description |
|---|---|---|
defaultsoptional | RichTextDefaults | — |
Defined in packages/pdf/src/annotations/rich-text.ts:176
richTextToPlainfunction#
function richTextToPlain(paragraphs: readonly RichTextParagraph[]): string| Parameter | Type | Description |
|---|---|---|
paragraphs | readonly RichTextParagraph[] | — |
Defined in packages/pdf/src/annotations/rich-text.ts:137
richTextToXhtmlfunction#
function richTextToXhtml(paragraphs: readonly RichTextParagraph[], defaults: RichTextDefaults = RICH_TEXT_DEFAULTS): string| Parameter | Type | Description |
|---|---|---|
paragraphs | readonly RichTextParagraph[] | — |
defaultsoptional | RichTextDefaults | — |
Defined in packages/pdf/src/annotations/rich-text.ts:180
rotateAnnotationfunction#
function rotateAnnotation(annotation: PdfAnnotation, degrees: number): AnnotationPatch| Parameter | Type | Description |
|---|---|---|
annotation | PdfAnnotation | — |
degrees | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:70
rotatedBoundsfunction#
function rotatedBounds(rect: PdfRect, degrees: number): PdfRect| Parameter | Type | Description |
|---|---|---|
rect | PdfRect | — |
degrees | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:28
rotatedCornersfunction#
function rotatedCorners(rect: PdfRect, degrees: number): [PdfPoint, PdfPoint, PdfPoint, PdfPoint]| Parameter | Type | Description |
|---|---|---|
rect | PdfRect | — |
degrees | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:21
rotationFromPointerfunction#
function rotationFromPointer(annotation: Pick<PdfAnnotation, 'rect'>, pointer: PdfPoint, snap = 0): number| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'rect'> | — |
pointer | PdfPoint | — |
snapoptional | unknown | — |
Defined in packages/pdf/src/annotations/rotation.ts:118
rotationHandlePointfunction#
function rotationHandlePoint(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>, offset = 20): PdfPoint| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'rect' | 'rotation'> | — |
offsetoptional | unknown | — |
Defined in packages/pdf/src/annotations/rotation.ts:113
rtfToHtmlfunction#
function rtfToHtml(rtf: Uint8Array | string): string| Parameter | Type | Description |
|---|---|---|
rtf | Uint8Array | string | — |
Defined in packages/pdf/src/formats/mail/rtf.ts:317
rtfToTextfunction#
function rtfToText(rtf: Uint8Array | string): string| Parameter | Type | Description |
|---|---|---|
rtf | Uint8Array | string | — |
Defined in packages/pdf/src/formats/mail/rtf.ts:321
sanitizePdffunction#
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 | — |
optionsoptional | SanitizeOptions | — |
Defined in packages/pdf/src/tools/sanitize.ts:393
selectPagesfunction#
function selectPages(pageCount: number, selector: PageSelector): number[]| Parameter | Type | Description |
|---|---|---|
pageCount | number | — |
selector | PageSelector | — |
Defined in packages/pdf/src/tools/split.ts:44
setAnnotationRotationfunction#
function setAnnotationRotation(annotation: PdfAnnotation, degrees: number): AnnotationPatch| Parameter | Type | Description |
|---|---|---|
annotation | PdfAnnotation | — |
degrees | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:66
setDefaultPdfLimitsfunction#
function setDefaultPdfLimits(limits?: Partial<PdfLimits>): PdfLimits| Parameter | Type | Description |
|---|---|---|
limitsoptional | Partial<PdfLimits> | — |
Defined in packages/pdf/src/pdf/limits.ts:66
shortcutForfunction#
function shortcutFor(event: KeyLike, isPresenting = false, shortcuts: readonly Shortcut[] = KEYBOARD_SHORTCUTS): ViewerCommand | undefined| Parameter | Type | Description |
|---|---|---|
event | KeyLike | — |
isPresentingoptional | unknown | — |
shortcutsoptional | readonly Shortcut[] | — |
Defined in packages/pdf/src/viewer/keyboard.ts:299
signPdffunction#
function signPdf(data: Uint8Array | ArrayBuffer, input: SignPdfOptions): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
input | SignPdfOptions | — |
Defined in packages/pdf/src/signatures/sign.ts:414
simplifyPathfunction#
function simplifyPath(points: readonly PdfPoint[], tolerance = 0.6): PdfPoint[]| Parameter | Type | Description |
|---|---|---|
points | readonly PdfPoint[] | — |
toleranceoptional | unknown | — |
Defined in packages/pdf/src/annotations/geometry.ts:167
smoothStrokefunction#
function smoothStroke(points: readonly PdfPoint[]): PdfPoint[]| Parameter | Type | Description |
|---|---|---|
points | readonly PdfPoint[] | — |
Defined in packages/pdf/src/annotations/geometry.ts:208
splitPdffunction#
function splitPdf(data: Uint8Array | ArrayBuffer, options: SplitOptions, naming: SplitNaming = {}): Promise<SplitPart[]>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
options | SplitOptions | — |
namingoptional | SplitNaming | — |
Defined in packages/pdf/src/tools/split.ts:167
tablesToXlsxfunction#
function tablesToXlsx(tables: readonly (readonly string[][])[]): PdfBytesWrites 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[][])[] | — |
Defined in packages/pdf/src/tools/export-office.ts:376
toolbarPresetOptionsfunction#
function toolbarPresetOptions(preset: ToolbarPreset, allTools: readonly ViewerTool[]): Partial<PdfViewerOptions>| Parameter | Type | Description |
|---|---|---|
preset | ToolbarPreset | — |
allTools | readonly ViewerTool[] | — |
Defined in packages/pdf/src/viewer/presets.ts:49
toPdfBytesfunction#
function toPdfBytes(bytes: Uint8Array): PdfBytes| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
Defined in packages/pdf/src/pdf/bytes.ts:3
toRotatedPointfunction#
function toRotatedPoint(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>, p: PdfPoint): PdfPoint| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'rect' | 'rotation'> | — |
p | PdfPoint | — |
Defined in packages/pdf/src/annotations/rotation.ts:104
toSyncJsonfunction#
function toSyncJson(value: unknown): SyncJson| Parameter | Type | Description |
|---|---|---|
value | unknown | — |
Defined in packages/pdf/src/annotations/sync.ts:136
toUnrotatedPointfunction#
function toUnrotatedPoint(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>, p: PdfPoint): PdfPoint| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'rect' | 'rotation'> | — |
p | PdfPoint | — |
Defined in packages/pdf/src/annotations/geometry.ts:269
unrotatedRectFromBoundsfunction#
function unrotatedRectFromBounds(bounds: PdfRect, degrees: number, aspect?: number): PdfRect | undefined| Parameter | Type | Description |
|---|---|---|
bounds | PdfRect | — |
degrees | number | — |
aspectoptional | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:33
uprightPlacementfunction#
function uprightPlacement(rect: PdfRect, pageRotation: number): { rect: PdfRect; rotation: number | undefined }| Parameter | Type | Description |
|---|---|---|
rect | PdfRect | — |
pageRotation | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:150
uprightRotationfunction#
function uprightRotation(pageRotation: number): number| Parameter | Type | Description |
|---|---|---|
pageRotation | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:146
validateFieldValuefunction#
function validateFieldValue(field: ValidatedField, value: FormValue, resolve?: FieldValueResolver): string | undefined| Parameter | Type | Description |
|---|---|---|
field | ValidatedField | — |
value | FormValue | — |
resolveoptional | FieldValueResolver | — |
Defined in packages/pdf/src/forms/scripts.ts:361
validatePdfAfunction#
function validatePdfA(input: Uint8Array | ArrayBuffer | PdfFile): PdfAValidation| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | PdfFile | — |
Defined in packages/pdf/src/tools/pdfa-validate.ts:682
verifyPdfSignaturesfunction#
function verifyPdfSignatures(data: Uint8Array | ArrayBuffer, options: VerifySignaturesOptions = {}): Promise<PdfSignatureVerification[]>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | VerifySignaturesOptions | — |
Defined in packages/pdf/src/signatures/verify.ts:731
viewportTransformfunction#
function viewportTransform(box: PdfRect, rotation: number, scale: number): Matrix| Parameter | Type | Description |
|---|---|---|
box | PdfRect | — |
rotation | number | — |
scale | number | — |
Defined in packages/pdf/src/annotations/geometry.ts:35
zipSplitPartsfunction#
function zipSplitParts(parts: readonly SplitPart[]): PdfBytes| Parameter | Type | Description |
|---|---|---|
parts | readonly SplitPart[] | — |
Defined in packages/pdf/src/tools/split.ts:199
FontFormatErrorclass#
class FontFormatError extends Error
new FontFormatError(message: string)Defined in packages/pdf/src/fonts/truetype.ts:21
ImageDecoderRequiredErrorclass#
class ImageDecoderRequiredError extends ImageFormatError
new ImageDecoderRequiredError(readonly mimeType: string)| Member | Type | Description |
|---|---|---|
mimeTypereadonly | string | — |
Defined in packages/pdf/src/formats/image/prepare.ts:7
ImageFormatErrorclass#
class ImageFormatError extends Error
new ImageFormatError(message: string)Defined in packages/pdf/src/annotations/images.ts:6
InflateErrorclass#
class InflateError extends Error
new InflateError(message: string)Defined in packages/pdf/src/pdf/inflate.ts:44
JpegErrorclass#
class JpegError extends Error
new JpegError(message: string)Defined in packages/pdf/src/pdf/jpeg.ts:2
MailFormatErrorclass#
class MailFormatError extends Error
new MailFormatError(message: string)Defined in packages/pdf/src/formats/mail/types.ts:1
PdfCryptoUnavailableErrorclass#
class PdfCryptoUnavailableError extends Error
new PdfCryptoUnavailableError()Defined in packages/pdf/src/security/aes.ts:3
PdfInputErrorclass#
class PdfInputError extends TypeError
new PdfInputError(readonly path: string, message: string)| Member | Type | Description |
|---|---|---|
pathreadonly | string | — |
Defined in packages/pdf/src/document/input-checks.ts:6
PdfLimitErrorclass#
class PdfLimitError extends Error
new PdfLimitError(readonly limit: PdfLimitName, readonly allowed: number, message: string)| Member | Type | Description |
|---|---|---|
limitreadonly | PdfLimitName | — |
allowedreadonly | number | — |
Defined in packages/pdf/src/pdf/limits.ts:16
PdfMissingGlyphErrorclass#
class PdfMissingGlyphError extends Error
new PdfMissingGlyphError(report: MissingGlyphReport)| Member | Type | Description |
|---|---|---|
charactersreadonly | string | — |
scriptsreadonly | TextScript[] | — |
Defined in packages/pdf/src/fonts/missing-glyphs.ts:8
PdfPasswordErrorclass#
class PdfPasswordError extends Error
new PdfPasswordError(readonly reason: 'password-required' | 'password-incorrect' | 'unsupported')| Member | Type | Description |
|---|---|---|
reasonreadonly | 'password-required' | 'password-incorrect' | 'unsupported' | — |
Defined in packages/pdf/src/security/standard.ts:36
PdfPermissionErrorclass#
class PdfPermissionError extends Error
new PdfPermissionError(readonly permission: PdfPermissionName)| Member | Type | Description |
|---|---|---|
permissionreadonly | PdfPermissionName | — |
Defined in packages/pdf/src/document/permissions.ts:17
PdfSyntaxErrorclass#
class PdfSyntaxError extends Error
new PdfSyntaxError(message: string, readonly offset: number)| Member | Type | Description |
|---|---|---|
offsetreadonly | number | — |
Defined in packages/pdf/src/pdf/parser.ts:4
PdfWriteErrorclass#
class PdfWriteError extends Error
new PdfWriteError(message: string)Defined in packages/pdf/src/pdf/writer.ts:7
Pkcs12Errorclass#
class Pkcs12Error extends Error
new Pkcs12Error(readonly reason: Pkcs12ErrorReason, message: string)| Member | Type | Description |
|---|---|---|
reasonreadonly | Pkcs12ErrorReason | — |
Defined in packages/pdf/src/signatures/pkcs12.ts:22
UnsupportedFilterErrorclass#
class UnsupportedFilterError extends Error
new UnsupportedFilterError(readonly filter: string)| Member | Type | Description |
|---|---|---|
filterreadonly | string | — |
Defined in packages/pdf/src/pdf/filters.ts:13
ATTACHMENT_RELATIONSHIPSconst#
const ATTACHMENT_RELATIONSHIPS: readonly AttachmentRelationship[]Defined in packages/pdf/src/pdf/file-spec.ts:23
DEFAULT_LABELSconst#
const DEFAULT_LABELS: Record<LabelKey, string> & { tools: Record<ViewerTool, string> }Defined in packages/pdf/src/viewer/labels.ts:89
DEFAULT_STYLESconst#
const DEFAULT_STYLES: Record<AnnotationType, AnnotationDefaults>Defined in packages/pdf/src/annotations/store.ts:139
FILE_ATTACHMENT_ICONSconst#
const FILE_ATTACHMENT_ICONS: readonly FileAttachmentIcon[]Defined in packages/pdf/src/annotations/media.ts:33
FORM_MESSAGESconst#
const FORM_MESSAGES: Record<FormMessageKey, string>Defined in packages/pdf/src/forms/form-messages.ts:17
KEYBOARD_SHORTCUTSconst#
const KEYBOARD_SHORTCUTS: readonly Shortcut[]Defined in packages/pdf/src/viewer/keyboard.ts:150
PDF_VIEWER_EVENT_NAMESconst#
const PDF_VIEWER_EVENT_NAMES: readonly (keyof PdfViewerEvents)[]Defined in packages/pdf/src/viewer/viewer.ts:23
pdfLocaleDeconst#
const pdfLocaleDe: PdfViewerLabelsDefined in packages/pdf/src/viewer/locales/de.ts:17
pdfLocaleEnconst#
const pdfLocaleEn: PdfViewerLabelsDefined in packages/pdf/src/viewer/locales/en.ts:4
pdfLocaleEsconst#
const pdfLocaleEs: PdfViewerLabelsDefined in packages/pdf/src/viewer/locales/es.ts:17
pdfLocaleFrconst#
const pdfLocaleFr: PdfViewerLabelsDefined in packages/pdf/src/viewer/locales/fr.ts:17
pdfLocaleJaconst#
const pdfLocaleJa: PdfViewerLabelsDefined in packages/pdf/src/viewer/locales/ja.ts:17
pdfLocalePtconst#
const pdfLocalePt: PdfViewerLabelsDefined in packages/pdf/src/viewer/locales/pt.ts:17
pdfLocaleZhconst#
const pdfLocaleZh: PdfViewerLabelsDefined in packages/pdf/src/viewer/locales/zh.ts:17
pdfStylesconst#
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; } } `Defined in packages/pdf/src/styles.ts:1
pdfViewerDefinitionconst#
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>Defined in packages/pdf/src/viewer/viewer.ts:563
PLACEHOLDER_PAGE_IDconst#
const PLACEHOLDER_PAGE_ID: "placeholder" = 'placeholder'Defined in packages/pdf/src/annotations/sync-pages.ts:106
RECOGNISED_FUNCTIONSconst#
const RECOGNISED_FUNCTIONS: readonly string[]Defined in packages/pdf/src/forms/scripts.ts:41
REDACTION_PATTERN_NAMESconst#
const REDACTION_PATTERN_NAMES: readonly ("date" | "email" | "phone" | "ssn" | "creditCard" | "iban")[]Defined in packages/pdf/src/content/text.ts:439
REDACTION_PATTERNSconst#
const REDACTION_PATTERNS: { readonly email: RegExp; readonly phone: RegExp; readonly ssn: RegExp; readonly creditCard: RegExp; readonly iban: RegExp; readonly date: RegExp; }Defined in packages/pdf/src/content/text.ts:426
RICH_TEXT_DEFAULTSconst#
const RICH_TEXT_DEFAULTS: RichTextDefaultsDefined in packages/pdf/src/annotations/rich-text.ts:25
STAMP_COLORSconst#
const STAMP_COLORS: Record<string, string>Defined in packages/pdf/src/annotations/stamp-layout.ts:4
STAMP_LABELSconst#
const STAMP_LABELS: Record<string, string>Defined in packages/pdf/src/annotations/stamp-layout.ts:15
AccessibilityIssueinterface#
interface AccessibilityIssue| Property | Type | Description |
|---|---|---|
code | AccessibilityCode | — |
severity | 'error' | 'warning' | — |
message | string | — |
pageIndexoptional | number | — |
figureIdoptional | string | For figure-without-alt: the id to pass to setAlternateText. |
Defined in packages/pdf/src/tools/accessibility.ts:21
AccessibilityReportinterface#
interface AccessibilityReport| Property | Type | Description |
|---|---|---|
isTagged | boolean | — |
titleoptional | string | — |
languageoptional | 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. |
Defined in packages/pdf/src/tools/accessibility.ts:30
AddDocumentTimestampOptionsinterface#
interface AddDocumentTimestampOptions| Property | Type | Description |
|---|---|---|
timestamp | TimestampCallback | — |
fieldNameoptional | string | — |
placeholderSizeoptional | number | — |
passwordoptional | string | — |
Defined in packages/pdf/src/signatures/document-timestamp.ts:14
AddImageOptionsinterface#
interface AddImageOptionsDefined in packages/pdf/src/content-edit/types.ts:161
AddMarkOptionsinterface#
interface AddMarkOptions| Property | Type | Description |
|---|---|---|
kind | PageMarkKind | — |
x | number | Centre of the mark. |
y | number | — |
sizeoptional | number | — |
coloroptional | string | — |
Defined in packages/pdf/src/content-edit/add-content.ts:201
AddTextOptionsinterface#
interface AddTextOptions| Property | Type | Description |
|---|---|---|
text | string | — |
x | number | — |
y | number | — |
fontSizeoptional | number | — |
coloroptional | string | — |
opacityoptional | number | — |
fontoptional | StandardFontName | — |
fontNameoptional | string | Name of a supplied font to use instead of a standard one. |
rotationoptional | number | — |
lineHeightoptional | number | — |
fontsoptional | FontRegistry | — |
Defined in packages/pdf/src/content-edit/types.ts:142
AddTextResultinterface#
interface AddTextResult extends TextEditResult| Property | Type | Description |
|---|---|---|
rectoptional | PdfRect | — |
ok | boolean | Inherited from TextEditResult. |
reasonoptional | ContentEditFailure | undefined | Inherited from TextEditResult. |
messageoptional | string | undefined | Inherited from TextEditResult. |
usedFontoptional | "original" | "embedded" | "standard" | undefined | Inherited from TextEditResult. |
fontNamesoptional | string[] | undefined | Inherited from TextEditResult. |
missingoptional | string | undefined | Inherited from TextEditResult. |
widthChangeoptional | number | undefined | Inherited from TextEditResult. |
Defined in packages/pdf/src/content-edit/types.ts:157
AddValidationDataOptionsinterface#
interface AddValidationDataOptions| Property | Type | Description |
|---|---|---|
certificatesoptional | (Uint8Array | string)[] | — |
ocspsoptional | Uint8Array[] | — |
crlsoptional | Uint8Array[] | — |
fetchoptional | ValidationDataCallback | — |
passwordoptional | string | — |
nowoptional | Date | — |
Defined in packages/pdf/src/signatures/dss.ts:97
AnnotationAttachmentinterface#
interface AnnotationAttachment| Property | Type | Description |
|---|---|---|
fileName | string | — |
mimeTypeoptional | string | — |
descriptionoptional | string | — |
sizeoptional | number | — |
dataoptional | Uint8Array | — |
relationshipoptional | AttachmentRelationship | — |
Defined in packages/pdf/src/annotations/types.ts:112
AnnotationAttachmentFileinterface#
interface AnnotationAttachmentFile| Property | Type | Description |
|---|---|---|
fileName | string | — |
mimeType | string | — |
descriptionoptional | string | — |
data | Uint8Array | — |
relationshipoptional | AttachmentRelationship | — |
Defined in packages/pdf/src/annotations/types.ts:121
AnnotationChangeSetinterface#
interface AnnotationChangeSet| Property | Type | Description |
|---|---|---|
added | PdfAnnotation[] | — |
changed | { before: PdfAnnotation; after: PdfAnnotation }[] | — |
removed | PdfAnnotation[] | — |
source | ChangeSource | — |
Defined in packages/pdf/src/annotations/store.ts:124
AnnotationDefaultsinterface#
interface AnnotationDefaults| Property | Type | Description |
|---|---|---|
color | string | — |
opacity | number | — |
strokeWidth | number | — |
fillColoroptional | string | — |
fontSizeoptional | number | — |
Defined in packages/pdf/src/annotations/store.ts:131
AnnotationImageinterface#
interface AnnotationImageDefined in packages/pdf/src/annotations/types.ts:54
AnnotationPermissionOptionsinterface#
interface AnnotationPermissionOptions| Property | Type | Description |
|---|---|---|
isDocumentReadOnlyoptional | boolean | — |
canAnnotateoptional | boolean | — |
Defined in packages/pdf/src/annotations/permissions.ts:21
AnnotationPermissionsinterface#
interface AnnotationPermissions| Property | Type | Description |
|---|---|---|
canMove | boolean | — |
canResize | boolean | — |
canEditContents | boolean | — |
canEditStyle | boolean | — |
canDelete | boolean | — |
canReply | boolean | — |
canChangeStatus | boolean | — |
isOwner | boolean | — |
Defined in packages/pdf/src/annotations/permissions.ts:10
AnnotationPresetinterface#
interface AnnotationPreset extends AnnotationPresetStyle| Property | Type | Description |
|---|---|---|
id | string | — |
name | string | — |
type | AnnotationType | — |
coloroptional | string | undefined | Inherited from AnnotationPresetStyle. |
fillColoroptional | string | undefined | Inherited from AnnotationPresetStyle. |
opacityoptional | number | undefined | Inherited from AnnotationPresetStyle. |
strokeWidthoptional | number | undefined | Inherited from AnnotationPresetStyle. |
borderStyleoptional | BorderStyle | undefined | Inherited from AnnotationPresetStyle. |
lineEndingsoptional | [LineEnding, LineEnding] | undefined | Inherited from AnnotationPresetStyle. |
fontSizeoptional | number | undefined | Inherited from AnnotationPresetStyle. |
fontColoroptional | string | undefined | Inherited from AnnotationPresetStyle. |
fontFamilyoptional | AnnotationFont | undefined | Inherited from AnnotationPresetStyle. |
textAlignoptional | RichTextAlign | undefined | Inherited from AnnotationPresetStyle. |
iconoptional | NoteIcon | undefined | Inherited from AnnotationPresetStyle. |
iconNameoptional | string | undefined | Inherited from AnnotationPresetStyle. |
stampoptional | string | undefined | Inherited from AnnotationPresetStyle. |
stampLabeloptional | string | undefined | Inherited from AnnotationPresetStyle. |
labeloptional | string | undefined | Inherited from AnnotationPresetStyle. |
measureScaleoptional | MeasureScale | undefined | Inherited from AnnotationPresetStyle. |
rotationoptional | number | undefined | Inherited from AnnotationPresetStyle. |
overlayTextoptional | string | undefined | Inherited from AnnotationPresetStyle. |
textoptional | string | undefined | Inherited from AnnotationPresetStyle. |
contentsoptional | string | undefined | Inherited from AnnotationPresetStyle. |
widthoptional | number | undefined | Inherited from AnnotationPresetStyle. |
heightoptional | number | undefined | Inherited from AnnotationPresetStyle. |
Defined in packages/pdf/src/annotations/presets.ts:38
AnnotationPresetsJsoninterface#
interface AnnotationPresetsJson| Property | Type | Description |
|---|---|---|
format | 'birchui-pdf-annotation-presets' | — |
version | 1 | — |
presets | AnnotationPreset[] | — |
Defined in packages/pdf/src/annotations/presets.ts:44
AnnotationPresetStyleinterface#
interface AnnotationPresetStyle| Property | Type | Description |
|---|---|---|
coloroptional | string | — |
fillColoroptional | string | — |
opacityoptional | number | — |
strokeWidthoptional | number | — |
borderStyleoptional | BorderStyle | — |
lineEndingsoptional | [LineEnding, LineEnding] | — |
fontSizeoptional | number | — |
fontColoroptional | string | — |
fontFamilyoptional | AnnotationFont | — |
textAlignoptional | RichTextAlign | — |
iconoptional | NoteIcon | — |
iconNameoptional | string | — |
stampoptional | string | — |
stampLabeloptional | string | — |
labeloptional | string | — |
measureScaleoptional | MeasureScale | — |
rotationoptional | number | — |
overlayTextoptional | string | — |
textoptional | string | — |
contentsoptional | string | — |
widthoptional | number | — |
heightoptional | number | — |
Defined in packages/pdf/src/annotations/presets.ts:13
AnnotationReplyinterface#
interface AnnotationReply| Property | Type | Description |
|---|---|---|
id | string | — |
author | string | — |
contents | string | — |
createdAt | string | — |
modifiedAt | string | — |
Defined in packages/pdf/src/annotations/types.ts:46
AnnotationsFdfImportinterface#
interface AnnotationsFdfImport| Property | Type | Description |
|---|---|---|
annotations | AnnotationInput[] | — |
fileNameoptional | string | — |
Defined in packages/pdf/src/annotations/annotations-fdf.ts:18
AnnotationsFdfOptionsinterface#
interface AnnotationsFdfOptions| Property | Type | Description |
|---|---|---|
fileNameoptional | string | — |
includeAppearancesoptional | boolean | — |
fontsoptional | FontRegistry | — |
pageRotationsoptional | readonly number[] | — |
Defined in packages/pdf/src/annotations/annotations-fdf.ts:11
AnnotationsJsoninterface#
interface AnnotationsJson| Property | Type | Description |
|---|---|---|
format | 'birchui-pdf-annotations' | — |
version | 1 | — |
annotations | (Omit<PdfAnnotation, 'image'> & { image?: { data: string; mimeType: string; width: number; height: number }; })[] | — |
Defined in packages/pdf/src/annotations/xfdf.ts:637
AnnotationSyncinterface#
interface AnnotationSync| Property | Type | Description |
|---|---|---|
receive() | (operations: SyncOperation | SyncOperation[]) => void | — |
merge() | (snapshot: SyncSnapshot) => void | — |
snapshot() | () => SyncSnapshot | — |
refresh() | () => void | — |
destroy() | () => void | — |
Defined in packages/pdf/src/annotations/sync.ts:81
AnnotationSyncChannelinterface#
interface AnnotationSyncChannel| Property | Type | Description |
|---|---|---|
actorIdoptional | string | — |
coloroptional | string | — |
send() | (operations: SyncOperation[]) => void | — |
onRemote() | (receive: (operations: SyncOperation | SyncOperation[]) => void) => (() => void) | void | — |
sendPresence()optional | (message: PresenceMessage) => void | — |
onRemotePresence()optional | (receive: (message: PresenceMessage) => void) => (() => void) | void | — |
onConflict()optional | (conflict: SyncConflict) => void | — |
snapshotoptional | SyncSnapshot | — |
sendFormValues()optional | (operations: FormSyncOperation[]) => void | — |
onRemoteFormValues()optional | (receive: (operations: FormSyncOperation | FormSyncOperation[]) => void) => (() => void) | void | — |
onFormConflict()optional | (conflict: FormSyncConflict) => void | — |
sendPageOperations()optional | (operations: PageSyncOperation[]) => void | — |
onRemotePageOperations()optional | (receive: (operations: PageSyncOperation | PageSyncOperation[]) => void) => (() => void) | void | — |
onPageConflict()optional | (conflict: PageSyncConflict) => void | — |
presenceTimeoutoptional | number | — |
onPresenceChange()optional | (collaborators: PresenceState[]) => void | — |
Defined in packages/pdf/src/viewer/collaboration.ts:32
AnnotationSyncHostinterface#
interface AnnotationSyncHost| Property | Type | Description |
|---|---|---|
getAnnotations() | () => PdfAnnotation[] | — |
applyRemoteChanges() | (changes: RemoteAnnotationChanges) => void | — |
subscribeAnnotationChanges() | (listener: (changes: SyncAnnotationChanges) => void) => () => void | — |
Defined in packages/pdf/src/annotations/sync.ts:43
AnnotationSyncOptionsinterface#
interface AnnotationSyncOptions| Property | Type | Description |
|---|---|---|
actorId | string | — |
send | (operations: SyncOperation[]) => void | — |
authoroptional | string | — |
onConflictoptional | (conflict: SyncConflict) => void | — |
snapshotoptional | SyncSnapshot | — |
pageIdsoptional | () => readonly (string | undefined)[] | — |
Defined in packages/pdf/src/annotations/sync.ts:49
AnnotationUserinterface#
interface AnnotationUserDefined in packages/pdf/src/annotations/permissions.ts:4
ApplyRedactionsAsyncOptionsinterface#
interface ApplyRedactionsAsyncOptions| Property | Type | Description |
|---|---|---|
decodeImageoptional | AsyncRedactionImageDecoder | — |
Defined in packages/pdf/src/document/session-types.ts:174
ApplyRedactionsOptionsinterface#
interface ApplyRedactionsOptions| Property | Type | Description |
|---|---|---|
decodeImageoptional | RedactionImageDecoder | — |
Defined in packages/pdf/src/document/session-types.ts:170
ArcGeometryinterface#
interface ArcGeometryDefined in packages/pdf/src/annotations/geometry.ts:299
ArchiveFindinginterface#
interface ArchiveFinding| Property | Type | Description |
|---|---|---|
rule | ArchiveRule | — |
severity | ArchiveSeverity | — |
message | string | — |
pageIndexoptional | number | — |
Defined in packages/pdf/src/tools/archive-check.ts:21
ArchiveFontUsageinterface#
interface ArchiveFontUsage| Property | Type | Description |
|---|---|---|
name | string | — |
isEmbedded | boolean | — |
pages | number[] | — |
Defined in packages/pdf/src/tools/archive-check.ts:28
ArchiveReportinterface#
interface ArchiveReport| Property | Type | Description |
|---|---|---|
isLikelyConformant | boolean | — |
declaredoptional | { part: number; conformance?: string } | — |
findings | ArchiveFinding[] | — |
fonts | ArchiveFontUsage[] | — |
Defined in packages/pdf/src/tools/archive-check.ts:34
AttachmentOpenEventinterface#
interface AttachmentOpenEvent| Property | Type | Description |
|---|---|---|
name | string | — |
mimeType | string | — |
size | number | — |
data | Uint8Array | — |
source | 'document' | 'annotation' | — |
pageIndexoptional | number | — |
relationshipoptional | AttachmentRelationship | — |
descriptionoptional | string | — |
Defined in packages/pdf/src/viewer/types.ts:364
BackgroundOptionsinterface#
interface BackgroundOptionsDefined in packages/pdf/src/tools/stamping.ts:430
BarcodeFieldInfointerface#
interface BarcodeFieldInfo| Property | Type | Description |
|---|---|---|
symbology | 'pdf417' | 'qrCode' | 'dataMatrix' | 'unknown' | — |
Defined in packages/pdf/src/forms/types.ts:115
BatesOptionsinterface#
interface BatesOptions| Property | Type | Description |
|---|---|---|
prefixoptional | string | — |
suffixoptional | string | — |
startoptional | number | — |
digitsoptional | number | — |
positionoptional | StampPosition | — |
fontSizeoptional | number | — |
coloroptional | string | — |
fontoptional | StandardFont | — |
marginoptional | number | — |
fontsoptional | FontRegistry | — |
Defined in packages/pdf/src/tools/stamping.ts:71
BlankScanOptionsinterface#
interface BlankScanOptions| Property | Type | Description |
|---|---|---|
whiteLeveloptional | number | Lightness from 0 to 255 at or above which a pixel counts as paper. |
toleranceoptional | number | Share of pixels that may be darker than paper, for dust and scanner noise. |
borderoptional | number | Share of each edge that is left out, where scanners leave shadows. |
Defined in packages/pdf/src/tools/blank-scan.ts:4
ChainProbleminterface#
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 | — |
Defined in packages/pdf/src/signatures/x509.ts:397
CommentFilterinterface#
interface CommentFilter| Property | Type | Description |
|---|---|---|
authoroptional | string | — |
typeoptional | AnnotationType | — |
statusoptional | ReviewStatus | — |
pagesoptional | number[] | — |
Defined in packages/pdf/src/viewer/comment-summary.ts:20
CommentSummaryOptionsinterface#
interface CommentSummaryOptions extends CommentFilter| Property | Type | Description |
|---|---|---|
format | CommentSummaryFormat | — |
sortoptional | CommentSort | — |
titleoptional | string | — |
includeRepliesoptional | boolean | — |
fontsoptional | PdfFontSource[] | — |
allowMissingGlyphsoptional | boolean | — |
authoroptional | string | undefined | Inherited from CommentFilter. |
typeoptional | AnnotationType | undefined | Inherited from CommentFilter. |
statusoptional | ReviewStatus | undefined | Inherited from CommentFilter. |
pagesoptional | number[] | undefined | Inherited from CommentFilter. |
Defined in packages/pdf/src/viewer/comment-summary.ts:27
ComparableDocumentinterface#
interface ComparableDocument| Property | Type | Description |
|---|---|---|
pageCountreadonly | number | — |
getPageText() | (pageIndex: number) => ComparablePageText | — |
Defined in packages/pdf/src/compare/types.ts:64
ComparablePageTextinterface#
interface ComparablePageTextDefined in packages/pdf/src/compare/types.ts:59
ComparePdfAsyncOptionsinterface#
interface ComparePdfAsyncOptions extends ComparePdfOptions| Property | Type | Description |
|---|---|---|
passwordoptional | string | — |
otherPasswordoptional | string | — |
ignoreCaseoptional | boolean | undefined | Inherited from ComparePdfOptions. |
ignoreWhitespaceoptional | boolean | undefined | Inherited from ComparePdfOptions. |
annotationsoptional | boolean | undefined | Inherited from ComparePdfOptions. |
minMoveWordsoptional | number | undefined | Inherited from ComparePdfOptions. |
pageSimilarityThresholdoptional | number | undefined | Inherited from ComparePdfOptions. |
colorsoptional | { inserted?: string; deleted?: string; moved?: string; } | undefined | Inherited from ComparePdfOptions. |
authoroptional | string | undefined | Inherited from ComparePdfOptions. |
Defined in packages/pdf/src/compare/types.ts:71
ComparePdfOptionsinterface#
interface ComparePdfOptions| Property | Type | Description |
|---|---|---|
ignoreCaseoptional | boolean | — |
ignoreWhitespaceoptional | boolean | — |
annotationsoptional | boolean | — |
minMoveWordsoptional | number | — |
pageSimilarityThresholdoptional | number | — |
colorsoptional | { inserted?: string; deleted?: string; moved?: string } | — |
authoroptional | string | — |
Defined in packages/pdf/src/compare/types.ts:49
CompareReportLabelsinterface#
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 | — |
Defined in packages/pdf/src/compare/report.ts:5
CompareReportOptionsinterface#
interface CompareReportOptions| Property | Type | Description |
|---|---|---|
formatoptional | CompareReportFormat | — |
fileNameAoptional | string | — |
fileNameBoptional | string | — |
dateoptional | Date | string | — |
labelsoptional | Partial<CompareReportLabels> | — |
Defined in packages/pdf/src/compare/report.ts:20
CropPagesOptionsinterface#
interface CropPagesOptions| Property | Type | Description |
|---|---|---|
removeContentoptional | boolean | — |
Defined in packages/pdf/src/tools/page-boxes.ts:8
CustomToolbarIteminterface#
interface CustomToolbarItem| Property | Type | Description |
|---|---|---|
type | 'custom' | — |
id | string | — |
label | string | — |
iconoptional | string | — |
onClick | (viewer: PdfViewerApi) => void | — |
isDisabledoptional | (viewer: PdfViewerApi) => boolean | — |
Defined in packages/pdf/src/viewer/types.ts:194
DecodedImageinterface#
interface DecodedImageDefined in packages/pdf/src/formats/image/types.ts:3
DecodedRedactionImageinterface#
interface DecodedRedactionImageDefined in packages/pdf/src/redaction/images.ts:24
DecompressRtfOptionsinterface#
interface DecompressRtfOptions| Property | Type | Description |
|---|---|---|
verifyCrcoptional | boolean | — |
Defined in packages/pdf/src/formats/mail/rtf.ts:34
DetectedFieldinterface#
interface DetectedField| Property | Type | Description |
|---|---|---|
type | 'text' | 'checkbox' | — |
pageIndex | number | — |
rect | PdfRect | — |
name | string | — |
labeloptional | string | The text on the page the name was taken from. |
isMultilineoptional | boolean | — |
source | 'underline' | 'box' | 'square' | 'underscores' | — |
Defined in packages/pdf/src/forms/detect.ts:4
DetectFieldsOptionsinterface#
interface DetectFieldsOptions| Property | Type | Description |
|---|---|---|
takenNamesoptional | Iterable<string> | Names that are taken already; detected names are made different from these and from each other. |
existingoptional | readonly PdfRect[] | Rectangles of fields the page has already; a candidate that overlaps one is left out. |
Defined in packages/pdf/src/forms/detect.ts:21
DetectionShapeinterface#
interface DetectionShape| Property | Type | Description |
|---|---|---|
rect | PdfRect | — |
operator | string | The painting operator of the path: S, f, B and their variants. |
Defined in packages/pdf/src/forms/detect.ts:15
DownsampleReportinterface#
interface DownsampleReport| Property | Type | Description |
|---|---|---|
imagesDownsampled | number | — |
imagesKept | number | — |
Defined in packages/pdf/src/tools/downsample.ts:12
DuplicateFieldOptionsinterface#
interface DuplicateFieldOptions| Property | Type | Description |
|---|---|---|
offsetoptional | [number, number] | — |
pageIndexoptional | number | — |
newNameoptional | string | — |
Defined in packages/pdf/src/forms/types.ts:293
DynamicStampContextinterface#
interface DynamicStampContextDefined in packages/pdf/src/viewer/types.ts:304
EditableTextMatchinterface#
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 | — |
Defined in packages/pdf/src/content-edit/find-replace.ts:15
EmbeddedTextinterface#
interface EmbeddedText| Property | Type | Description |
|---|---|---|
ref | PdfRef | — |
fontName | string | — |
encoded | Uint8Array | — |
width | number | — |
ascent | number | — |
descent | number | — |
isRtl | boolean | — |
placementsoptional | (GlyphPlacement | undefined)[] | — |
Defined in packages/pdf/src/fonts/registry.ts:25
EncryptOptionsinterface#
interface EncryptOptions| Property | Type | Description |
|---|---|---|
userPasswordoptional | string | — |
ownerPasswordoptional | string | — |
permissionsoptional | Partial<PdfPermissions> | — |
algorithmoptional | EncryptionAlgorithm | — |
encryptMetadataoptional | boolean | — |
Defined in packages/pdf/src/security/standard.ts:354
ExportedPageFileinterface#
interface ExportedPageFile| Property | Type | Description |
|---|---|---|
pageIndex | number | — |
fileName | string | — |
mimeType | 'image/png' | 'image/jpeg' | — |
data | Uint8Array | — |
Defined in packages/pdf/src/viewer/types.ts:433
ExportPageImagesOptionsinterface#
interface ExportPageImagesOptions| Property | Type | Description |
|---|---|---|
pagesoptional | number[] | Pages to export, from 0. All pages by default. |
formatoptional | 'png' | 'jpeg' | — |
dpioptional | number | Resolution, 36 to 600. 150 by default. |
qualityoptional | number | JPEG quality, 0.1 to 1. 0.85 by default. |
signaloptional | AbortSignal | — |
onProgressoptional | (progress: { pageIndex: number; position: number; total: number }) => void | — |
Defined in packages/pdf/src/viewer/types.ts:421
ExportTextOptionsinterface#
interface ExportTextOptions| Property | Type | Description |
|---|---|---|
pagesoptional | number[] | — |
pageBreaksoptional | boolean | false leaves out the line that marks where each page starts. |
Defined in packages/pdf/src/viewer/types.ts:440
ExtractedImageinterface#
interface ExtractedImage| Property | Type | Description |
|---|---|---|
id | string | — |
index | number | — |
name | string | — |
isInline | boolean | — |
refoptional | PdfRef | — |
rect | PdfRect | — |
quad | [PdfPoint, PdfPoint, PdfPoint, PdfPoint] | — |
matrix | Matrix | — |
width | number | — |
height | number | — |
bitsPerComponent | number | — |
colorSpaceoptional | string | — |
filters | string[] | — |
format | PageImageFormat | — |
isMask | boolean | — |
hasMask | boolean | — |
status | ExtractedImageStatus | — |
dataoptional | ExtractedImagePixels | — |
encodedoptional | ExtractedImageEncoding | — |
isRenderedoptional | boolean | — |
messageoptional | string | — |
Defined in packages/pdf/src/content-edit/extract-images.ts:43
ExtractedImageEncodinginterface#
interface ExtractedImageEncoding| Property | Type | Description |
|---|---|---|
mimeType | EncodedImageMimeType | — |
filter | string | — |
bytes | Uint8Array | — |
decodeParmsoptional | Record<string, number | boolean> | — |
jbig2Globalsoptional | Uint8Array | — |
Defined in packages/pdf/src/content-edit/extract-images.ts:35
ExtractedImagePixelsinterface#
interface ExtractedImagePixelsDefined in packages/pdf/src/content-edit/extract-images.ts:29
ExtractImagesOptionsinterface#
interface ExtractImagesOptions| Property | Type | Description |
|---|---|---|
renderFallbackoptional | boolean | — |
Defined in packages/pdf/src/viewer/types.ts:375
FieldActionEntryinterface#
interface FieldActionEntry| Property | Type | Description |
|---|---|---|
trigger | FieldActionTrigger | — |
widgetIndexoptional | number | — |
action | FieldAction | — |
Defined in packages/pdf/src/forms/types.ts:241
FieldCalculationinterface#
interface FieldCalculation| Property | Type | Description |
|---|---|---|
operation | 'SUM' | 'AVG' | 'PRD' | 'MIN' | 'MAX' | 'CUSTOM' | — |
fields | string[] | — |
expressionoptional | string | — |
Defined in packages/pdf/src/forms/types.ts:56
FieldIssueinterface#
interface FieldIssue| Property | Type | Description |
|---|---|---|
code | FormIssueCode | — |
key | FormMessageKey | — |
params | FormMessageParams | — |
message | string | — |
Defined in packages/pdf/src/forms/types.ts:168
FieldRangeinterface#
interface FieldRangeDefined in packages/pdf/src/forms/types.ts:62
FieldScriptInfointerface#
interface FieldScriptInfo| Property | Type | Description |
|---|---|---|
status | 'supported' | 'unsupported' | 'none' | — |
kind | 'none' | 'builtin' | 'expression' | 'custom' | — |
source | string | — |
Defined in packages/pdf/src/forms/types.ts:158
FieldScriptsinterface#
interface FieldScripts| Property | Type | Description |
|---|---|---|
formatoptional | string | — |
keystrokeoptional | string | — |
validateoptional | string | — |
calculateoptional | string | — |
Defined in packages/pdf/src/forms/types.ts:149
FindTextOptionsinterface#
interface FindTextOptionsDefined in packages/pdf/src/content-edit/find-replace.ts:10
FontRegistryinterface#
interface FontRegistry| Property | Type | Description |
|---|---|---|
isEmptyreadonly | boolean | — |
fontNamesreadonly | 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 | — |
Defined in packages/pdf/src/fonts/registry.ts:74
FormFieldDraftinterface#
interface FormFieldDraft| Property | Type | Description |
|---|---|---|
type | FormFieldInput['type'] | — |
nameoptional | string | — |
optionsoptional | string[] | — |
Defined in packages/pdf/src/viewer/types.ts:322
FormFieldInputinterface#
interface FormFieldInput| Property | Type | Description |
|---|---|---|
name | string | — |
type | FormFieldType | — |
pageIndex | number | — |
rect | PdfRect | — |
valueoptional | FormValue | — |
optionsoptional | (FormFieldOption | string)[] | — |
tooltipoptional | string | — |
isReadOnlyoptional | boolean | — |
isRequiredoptional | boolean | — |
isMultilineoptional | boolean | — |
isPasswordoptional | boolean | — |
isComboptional | boolean | — |
maxLengthoptional | number | — |
isMultiSelectoptional | boolean | — |
isEditableoptional | boolean | — |
alignmentoptional | 'left' | 'center' | 'right' | — |
fontSizeoptional | number | — |
borderColoroptional | string | null | — |
backgroundColoroptional | string | null | — |
formatoptional | FieldFormat | — |
calculationoptional | FieldCalculation | — |
rangeoptional | FieldRange | — |
radioValueoptional | string | — |
isNoExportoptional | boolean | — |
richTextoptional | RichTextParagraph[] | — |
Defined in packages/pdf/src/forms/types.ts:119
FormFieldOptioninterface#
interface FormFieldOptionDefined in packages/pdf/src/forms/types.ts:11
FormFieldWidgetinterface#
interface FormFieldWidget| Property | Type | Description |
|---|---|---|
id | string | — |
pageIndex | number | — |
rect | PdfRect | — |
onValueoptional | string | — |
exportValueoptional | string | — |
tabIndexoptional | number | — |
rotationoptional | 90 | 180 | 270 | — |
Defined in packages/pdf/src/forms/types.ts:16
FormImportRejectioninterface#
interface FormImportRejection| Property | Type | Description |
|---|---|---|
name | string | — |
code | FormIssueCode | 'option' | 'type' | — |
key | FormMessageKey | — |
params | FormMessageParams | — |
message | string | — |
Defined in packages/pdf/src/forms/types.ts:271
FormImportResultinterface#
interface FormImportResult| Property | Type | Description |
|---|---|---|
imported | number | — |
changed | string[] | — |
unknown | string[] | — |
rejected | FormImportRejection[] | — |
Defined in packages/pdf/src/forms/types.ts:279
FormIssueinterface#
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. |
Defined in packages/pdf/src/forms/types.ts:175
FormJsonOptionsinterface#
interface FormJsonOptions| Property | Type | Description |
|---|---|---|
flatoptional | boolean | — |
Defined in packages/pdf/src/forms/form-data.ts:9
FormStateinterface#
interface FormState| Property | Type | Description |
|---|---|---|
isDirty | boolean | — |
dirtyFields | string[] | — |
isValid | boolean | — |
fieldCount | number | — |
filledCount | number | — |
requiredCount | number | — |
requiredFilledCount | number | — |
Defined in packages/pdf/src/forms/types.ts:181
FormSubmitEventinterface#
interface FormSubmitEvent| Property | Type | Description |
|---|---|---|
url | string | — |
method | 'get' | 'post' | — |
format | SubmitFormat | — |
body | PdfBytes | string | — |
contentType | string | — |
fieldNames | string[] | — |
fieldNameoptional | string | — |
Defined in packages/pdf/src/viewer/types.ts:330
FormSubmitPayloadinterface#
interface FormSubmitPayload| Property | Type | Description |
|---|---|---|
url | string | — |
method | 'get' | 'post' | — |
format | SubmitFormat | — |
body | PdfBytes | string | — |
contentType | string | — |
fieldNames | string[] | — |
Defined in packages/pdf/src/forms/types.ts:247
FormSyncinterface#
interface FormSync| Property | Type | Description |
|---|---|---|
receive() | (operations: FormSyncOperation | FormSyncOperation[]) => void | — |
merge() | (snapshot: FormSyncSnapshot) => void | — |
snapshot() | () => FormSyncSnapshot | — |
destroy() | () => void | — |
Defined in packages/pdf/src/annotations/sync-forms.ts:41
FormSyncConflictinterface#
interface FormSyncConflict| Property | Type | Description |
|---|---|---|
field | string | — |
operation | FormSyncOperation | — |
winner | SyncClock | — |
Defined in packages/pdf/src/annotations/sync-forms.ts:14
FormSyncHostinterface#
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()optional | (field: string) => boolean | — |
Defined in packages/pdf/src/annotations/sync-forms.ts:20
FormSyncOperationinterface#
interface FormSyncOperation| Property | Type | Description |
|---|---|---|
id | string | — |
kind | 'set' | — |
field | string | — |
value | FormSyncValue | — |
author | string | — |
clock | SyncClock | — |
Defined in packages/pdf/src/annotations/sync-forms.ts:5
FormSyncOptionsinterface#
interface FormSyncOptions| Property | Type | Description |
|---|---|---|
actorId | string | — |
send | (operations: FormSyncOperation[]) => void | — |
authoroptional | string | — |
onConflictoptional | (conflict: FormSyncConflict) => void | — |
snapshotoptional | FormSyncSnapshot | — |
Defined in packages/pdf/src/annotations/sync-forms.ts:27
FormSyncSnapshotinterface#
interface FormSyncSnapshot| Property | Type | Description |
|---|---|---|
version | 1 | — |
counter | number | — |
fields | { [field: string]: { clock: SyncClock; value: FormSyncValue } } | — |
Defined in packages/pdf/src/annotations/sync-forms.ts:35
GeneralNameinterface#
interface GeneralNameDefined in packages/pdf/src/signatures/x509.ts:92
HeaderFooterOptionsinterface#
interface HeaderFooterOptions| Property | Type | Description |
|---|---|---|
headeroptional | HeaderFooterSlots | — |
footeroptional | HeaderFooterSlots | — |
marginoptional | number | PageMargins | — |
fontSizeoptional | number | — |
coloroptional | string | — |
fontoptional | StandardFont | — |
startNumberoptional | number | — |
totalPagesoptional | number | — |
rangeoptional | { from?: number; to?: number } | — |
dateoptional | Date | string | — |
fileNameoptional | string | — |
fontsoptional | FontRegistry | — |
layerKindoptional | 'header' | 'footer' | 'pageNumbers' | How the stamped text is marked in the page content; header and footer by default. |
Defined in packages/pdf/src/tools/stamping.ts:54
HeaderFooterSlotsinterface#
interface HeaderFooterSlotsDefined in packages/pdf/src/tools/stamping.ts:41
ImageEditResultinterface#
interface ImageEditResult| Property | Type | Description |
|---|---|---|
ok | boolean | — |
reasonoptional | ContentEditFailure | — |
messageoptional | string | — |
nameoptional | string | — |
refoptional | PdfRef | — |
rectoptional | PdfRect | — |
imageoptional | PageImage | — |
Defined in packages/pdf/src/content-edit/types.ts:118
ImagePageInputinterface#
interface ImagePageInputDefined in packages/pdf/src/tools/images.ts:22
ImagesToPdfOptionsinterface#
interface ImagesToPdfOptions| Property | Type | Description |
|---|---|---|
pageSizeoptional | ImagePageSize | — |
marginoptional | number | — |
fitoptional | 'contain' | 'cover' | 'none' | — |
dpioptional | number | — |
metadataoptional | { title?: string; author?: string; subject?: string; keywords?: string; creator?: string } | — |
decodeImageoptional | ImageDecoder | — |
Defined in packages/pdf/src/tools/images.ts:29
ImposeOptionsinterface#
interface ImposeOptions| Property | Type | Description |
|---|---|---|
layout | 'n-up' | 'booklet' | — |
columnsoptional | number | — |
rowsoptional | number | — |
sheetSizeoptional | { width: number; height: number } | — |
marginoptional | number | — |
gutteroptional | number | — |
rightToLeftoptional | boolean | — |
passwordoptional | string | — |
Defined in packages/pdf/src/tools/impose.ts:9
InterleaveOptionsinterface#
interface InterleaveOptions| Property | Type | Description |
|---|---|---|
reverseSecondoptional | boolean | — |
Defined in packages/pdf/src/document/session-page-tools.ts:61
JpegDecodeOptionsinterface#
interface JpegDecodeOptions| Property | Type | Description |
|---|---|---|
colorTransformoptional | boolean | — |
maxPixelsoptional | number | — |
Defined in packages/pdf/src/pdf/jpeg.ts:28
JpegImageinterface#
interface JpegImage| Property | Type | Description |
|---|---|---|
width | number | — |
height | number | — |
components | 1 | 3 | 4 | — |
data | Uint8Array | — |
isProgressive | boolean | — |
hasAdobeMarker | boolean | — |
colorTransform | boolean | — |
planes | JpegPlane[] | — |
Defined in packages/pdf/src/pdf/jpeg.ts:17
KeystrokeResultinterface#
interface KeystrokeResult| Property | Type | Description |
|---|---|---|
isAccepted | boolean | — |
value | string | — |
selStart | number | — |
selEnd | number | — |
keyoptional | FormMessageKey | — |
Defined in packages/pdf/src/forms/types.ts:191
LinearizeOptionsinterface#
interface LinearizeOptions| Property | Type | Description |
|---|---|---|
recompressoptional | boolean | — |
Defined in packages/pdf/src/tools/linearize.ts:327
LinkDestinationinterface#
interface LinkDestination| Property | Type | Description |
|---|---|---|
pageIndex | number | — |
fitoptional | LinkFit | — |
leftoptional | number | — |
topoptional | number | — |
rightoptional | number | — |
bottomoptional | number | — |
zoomoptional | number | — |
Defined in packages/pdf/src/annotations/types.ts:88
MailAddressinterface#
interface MailAddressDefined in packages/pdf/src/formats/mail/types.ts:10
MailAttachmentinterface#
interface MailAttachment| Property | Type | Description |
|---|---|---|
fileName | string | — |
mimeType | string | — |
data | Uint8Array | — |
contentIdoptional | string | — |
isInline | boolean | — |
embeddedMessageoptional | MailMessage | — |
Defined in packages/pdf/src/formats/mail/types.ts:20
MailConversioninterface#
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. |
Defined in packages/pdf/src/formats/mail/convert.ts:7
MailConversionEventinterface#
interface MailConversionEvent| Property | Type | Description |
|---|---|---|
format | MailFormat | — |
sourceFileName | string | — |
fileName | string | — |
pageCount | number | — |
message | MailConversionSummary | — |
warnings | MailPdfWarning[] | — |
Defined in packages/pdf/src/viewer/types.ts:355
MailConversionOptionsinterface#
interface MailConversionOptions extends Omit<MailToPdfOptions, 'attachOriginal'>| Property | Type | Description |
|---|---|---|
attachOriginaloptional | boolean | — |
labelsoptional | Partial<MailPdfLabels> | undefined | Inherited from MailToPdfOptions. |
fontsoptional | FontRegistry | readonly PdfFontSource[] | undefined | Inherited from MailToPdfOptions. |
marginoptional | number | PageMargins | undefined | Inherited from MailToPdfOptions. |
fontFallbackoptional | PdfFontFallback | undefined | Inherited from MailToPdfOptions. |
allowMissingGlyphsoptional | boolean | undefined | Inherited from MailToPdfOptions. |
pageSizeoptional | MailPageSize | undefined | Inherited from MailToPdfOptions. |
fontSizeoptional | number | undefined | Inherited from MailToPdfOptions. |
includeAttachmentsoptional | boolean | undefined | Inherited from MailToPdfOptions. |
preferPlainTextoptional | boolean | undefined | Inherited from MailToPdfOptions. |
formatDateoptional | ((date: Date) => string) | undefined | Inherited from MailToPdfOptions. |
Defined in packages/pdf/src/viewer/types.ts:342
MailConversionSummaryinterface#
interface MailConversionSummary| Property | Type | Description |
|---|---|---|
subject | string | — |
fromoptional | MailAddress | — |
to | MailAddress[] | — |
cc | MailAddress[] | — |
sentAtoptional | Date | — |
attachments | { fileName: string; mimeType: string; size: number; isInline: boolean }[] | — |
Defined in packages/pdf/src/viewer/types.ts:346
MailFileHintinterface#
interface MailFileHintDefined in packages/pdf/src/formats/mail/detect.ts:3
MailHeaderinterface#
interface MailHeaderDefined in packages/pdf/src/formats/mail/types.ts:15
MailMessageinterface#
interface MailMessage| Property | Type | Description |
|---|---|---|
format | MailFormat | — |
subject | string | — |
fromoptional | MailAddress | — |
to | MailAddress[] | — |
cc | MailAddress[] | — |
bcc | MailAddress[] | — |
sentAtoptional | Date | — |
text | string | — |
html | string | — |
headers | MailHeader[] | — |
attachments | MailAttachment[] | — |
Defined in packages/pdf/src/formats/mail/types.ts:29
MailOriginalFileinterface#
interface MailOriginalFileDefined in packages/pdf/src/formats/mail/mail-to-pdf.ts:39
MailPdfLabelsinterface#
interface MailPdfLabels| Property | Type | Description |
|---|---|---|
subject | string | — |
from | string | — |
to | string | — |
cc | string | — |
bcc | string | — |
sent | string | — |
attachments | string | — |
noSubject | string | — |
image | string | — |
Defined in packages/pdf/src/formats/mail/mail-to-pdf.ts:27
MailPdfResultinterface#
interface MailPdfResult| Property | Type | Description |
|---|---|---|
bytes | PdfBytes | — |
pageCount | number | — |
substitutedCharacters | number | — |
attachmentNames | string[] | — |
warnings | MailPdfWarning[] | — |
Defined in packages/pdf/src/formats/mail/mail-to-pdf.ts:72
MailPdfWarninginterface#
interface MailPdfWarning| Property | Type | Description |
|---|---|---|
code | MailPdfWarningCode | — |
message | string | — |
count | number | — |
Defined in packages/pdf/src/formats/mail/mail-to-pdf.ts:66
MailToPdfOptionsinterface#
interface MailToPdfOptions| Property | Type | Description |
|---|---|---|
pageSizeoptional | MailPageSize | — |
marginoptional | number | PageMargins | — |
fontSizeoptional | number | — |
fontsoptional | FontRegistry | readonly PdfFontSource[] | — |
fontFallbackoptional | PdfFontFallback | — |
allowMissingGlyphsoptional | boolean | — |
includeAttachmentsoptional | boolean | — |
attachOriginaloptional | Uint8Array | MailOriginalFile | — |
preferPlainTextoptional | boolean | — |
labelsoptional | Partial<MailPdfLabels> | — |
formatDateoptional | (date: Date) => string | — |
Defined in packages/pdf/src/formats/mail/mail-to-pdf.ts:44
MeasureDetailsinterface#
interface MeasureDetails| Property | Type | Description |
|---|---|---|
type | PdfAnnotation['type'] | — |
value | number | — |
unit | string | — |
text | string | — |
lengthoptional | number | — |
perimeteroptional | number | — |
areaoptional | number | — |
radiusoptional | number | — |
angleoptional | number | — |
countoptional | number | — |
Defined in packages/pdf/src/annotations/geometry.ts:546
MeasureScaleinterface#
interface MeasureScaleDefined in packages/pdf/src/annotations/types.ts:61
MentionCandidateinterface#
interface MentionCandidate| Property | Type | Description |
|---|---|---|
id | string | — |
name | string | — |
descriptionoptional | string | — |
Defined in packages/pdf/src/viewer/mentions.ts:5
MentionEventinterface#
interface MentionEvent| Property | Type | Description |
|---|---|---|
user | MentionCandidate | — |
annotation | PdfAnnotation | — |
replyIdoptional | string | — |
Defined in packages/pdf/src/viewer/mentions.ts:11
MentionOptionsinterface#
interface MentionOptions| Property | Type | Description |
|---|---|---|
search() | (query: string, context: { signal: AbortSignal }) => MentionCandidate[] | Promise<MentionCandidate[]> | — |
onMention()optional | (event: MentionEvent) => void | — |
debounceoptional | number | — |
Defined in packages/pdf/src/viewer/mentions.ts:17
MergeFileInputinterface#
interface MergeFileInput| Property | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
nameoptional | string | — |
pagesoptional | string | readonly number[] | — |
passwordoptional | string | — |
Defined in packages/pdf/src/document/session-page-tools.ts:32
MergeFilesOptionsinterface#
interface MergeFilesOptions| Property | Type | Description |
|---|---|---|
atoptional | number | — |
bookmarkPerFileoptional | boolean | — |
keepBookmarksoptional | boolean | — |
keepFormFieldsoptional | boolean | — |
signaloptional | AbortSignal | — |
onProgressoptional | (progress: MergeProgress) => void | Promise<void> | — |
Defined in packages/pdf/src/document/session-page-tools.ts:45
MergeFilesResultinterface#
interface MergeFilesResult| Property | Type | Description |
|---|---|---|
at | number | — |
pageCount | number | — |
documentIndexes | number[] | — |
renamedFields | { from: string; to: string }[] | — |
Defined in packages/pdf/src/document/session-page-tools.ts:54
MergePdfsOptionsinterface#
interface MergePdfsOptions extends Omit<MergeFilesOptions, 'at'>| Property | Type | Description |
|---|---|---|
decodeImageoptional | ImageDecoder | — |
bookmarkPerFileoptional | boolean | undefined | Inherited from MergeFilesOptions. |
keepBookmarksoptional | boolean | undefined | Inherited from MergeFilesOptions. |
keepFormFieldsoptional | boolean | undefined | Inherited from MergeFilesOptions. |
signaloptional | AbortSignal | undefined | Inherited from MergeFilesOptions. |
onProgressoptional | ((progress: MergeProgress) => void | Promise<void>) | undefined | Inherited from MergeFilesOptions. |
Defined in packages/pdf/src/tools/merge.ts:26
MergeProgressinterface#
interface MergeProgressDefined in packages/pdf/src/document/session-page-tools.ts:39
MissingGlyphReportinterface#
interface MissingGlyphReport| Property | Type | Description |
|---|---|---|
characters | string | — |
scripts | TextScript[] | — |
Defined in packages/pdf/src/fonts/missing-glyphs.ts:3
NameConstraintsinterface#
interface NameConstraints| Property | Type | Description |
|---|---|---|
permitted | GeneralName[] | — |
excluded | GeneralName[] | — |
Defined in packages/pdf/src/signatures/x509.ts:97
NamedDestinationinterface#
interface NamedDestination extends LinkDestination| Property | Type | Description |
|---|---|---|
name | string | — |
pageIndex | number | Inherited from LinkDestination. |
fitoptional | LinkFit | undefined | Inherited from LinkDestination. |
leftoptional | number | undefined | Inherited from LinkDestination. |
topoptional | number | undefined | Inherited from LinkDestination. |
rightoptional | number | undefined | Inherited from LinkDestination. |
bottomoptional | number | undefined | Inherited from LinkDestination. |
zoomoptional | number | undefined | Inherited from LinkDestination. |
Defined in packages/pdf/src/annotations/types.ts:106
ObjectEditResultinterface#
interface ObjectEditResult| Property | Type | Description |
|---|---|---|
ok | boolean | — |
reasonoptional | ContentEditFailure | — |
messageoptional | string | — |
objectoptional | PageObject | — |
Defined in packages/pdf/src/content-edit/types.ts:91
OcrPageImageinterface#
interface OcrPageImageDefined in packages/pdf/src/content-edit/text-layer.ts:29
OcrPageOutcomeinterface#
interface OcrPageOutcome| Property | Type | Description |
|---|---|---|
pageIndex | number | — |
status | 'recognized' | 'has-text' | 'no-text' | 'failed' | — |
words | number | Words written to the invisible text layer. |
messageoptional | string | — |
Defined in packages/pdf/src/viewer/types.ts:381
OcrWordinterface#
interface OcrWordDefined in packages/pdf/src/content-edit/text-layer.ts:24
OfficeExportOptionsinterface#
interface OfficeExportOptions| Property | Type | Description |
|---|---|---|
pagesoptional | readonly number[] | Pages to export, zero-based. Default: every page. |
titleoptional | string | — |
Defined in packages/pdf/src/tools/export-office.ts:22
OfficeExportSourceinterface#
interface OfficeExportSource| Property | Type | Description |
|---|---|---|
pageCountreadonly | number | — |
getStructuredText() | (pageIndex: number) => PageTextStructure | — |
Defined in packages/pdf/src/tools/export-office.ts:17
OfficeRuninterface#
interface OfficeRunDefined in packages/pdf/src/tools/export-office.ts:5
OpenPdfOptionsinterface#
interface OpenPdfOptions| Property | Type | Description |
|---|---|---|
limitsoptional | Partial<PdfLimits> | — |
fontFallbackoptional | PdfFontFallback | — |
allowMissingGlyphsoptional | 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. |
textRasterizeroptional | PdfTextRasterizer | Draws annotation text no font covers as an image. The viewer sets one that uses the fonts of the browser. |
authoroptional | string | — |
createIdoptional | () => string | — |
nowoptional | () => Date | — |
annotationDefaultsoptional | Partial<Record<AnnotationType, Partial<AnnotationDefaults>>> | — |
historyLimitoptional | number | — |
readAnnotationsoptional | boolean | — |
annotationScopeoptional | 'markup' | 'all' | — |
passwordoptional | string | — |
fontsoptional | PdfFontSource[] | — |
decodeImageoptional | ImageDecoder | — |
ignorePermissionsoptional | boolean | — |
authorIdoptional | string | — |
Defined in packages/pdf/src/document/session-types.ts:96
OptimizeImageOptionsinterface#
interface OptimizeImageOptions| Property | Type | Description |
|---|---|---|
maxDpi | number | — |
jpegQualityoptional | number | — |
Defined in packages/pdf/src/tools/downsample.ts:7
OptimizeOptionsinterface#
interface OptimizeOptions| Property | Type | Description |
|---|---|---|
keepVerbatimoptional | boolean | False serialises every object anew, so the output has one spelling of stream and object syntax. |
objectStreamsoptional | boolean | — |
dedupeoptional | boolean | — |
removeUnusedoptional | boolean | — |
recompressoptional | boolean | — |
transformoptional | ObjectTransform | — |
imagesoptional | OptimizeImageOptions | — |
fontsoptional | boolean | — |
Defined in packages/pdf/src/tools/optimize.ts:21
OptimizeReportinterface#
interface OptimizeReport extends Partial<DownsampleReport>, Partial<FontSubsetReport>| Property | Type | Description |
|---|---|---|
before | number | — |
after | number | — |
objectsBefore | number | — |
objectsAfter | number | — |
duplicatesMerged | number | — |
imagesDownsampledoptional | number | undefined | Inherited from DownsampleReport. |
imagesKeptoptional | number | undefined | Inherited from DownsampleReport. |
fontsSubsetoptional | number | undefined | Inherited from FontSubsetReport. |
fontsKeptoptional | number | undefined | Inherited from FontSubsetReport. |
fontBytesBeforeoptional | number | undefined | Inherited from FontSubsetReport. |
fontBytesAfteroptional | number | undefined | Inherited from FontSubsetReport. |
Defined in packages/pdf/src/tools/optimize.ts:33
OptimizeResultinterface#
interface OptimizeResult| Property | Type | Description |
|---|---|---|
bytes | PdfBytes | — |
report | OptimizeReport | — |
Defined in packages/pdf/src/tools/optimize.ts:41
OutlineIteminterface#
interface OutlineItem| Property | Type | Description |
|---|---|---|
title | string | — |
pageIndexoptional | number | — |
leftoptional | number | — |
topoptional | number | — |
zoomoptional | number | — |
urioptional | string | — |
isOpenoptional | boolean | — |
coloroptional | string | — |
isBoldoptional | boolean | — |
isItalicoptional | boolean | — |
childrenoptional | OutlineItem[] | — |
Defined in packages/pdf/src/tools/outline.ts:19
PageBoxesinterface#
interface PageBoxesDefined in packages/pdf/src/tools/page-boxes.ts:150
PageDecorationinterface#
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. |
optionsoptional | Record<string, unknown> | — |
Defined in packages/pdf/src/document/session-document-tools.ts:71
PageGeometryinterface#
interface PageGeometry| Property | Type | Description |
|---|---|---|
points | PdfPoint[] | — |
segments | PdfSegment[] | — |
baselines | PdfSegment[] | — |
textBoxes | PageTextBox[] | — |
isTruncated | boolean | — |
Defined in packages/pdf/src/content/geometry.ts:18
PageGeometryOptionsinterface#
interface PageGeometryOptions| Property | Type | Description |
|---|---|---|
maxPointsoptional | number | — |
maxSegmentsoptional | number | — |
maxTextRunsoptional | number | — |
boundsoptional | PdfRect | — |
includeTextoptional | boolean | — |
includePathsoptional | boolean | — |
includeImagesoptional | boolean | — |
Defined in packages/pdf/src/content/geometry.ts:26
PageImageinterface#
interface PageImage| Property | Type | Description |
|---|---|---|
id | string | — |
index | number | — |
name | string | — |
refoptional | PdfRef | — |
rect | PdfRect | — |
quad | [PdfPoint, PdfPoint, PdfPoint, PdfPoint] | — |
matrix | Matrix | — |
width | number | — |
height | number | — |
filteroptional | string | — |
format | PageImageFormat | — |
bitsPerComponent | number | — |
colorSpaceoptional | string | — |
isMask | boolean | — |
hasAlpha | boolean | — |
opacity | number | Constant opacity set next to the image, 1 when none. |
cropoptional | [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. |
Defined in packages/pdf/src/content-edit/types.ts:44
PageLabelRangeinterface#
interface PageLabelRange| Property | Type | Description |
|---|---|---|
startPage | number | — |
style | PageLabelStyle | — |
prefixoptional | string | — |
startoptional | number | — |
Defined in packages/pdf/src/tools/page-labels.ts:8
PageMarginsinterface#
interface PageMargins| Property | Type | Description |
|---|---|---|
topoptional | number | — |
bottomoptional | number | — |
leftoptional | number | — |
rightoptional | number | — |
Defined in packages/pdf/src/tools/stamping.ts:47
PageNumberOptionsinterface#
interface PageNumberOptions| Property | Type | Description |
|---|---|---|
formatoptional | string | — |
positionoptional | PageNumberPosition | — |
startNumberoptional | number | — |
pagesoptional | number[] | — |
fontSizeoptional | number | — |
coloroptional | string | — |
marginoptional | number | — |
fontoptional | StandardFont | — |
fontsoptional | FontRegistry | — |
Defined in packages/pdf/src/document/session-page-tools.ts:20
PageObjectinterface#
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 | — |
hasClipoptional | boolean | — |
isInvisibleoptional | boolean | — |
layeroptional | PageObjectLayer | — |
Defined in packages/pdf/src/content-edit/types.ts:72
PageRedactionImageinterface#
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. |
colorSpaceoptional | string | undefined | Inherited from RedactionImageInfo. |
isMask | boolean | Inherited from RedactionImageInfo. |
decodeoptional | number[] | undefined | Inherited from RedactionImageInfo. |
decodeParmsoptional | Record<string, number | boolean> | undefined | Inherited from RedactionImageInfo. |
jbig2Globalsoptional | Uint8Array<ArrayBufferLike> | undefined | Inherited from RedactionImageInfo. |
Defined in packages/pdf/src/document/session-types.ts:160
PageSyncinterface#
interface PageSync| Property | Type | Description |
|---|---|---|
receive() | (operations: PageSyncOperation | PageSyncOperation[]) => void | — |
merge() | (snapshot: PageSyncSnapshot) => void | — |
snapshot() | () => PageSyncSnapshot | — |
pageIds() | () => (string | undefined)[] | — |
destroy() | () => void | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:69
PageSyncConflictinterface#
interface PageSyncConflict| Property | Type | Description |
|---|---|---|
pageId | string | — |
reason | 'older-write' | 'removed' | — |
operation | PageSyncOperation | — |
winner | SyncClock | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:21
PageSyncHostinterface#
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 | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:37
PageSyncOperationinterface#
interface PageSyncOperation| Property | Type | Description |
|---|---|---|
id | string | — |
kind | PageSyncOperationKind | — |
pageId | string | — |
positionoptional | string | — |
rotationoptional | number | — |
sizeoptional | PageSyncSize | — |
author | string | — |
clock | SyncClock | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:10
PageSyncOptionsinterface#
interface PageSyncOptions| Property | Type | Description |
|---|---|---|
actorId | string | — |
send | (operations: PageSyncOperation[]) => void | — |
authoroptional | string | — |
onConflictoptional | (conflict: PageSyncConflict) => void | — |
onApplyoptional | () => void | — |
snapshotoptional | PageSyncSnapshot | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:46
PageSyncPageinterface#
interface PageSyncPage| Property | Type | Description |
|---|---|---|
key | number | string | — |
kind | string | — |
sourceIndex | number | — |
rotation | number | — |
width | number | — |
height | number | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:28
PageSyncSizeinterface#
interface PageSyncSizeDefined in packages/pdf/src/annotations/sync-pages.ts:5
PageSyncSnapshotinterface#
interface PageSyncSnapshot| Property | Type | Description |
|---|---|---|
version | 1 | — |
counter | number | — |
pages | PageSyncSnapshotEntry[] | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:63
PageSyncSnapshotEntryinterface#
interface PageSyncSnapshotEntry| Property | Type | Description |
|---|---|---|
id | string | — |
positionoptional | { clock: SyncClock; value: string } | — |
rotationoptional | { clock: SyncClock; value: number } | — |
removedoptional | SyncClock | — |
sizeoptional | PageSyncSize | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:55
PageTabOrderinterface#
interface PageTabOrder| Property | Type | Description |
|---|---|---|
pageIndex | number | — |
mode | TabOrderMode | — |
widgets | TabOrderEntry[] | — |
Defined in packages/pdf/src/forms/types.ts:35
PageTextBoxinterface#
interface PageTextBoxDefined in packages/pdf/src/content/geometry.ts:13
PageTextIteminterface#
interface PageTextItem| Property | Type | Description |
|---|---|---|
text | string | — |
rect | PdfRect | — |
quad | PdfQuad | — |
baseline | [PdfPoint, PdfPoint] | — |
fontNameoptional | string | — |
fontSize | number | — |
isBold | boolean | — |
isItalic | boolean | — |
rotation | number | — |
direction | PageTextDirection | — |
lineIndex | number | — |
hasSpaceAfter | boolean | — |
charQuadsoptional | PdfQuad[] | — |
Defined in packages/pdf/src/content/structured-text.ts:17
PageTextLineinterface#
interface PageTextLine| Property | Type | Description |
|---|---|---|
text | string | — |
rect | PdfRect | — |
quad | PdfQuad | — |
baseline | [PdfPoint, PdfPoint] | — |
fontSize | number | — |
rotation | number | — |
direction | PageTextDirection | — |
items | PageTextItem[] | — |
Defined in packages/pdf/src/content/structured-text.ts:33
PageTextStructureinterface#
interface PageTextStructure| Property | Type | Description |
|---|---|---|
text | string | — |
lines | PageTextLine[] | — |
items | PageTextItem[] | — |
sequenceoptional | (PageTextLine | PageTextMark)[] | With markedContent and content order: lines and marked-content boundaries as they follow each other. |
Defined in packages/pdf/src/content/structured-text.ts:50
ParagraphEditOptionsinterface#
interface ParagraphEditOptions| Property | Type | Description |
|---|---|---|
fontsoptional | FontRegistry | — |
widthoptional | number | — |
pushBelowoptional | boolean | Move the text, images and shapes under the paragraph down when it needs more lines than before. |
Defined in packages/pdf/src/content-edit/paragraphs.ts:42
ParagraphEditResultinterface#
interface ParagraphEditResult extends TextEditResult| Property | Type | Description |
|---|---|---|
linesoptional | string[] | — |
rectoptional | PdfRect | — |
overflowoptional | number | — |
pushedoptional | number | How many objects under the paragraph were moved down to make room. |
ok | boolean | Inherited from TextEditResult. |
reasonoptional | ContentEditFailure | undefined | Inherited from TextEditResult. |
messageoptional | string | undefined | Inherited from TextEditResult. |
usedFontoptional | "original" | "embedded" | "standard" | undefined | Inherited from TextEditResult. |
fontNamesoptional | string[] | undefined | Inherited from TextEditResult. |
missingoptional | string | undefined | Inherited from TextEditResult. |
widthChangeoptional | number | undefined | Inherited from TextEditResult. |
Defined in packages/pdf/src/content-edit/paragraphs.ts:49
PdfAConversionOptionsinterface#
interface PdfAConversionOptions| Property | Type | Description |
|---|---|---|
keepAttachmentsoptional | boolean | — |
fontsoptional | Readonly<Record<string, Uint8Array>> | — |
Defined in packages/pdf/src/tools/pdfa.ts:15
PdfAConversionResultinterface#
interface PdfAConversionResult| Property | Type | Description |
|---|---|---|
bytes | PdfBytes | — |
isConformant | boolean | — |
removed | string[] | — |
remaining | ArchiveFinding[] | — |
fonts | PdfAFontReplacement[] | — |
validation | PdfAValidation | — |
Defined in packages/pdf/src/tools/pdfa.ts:20
PdfAFontReplacementinterface#
interface PdfAFontReplacement| Property | Type | Description |
|---|---|---|
name | string | — |
replacement | string | — |
glyphs | number | — |
mismatchedWidths | number | — |
Defined in packages/pdf/src/tools/pdfa-fonts.ts:10
PdfAnnotationinterface#
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 | — |
contentsoptional | string | — |
repliesoptional | AnnotationReply[] | — |
statusoptional | ReviewStatus | — |
statusAuthoroptional | string | — |
statusModifiedAtoptional | string | — |
replacedQuadPointsoptional | number[] | — |
fillColoroptional | string | — |
dashedoptional | boolean | — |
borderStyleoptional | BorderStyle | — |
rotationoptional | number | — |
quadPointsoptional | number[] | — |
inkListoptional | PdfPoint[][] | — |
verticesoptional | PdfPoint[] | — |
lineoptional | [PdfPoint, PdfPoint] | — |
lineEndingsoptional | [LineEnding, LineEnding] | — |
textoptional | string | — |
fontSizeoptional | number | — |
fontColoroptional | string | — |
textAlignoptional | 'left' | 'center' | 'right' | — |
fontFamilyoptional | AnnotationFont | — |
calloutLineoptional | PdfPoint[] | — |
groupIdoptional | string | — |
iconoptional | NoteIcon | — |
stampoptional | BuiltInStamp | string | — |
stampLabeloptional | string | — |
imageoptional | AnnotationImage | — |
signatureKindoptional | 'drawn' | 'typed' | 'image' | — |
measureScaleoptional | MeasureScale | — |
overlayTextoptional | string | — |
urloptional | string | — |
destinationPageoptional | number | — |
isLockedoptional | boolean | — |
isReadOnlyoptional | boolean | — |
isContentsLockedoptional | boolean | — |
isNoViewoptional | boolean | — |
isPrintableoptional | boolean | — |
richTextoptional | RichTextParagraph[] | — |
actionoptional | LinkAction | — |
highlightModeoptional | LinkHighlightMode | — |
labeloptional | string | — |
iconNameoptional | string | — |
attachmentoptional | AnnotationAttachment | — |
customDataoptional | Record<string, unknown> | — |
Defined in packages/pdf/src/annotations/types.ts:129
PdfAttachmentinterface#
interface PdfAttachment extends FileSpecInfo| Property | Type | Description |
|---|---|---|
source | 'document' | 'annotation' | — |
pageIndexoptional | number | — |
name | string | Inherited from FileSpecInfo. |
descriptionoptional | string | undefined | Inherited from FileSpecInfo. |
mimeTypeoptional | string | undefined | Inherited from FileSpecInfo. |
size | number | Inherited from FileSpecInfo. |
createdoptional | Date | undefined | Inherited from FileSpecInfo. |
modifiedoptional | Date | undefined | Inherited from FileSpecInfo. |
relationshipoptional | AttachmentRelationship | undefined | Inherited from FileSpecInfo. |
checksumoptional | string | undefined | Inherited from FileSpecInfo. |
isChecksumValidoptional | boolean | undefined | Inherited from FileSpecInfo. |
data | Uint8Array<ArrayBufferLike> | Inherited from FileSpecInfo. |
Defined in packages/pdf/src/tools/attachments.ts:25
PdfAValidationinterface#
interface PdfAValidation| Property | Type | Description |
|---|---|---|
profile | 'PDF/A-2b' | — |
validator | 'built-in' | — |
isValid | boolean | — |
violations | PdfAViolation[] | — |
rulesChecked | PdfARule[] | — |
Defined in packages/pdf/src/tools/pdfa-validate.ts:35
PdfAViolationinterface#
interface PdfAViolation| Property | Type | Description |
|---|---|---|
rule | PdfARule | — |
clause | string | — |
severity | 'error' | 'warning' | — |
message | string | — |
pageIndexoptional | number | — |
objectoptional | number | — |
Defined in packages/pdf/src/tools/pdfa-validate.ts:26
PdfCertificateInfointerface#
interface PdfCertificateInfo| Property | Type | Description |
|---|---|---|
subject | PdfDistinguishedName | — |
issuer | PdfDistinguishedName | — |
serialNumber | string | — |
notBefore | string | — |
notAfter | string | — |
publicKeyAlgorithm | 'RSA' | 'EC' | 'unknown' | — |
publicKeyBitsoptional | number | — |
curveoptional | 'P-256' | 'P-384' | 'P-521' | — |
isCertificateAuthority | boolean | — |
isSelfIssued | boolean | — |
der | Uint8Array | — |
revocationoptional | RevocationStatus | — |
revocationDetailsoptional | PdfRevocationDetails | — |
Defined in packages/pdf/src/signatures/x509.ts:36
PdfCertificationInfointerface#
interface PdfCertificationInfo| Property | Type | Description |
|---|---|---|
level | 1 | 2 | 3 | — |
permission | PdfCertificationPermission | — |
Defined in packages/pdf/src/signatures/fields.ts:81
PdfCollectioninterface#
interface PdfCollection| Property | Type | Description |
|---|---|---|
view | PdfCollectionView | — |
initialDocumentoptional | string | — |
fields | PdfCollectionField[] | — |
sortoptional | PdfCollectionSort[] | — |
items | PdfCollectionItem[] | — |
Defined in packages/pdf/src/tools/attachments.ts:66
PdfCollectionFieldinterface#
interface PdfCollectionField| Property | Type | Description |
|---|---|---|
key | string | — |
name | string | — |
type | PdfCollectionFieldType | — |
order | number | — |
isVisible | boolean | — |
Defined in packages/pdf/src/tools/attachments.ts:49
PdfCollectionIteminterface#
interface PdfCollectionItem extends PdfAttachment| Property | Type | Description |
|---|---|---|
values | Record<string, PdfCollectionValue> | — |
source | "document" | "annotation" | Inherited from PdfAttachment. |
pageIndexoptional | number | undefined | Inherited from PdfAttachment. |
name | string | Inherited from FileSpecInfo. |
descriptionoptional | string | undefined | Inherited from FileSpecInfo. |
mimeTypeoptional | string | undefined | Inherited from FileSpecInfo. |
size | number | Inherited from FileSpecInfo. |
createdoptional | Date | undefined | Inherited from FileSpecInfo. |
modifiedoptional | Date | undefined | Inherited from FileSpecInfo. |
relationshipoptional | AttachmentRelationship | undefined | Inherited from FileSpecInfo. |
checksumoptional | string | undefined | Inherited from FileSpecInfo. |
isChecksumValidoptional | boolean | undefined | Inherited from FileSpecInfo. |
data | Uint8Array<ArrayBufferLike> | Inherited from FileSpecInfo. |
Defined in packages/pdf/src/tools/attachments.ts:62
PdfCollectionSortinterface#
interface PdfCollectionSort| Property | Type | Description |
|---|---|---|
key | string | — |
isAscending | boolean | — |
Defined in packages/pdf/src/tools/attachments.ts:57
PdfComparisoninterface#
interface PdfComparison| Property | Type | Description |
|---|---|---|
pages | PdfPageComparison[] | — |
changes | PdfTextChange[] | — |
summary | PdfComparisonSummary | — |
annotationsoptional | { a: AnnotationInput[]; b: AnnotationInput[] } | — |
Defined in packages/pdf/src/compare/types.ts:42
PdfComparisonSummaryinterface#
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 | — |
Defined in packages/pdf/src/compare/types.ts:25
PdfDistinguishedNameinterface#
interface PdfDistinguishedName| Property | Type | Description |
|---|---|---|
text | string | — |
commonNameoptional | string | — |
organizationoptional | string | — |
organizationalUnitoptional | string | — |
countryoptional | string | — |
emailoptional | string | — |
Defined in packages/pdf/src/signatures/x509.ts:27
PdfDocumentinterface#
interface PdfDocument| Property | Type | Description |
|---|---|---|
pageCountreadonly | number | — |
isModifiedreadonly | boolean | — |
isEncryptedreadonly | boolean | — |
isLockedreadonly | boolean | — |
hasSignaturesreadonly | boolean | — |
certificationreadonly | PdfCertificationInfo | undefined | — |
permissionsreadonly | PdfPermissions | — |
encryptionreadonly | 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[]> | — |
Defined in packages/pdf/src/document/headless.ts:127
PdfDocumentEventsinterface#
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 } | — |
Defined in packages/pdf/src/document/session-types.ts:62
PdfEncryptionInfointerface#
interface PdfEncryptionInfo| Property | Type | Description |
|---|---|---|
algorithm | EncryptionAlgorithm | — |
revision | number | — |
isOwner | boolean | — |
encryptsMetadata | boolean | — |
Defined in packages/pdf/src/document/session-types.ts:126
PdfFigureinterface#
interface PdfFigure| Property | Type | Description |
|---|---|---|
id | string | Stable while the structure tree is not rewritten: the object number of the structure element. |
pageIndexoptional | number | — |
alternateTextoptional | string | — |
actualTextoptional | string | — |
rectoptional | PdfRect | — |
Defined in packages/pdf/src/tools/accessibility.ts:40
PdfFontSourceinterface#
interface PdfFontSourceDefined in packages/pdf/src/fonts/registry.ts:20
PdfFormFieldinterface#
interface PdfFormField| Property | Type | Description |
|---|---|---|
name | string | — |
type | FormFieldType | — |
value | FormValue | — |
defaultValue | FormValue | — |
widgets | FormFieldWidget[] | — |
optionsoptional | FormFieldOption[] | — |
tooltipoptional | string | — |
isReadOnly | boolean | — |
isRequired | boolean | — |
isMultilineoptional | boolean | — |
isPasswordoptional | boolean | — |
isComboptional | boolean | — |
maxLengthoptional | number | — |
isMultiSelectoptional | boolean | — |
isEditableoptional | boolean | — |
alignmentoptional | 'left' | 'center' | 'right' | — |
fontSizeoptional | number | — |
borderColoroptional | string | null | — |
backgroundColoroptional | string | null | — |
formatoptional | FieldFormat | — |
calculationoptional | FieldCalculation | — |
rangeoptional | FieldRange | — |
signatureoptional | SignatureInfo | — |
scriptsoptional | FieldScripts | — |
isNoExportoptional | boolean | — |
isNoToggleToOffoptional | boolean | — |
isRadiosInUnisonoptional | boolean | — |
isRichTextoptional | boolean | — |
richTextoptional | RichTextParagraph[] | — |
actionsoptional | FieldActionEntry[] | — |
signatureLockoptional | SignatureFieldLock | — |
barcodeoptional | BarcodeFieldInfo | — |
Defined in packages/pdf/src/forms/types.ts:80
PdfInitialViewinterface#
interface PdfInitialView| Property | Type | Description |
|---|---|---|
pageModeoptional | PdfInitialPageMode | — |
pageLayoutoptional | PdfInitialPageLayout | — |
openPageoptional | number | Page shown when the document opens, from 0. |
zoomoptional | number | 'fit-page' | 'fit-width' | Zoom when the document opens: a factor (1 is 100%) or a fit mode. |
displayDocTitleoptional | boolean | Show the document title instead of the file name in the window title. |
Defined in packages/pdf/src/tools/initial-view.ts:10
PdfLayerinterface#
interface PdfLayer| Property | Type | Description |
|---|---|---|
id | string | — |
name | string | — |
isVisible | boolean | — |
depth | number | — |
groups | string[] | — |
radioGroup | string[] | — |
Defined in packages/pdf/src/viewer/layers.ts:4
PdfLimitsinterface#
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 | — |
Defined in packages/pdf/src/pdf/limits.ts:1
PdfMetadatainterface#
interface PdfMetadata| Property | Type | Description |
|---|---|---|
titleoptional | string | — |
authoroptional | string | — |
subjectoptional | string | — |
keywordsoptional | string | — |
creatoroptional | string | — |
produceroptional | string | — |
createdoptional | Date | — |
modifiedoptional | Date | — |
trappedoptional | boolean | — |
custom | Record<string, string> | — |
xmpoptional | string | — |
Defined in packages/pdf/src/tools/metadata.ts:20
PdfMetadataPatchinterface#
interface PdfMetadataPatch| Property | Type | Description |
|---|---|---|
titleoptional | string | null | — |
authoroptional | string | null | — |
subjectoptional | string | null | — |
keywordsoptional | string | null | — |
creatoroptional | string | null | — |
produceroptional | string | null | — |
createdoptional | Date | null | — |
modifiedoptional | Date | null | — |
trappedoptional | boolean | null | — |
customoptional | Record<string, string | null> | — |
Defined in packages/pdf/src/tools/metadata.ts:34
PdfModificationReportinterface#
interface PdfModificationReport| Property | Type | Description |
|---|---|---|
status | 'none' | 'allowed' | 'disallowed' | 'unknown' | — |
changes | PdfRevisionChange[] | — |
warningsoptional | PdfModificationWarning[] | — |
Defined in packages/pdf/src/signatures/revisions.ts:38
PdfModificationWarninginterface#
interface PdfModificationWarning| Property | Type | Description |
|---|---|---|
code | 'annotation-covers-content' | — |
objectNumber | number | — |
pageIndex | number | — |
coveredRatio | number | — |
Defined in packages/pdf/src/signatures/revisions.ts:31
PdfPageComparisoninterface#
interface PdfPageComparison| Property | Type | Description |
|---|---|---|
status | PageComparisonStatus | — |
pageIndexAoptional | number | — |
pageIndexBoptional | number | — |
similarity | number | — |
changes | PdfTextChange[] | — |
Defined in packages/pdf/src/compare/types.ts:17
PdfPageSummaryinterface#
interface PdfPageSummary| Property | Type | Description |
|---|---|---|
index | number | — |
width | number | — |
height | number | — |
rotation | number | — |
box | PdfRect | — |
kind | PageSourceKind | — |
sourceIndex | number | — |
documentIndex | number | — |
key | number | — |
Defined in packages/pdf/src/document/session-types.ts:22
PdfPermissionsinterface#
interface PdfPermissions| Property | Type | Description |
|---|---|---|
print | boolean | — |
printHighQuality | boolean | — |
modify | boolean | — |
copy | boolean | — |
annotate | boolean | — |
fillForms | boolean | — |
extractForAccessibility | boolean | — |
assemble | boolean | — |
Defined in packages/pdf/src/security/standard.ts:10
PdfPointinterface#
interface PdfPointDefined in packages/pdf/src/annotations/types.ts:3
PdfRangeLoaderinterface#
interface PdfRangeLoader| Property | Type | Description |
|---|---|---|
length | number | — |
read() | (begin: number, end: number) => Promise<Uint8Array> | — |
initialDataoptional | Uint8Array | — |
Defined in packages/pdf/src/viewer/types.ts:135
PdfRangeSourceinterface#
interface PdfRangeSource| Property | Type | Description |
|---|---|---|
rangeLoader | PdfRangeLoader | — |
Defined in packages/pdf/src/viewer/types.ts:141
PdfRendererinterface#
interface PdfRenderer| Property | Type | Description |
|---|---|---|
getDocument() | (source: RendererDocumentSource) => RendererLoadingTask | — |
AnnotationModeoptional | { DISABLE: number; ENABLE?: number } | — |
RangeTransportoptional | new (length: number, initialData: Uint8Array | null) => RendererRangeTransport | — |
modeoptionalreadonly | 'worker' | 'main' | — |
destroy()optional | () => void | — |
Defined in packages/pdf/src/viewer/renderer.ts:160
PdfRenderOptionsinterface#
interface PdfRenderOptions| Property | Type | Description |
|---|---|---|
renderLimitsoptional | Partial<RenderLimits> | — |
maxRenderMsoptional | number | — |
substituteFontoptional | SubstituteFontProvider | — |
standardFontsoptional | 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. |
predefinedCMapsoptional | 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. |
Defined in packages/pdf/src/viewer/renderer.ts:172
PdfRevisionChangeinterface#
interface PdfRevisionChange| Property | Type | Description |
|---|---|---|
objectNumber | number | — |
change | 'added' | 'changed' | 'removed' | — |
kind | RevisionChangeKind | — |
ownerObjectNumberoptional | number | — |
pageIndexoptional | number | — |
coversContentoptional | boolean | — |
coveredRatiooptional | number | — |
Defined in packages/pdf/src/signatures/revisions.ts:21
PdfRevocationDetailsinterface#
interface PdfRevocationDetails| Property | Type | Description |
|---|---|---|
status | RevocationStatus | — |
sourceoptional | 'ocsp' | 'crl' | 'callback' | — |
revokedAtoptional | string | — |
reasonoptional | string | — |
thisUpdateoptional | string | — |
nextUpdateoptional | string | — |
Defined in packages/pdf/src/signatures/revocation.ts:25
PdfSignatureChaininterface#
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. |
Defined in packages/pdf/src/signatures/verify.ts:74
PdfSignatureTimestampinterface#
interface PdfSignatureTimestamp| Property | Type | Description |
|---|---|---|
timeoptional | string | — |
isValid | boolean | — |
authorityoptional | string | — |
policyoptional | string | — |
serialNumberoptional | string | — |
erroroptional | string | — |
chainoptional | PdfSignatureChain | — |
revocationoptional | RevocationStatus | — |
Defined in packages/pdf/src/signatures/verify.ts:81
PdfSignatureVerificationinterface#
interface PdfSignatureVerification| Property | Type | Description |
|---|---|---|
fieldName | string | — |
type | 'signature' | 'certification' | 'timestamp' | — |
subFilteroptional | string | — |
signerNameoptional | string | — |
reasonoptional | string | — |
locationoptional | string | — |
contactInfooptional | string | — |
signedAtoptional | string | — |
signedAtSourceoptional | 'timestamp' | 'signedAttribute' | 'dictionary' | — |
byteRange | number[] | — |
coversWholeFile | boolean | — |
laterChanges | 'none' | 'signatures-only' | 'allowed' | 'disallowed' | 'unknown' | — |
integrity | 'intact' | 'modified' | 'unsupported' | — |
signature | CheckResult | — |
signingCertificate | SigningCertificateCheck | — |
digestAlgorithmoptional | HashName | — |
signatureAlgorithmoptional | string | — |
certificateoptional | PdfCertificateInfo | — |
chain | PdfSignatureChain | — |
isCertificateValidAtSigningoptional | boolean | — |
isCertificateValidNowoptional | boolean | — |
revocation | RevocationStatus | — |
certificationLeveloptional | 1 | 2 | 3 | — |
certificationoptional | PdfCertificationPermission | — |
padesLeveloptional | PadesLevel | — |
modification | PdfModificationReport | — |
timestampoptional | PdfSignatureTimestamp | — |
isValid | boolean | — |
isTrusted | boolean | — |
summary | PdfSignatureSummary | — |
expiredTrustListsoptional | string[] | Names of the trust lists that were not used because they are past their expiry date. |
warnings | PdfSignatureWarning[] | — |
erroroptional | string | — |
Defined in packages/pdf/src/signatures/verify.ts:92
PdfSignatureWarninginterface#
interface PdfSignatureWarning| Property | Type | Description |
|---|---|---|
code | 'annotation-covers-content' | — |
message | string | — |
pageIndex | number | — |
objectNumber | number | — |
coveredRatio | number | — |
Defined in packages/pdf/src/signatures/verify.ts:129
PdfTabInfointerface#
interface PdfTabInfo| Property | Type | Description |
|---|---|---|
id | string | — |
fileName | string | — |
isActive | boolean | — |
isModified | boolean | — |
pageCount | number | — |
Defined in packages/pdf/src/viewer/types.ts:237
PdfTextChangeinterface#
interface PdfTextChange| Property | Type | Description |
|---|---|---|
type | TextChangeType | — |
text | string | — |
pageIndexAoptional | number | — |
pageIndexBoptional | number | — |
rects | PdfRect[] | — |
fromRectsoptional | PdfRect[] | — |
wordCount | number | — |
Defined in packages/pdf/src/compare/types.ts:7
PdfTextRasterizerinterface#
interface PdfTextRasterizerDraws 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 | — |
Defined in packages/pdf/src/fonts/text-rasterizer.ts:24
PdfTrustListinterface#
interface PdfTrustList| Property | Type | Description |
|---|---|---|
name | string | — |
expires | Date | — |
issuedoptional | 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. |
Defined in packages/pdf/src/signatures/trust-list.ts:14
PdfTrustListInputinterface#
interface PdfTrustListInputA 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. |
issuedoptional | string | Date | — |
certificates | (string | Uint8Array)[] | PEM text (one or several certificates) or DER bytes. |
Defined in packages/pdf/src/signatures/trust-list.ts:5
PdfUrlSourceinterface#
interface PdfUrlSource| Property | Type | Description |
|---|---|---|
url | string | — |
httpHeadersoptional | Record<string, string> | — |
withCredentialsoptional | boolean | — |
Defined in packages/pdf/src/viewer/types.ts:129
PdfUserinterface#
interface PdfUserDefined in packages/pdf/src/viewer/types.ts:287
PdfViewerApiinterface#
interface PdfViewerApi extends Widget<PdfViewerOptions, PdfViewerEvents>| Member | Type | Description |
|---|---|---|
readyreadonly | 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 | — |
elementreadonly | 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. |
Defined in packages/pdf/src/viewer/types.ts:593
PdfViewerEventsinterface#
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 } | — |
Defined in packages/pdf/src/viewer/types.ts:543
PdfViewerOptionsinterface#
interface PdfViewerOptions| Property | Type | Description |
|---|---|---|
documentoptional | PdfSource | PdfProgressiveSource | — |
rangeChunkSizeoptional | number | — |
fileNameoptional | string | — |
passwordoptional | string | — |
allowFetchoptional | boolean | — |
fetchDocumentoptional | RendererFetchDocument | — |
rendereroptional | PdfRendererSource | — |
workeroptional | PdfWorkerSource | — |
renderOptionsoptional | PdfRenderOptions | — |
renderPageoptional | (context: RenderPageContext) => Promise<void> | void | — |
licenseKeyoptional | string | — |
injectStylesoptional | boolean | — |
themeoptional | 'light' | 'dark' | 'auto' | — |
invertPagesInDarkoptional | boolean | — |
heightoptional | number | string | — |
ariaLabeloptional | string | — |
toolbaroptional | boolean | ToolbarItem[] | — |
toolbarPresetoptional | ToolbarPreset | — |
initialViewStateoptional | Partial<PdfViewState> | — |
shortcutsoptional | ShortcutOverrides | — |
toolsoptional | ViewerTool[] | — |
sidebaroptional | false | SidebarPanel | — |
sidebarPanelsoptional | SidebarPanel[] | — |
isSidebarOpenoptional | boolean | — |
initialPageoptional | number | — |
zoomoptional | ZoomValue | — |
minZoomoptional | number | — |
maxZoomoptional | number | — |
spreadoptional | SpreadMode | — |
scrollModeoptional | ScrollMode | — |
pageDirectionoptional | 'ltr' | 'rtl' | — |
toolGroupoptional | ToolGroup | — |
authoroptional | string | — |
currentUseroptional | string | PdfUser | — |
canEditoptional | (annotation: PdfAnnotation, user: PdfUser) => boolean | — |
readOnlyoptional | boolean | — |
annotationSyncoptional | AnnotationSyncChannel | — |
ignorePermissionsoptional | boolean | — |
localeoptional | string | — |
localeTextoptional | LocaleTextInput | — |
rtloptional | boolean | — |
onPasswordRequestoptional | (request: { isRetry: boolean; fileName: string; }) => string | undefined | null | Promise<string | undefined | null> | — |
signatureStorageoptional | SignatureStorage | — |
ocroptional | ViewerOcrOptions | — |
trustedCertificatesoptional | (Uint8Array | string)[] | — |
trustListsoptional | PdfTrustList[] | Trust lists read with loadTrustList; a list past its expiry date is not used. |
allowFileDropoptional | boolean | — |
fileConvertersoptional | Record<string, PdfFileConverter> | — |
fillInitialsoptional | string | — |
welcomeoptional | boolean | — |
convertMailoptional | boolean | MailConversionOptions | — |
decodeImageoptional | ImageDecoder | — |
tabsoptional | boolean | — |
printResolutionoptional | number | — |
snappingoptional | boolean | — |
keepToolSelectedoptional | boolean | — |
pixelRatiooptional | number | — |
maxRenderPixelsoptional | number | — |
placeholdersoptional | boolean | — |
enableFormsoptional | boolean | — |
enablePageToolsoptional | boolean | — |
enableFormDesigneroptional | boolean | — |
highlightRequiredFieldsoptional | boolean | — |
tooloptional | ViewerTool | — |
annotationDefaultsoptional | Partial<Record<AnnotationType, Partial<AnnotationDefaults>>> | — |
annotationPresetsoptional | AnnotationPreset[] | — |
fontsoptional | PdfFontSource[] | — |
fontFallbackoptional | PdfFontFallback | — |
mentionsoptional | MentionOptions | — |
allowMissingGlyphsoptional | boolean | — |
textRasterizeroptional | 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. |
annotationScopeoptional | 'markup' | 'all' | — |
stampsoptional | StampDefinition[] | — |
onStampsChangeoptional | (stamps: StampDefinition[]) => void | Called with the whole list when a stamp is created or deleted in the stamp gallery. |
labelsoptional | Partial<Record<LabelKey, string>> & { tools?: Partial<Record<ViewerTool, string>> } | — |
maxCanvasPixelsoptional | number | — |
pageGapoptional | number | — |
createIdoptional | () => string | — |
nowoptional | () => Date | — |
Defined in packages/pdf/src/viewer/types.ts:452
PdfViewStateinterface#
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 } | — |
Defined in packages/pdf/src/viewer/types.ts:205
PixelBufferinterface#
interface PixelBufferDefined in packages/pdf/src/compare/pixel-diff.ts:1
PixelDiffOptionsinterface#
interface PixelDiffOptions| Property | Type | Description |
|---|---|---|
toleranceoptional | number | — |
coloroptional | readonly [number, number, number] | — |
paddingoptional | readonly [number, number, number, number] | — |
cellSizeoptional | number | — |
mergeDistanceoptional | number | — |
minRegionPixelsoptional | number | — |
maxRegionsoptional | number | — |
Defined in packages/pdf/src/compare/pixel-diff.ts:7
PixelDiffRegioninterface#
interface PixelDiffRegion| Property | Type | Description |
|---|---|---|
x | number | — |
y | number | — |
width | number | — |
height | number | — |
changedPixels | number | — |
Defined in packages/pdf/src/compare/pixel-diff.ts:17
PixelDiffResultinterface#
interface PixelDiffResult| Property | Type | Description |
|---|---|---|
width | number | — |
height | number | — |
mask | Uint8ClampedArray<ArrayBuffer> | — |
changedPixels | number | — |
changedRatio | number | — |
regions | PixelDiffRegion[] | — |
Defined in packages/pdf/src/compare/pixel-diff.ts:25
Pkcs12Contentsinterface#
interface Pkcs12Contents| Property | Type | Description |
|---|---|---|
privateKey | Uint8Array | — |
privateKeyPem | string | — |
certificate | Uint8Array | — |
chain | Uint8Array[] | — |
friendlyNameoptional | string | — |
Defined in packages/pdf/src/signatures/pkcs12.ts:32
PrepareImageOptionsinterface#
interface PrepareImageOptions| Property | Type | Description |
|---|---|---|
decodeImageoptional | ImageDecoder | — |
mimeTypeoptional | string | — |
Defined in packages/pdf/src/formats/image/types.ts:14
PresenceStateinterface#
interface PresenceState| Property | Type | Description |
|---|---|---|
actorId | string | — |
name | string | — |
color | string | — |
pageIndexoptional | number | — |
pointoptional | PdfPoint | — |
selectionoptional | string[] | — |
viewPageIndexoptional | number | — |
Defined in packages/pdf/src/annotations/sync.ts:579
PresenceTrackerinterface#
interface PresenceTracker| Property | Type | Description |
|---|---|---|
receive() | (message: PresenceMessage) => void | — |
list() | () => PresenceState[] | — |
get() | (actorId: string) => PresenceState | undefined | — |
prune() | (now?: number) => string[] | — |
clear() | () => void | — |
Defined in packages/pdf/src/annotations/sync.ts:592
PrintOptionsinterface#
interface PrintOptions| Property | Type | Description |
|---|---|---|
pagesoptional | 'all' | 'current' | number[] | string | — |
resolutionoptional | number | — |
annotationsoptional | boolean | — |
modeoptional | PrintMode | — |
scaleoptional | PrintScale | Size on paper: the size of the page, fitted to the paper, or a percentage. Anything but 'actual' prints as images. |
Defined in packages/pdf/src/viewer/print.ts:9
RasterizedTextinterface#
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. |
Defined in packages/pdf/src/fonts/text-rasterizer.ts:7
RasterTextStyleinterface#
interface RasterTextStyle| Property | Type | Description |
|---|---|---|
fontSize | number | — |
Defined in packages/pdf/src/fonts/text-rasterizer.ts:3
ReadAloudChunkinterface#
interface ReadAloudChunkDefined in packages/pdf/src/viewer/types.ts:215
ReadAloudHandleinterface#
interface ReadAloudHandle| Property | Type | Description |
|---|---|---|
isPausedreadonly | boolean | — |
isStoppedreadonly | boolean | — |
finishedreadonly | Promise<void> | — |
pause() | () => void | — |
resume() | () => void | — |
stop() | () => void | — |
Defined in packages/pdf/src/viewer/types.ts:228
ReadAloudOptionsinterface#
interface ReadAloudOptions| Property | Type | Description |
|---|---|---|
fromPageoptional | number | — |
onTextoptional | (chunk: ReadAloudChunk) => void | Promise<void> | — |
langoptional | string | — |
rateoptional | number | — |
Defined in packages/pdf/src/viewer/types.ts:221
RecognizedPageinterface#
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. |
Defined in packages/pdf/src/document/session-types.ts:91
RecognizeTextOptionsinterface#
interface RecognizeTextOptions| Property | Type | Description |
|---|---|---|
recognizeText | RecognizeTextCallback | — |
pagesoptional | number[] | — |
includePagesWithTextoptional | boolean | — |
renderPageoptional | (pageIndex: number) => RenderedPageImage | undefined | Promise<RenderedPageImage | undefined> | — |
Defined in packages/pdf/src/document/session-types.ts:77
RecognizeTextRequestinterface#
interface RecognizeTextRequest| Property | Type | Description |
|---|---|---|
pagesoptional | number[] | Pages to work on, from 0. All pages by default. |
includePagesWithTextoptional | boolean | Also recognise pages that already have text. |
languageoptional | string | — |
signaloptional | AbortSignal | — |
onProgressoptional | (progress: { pageIndex: number; position: number; total: number; progress: number }) => void | — |
Defined in packages/pdf/src/viewer/types.ts:409
RedactionAreainterface#
interface RedactionArea| Property | Type | Description |
|---|---|---|
rect | PdfRect | — |
fillColoroptional | string | — |
overlayTextoptional | string | — |
Defined in packages/pdf/src/redaction/redact.ts:33
RedactionImageInfointerface#
interface RedactionImageInfo| Property | Type | Description |
|---|---|---|
data | Uint8Array | — |
filter | string | — |
width | number | — |
height | number | — |
bitsPerComponent | number | — |
colorSpaceoptional | string | — |
isMask | boolean | — |
decodeoptional | number[] | — |
decodeParmsoptional | Record<string, number | boolean> | — |
jbig2Globalsoptional | Uint8Array | — |
Defined in packages/pdf/src/redaction/images.ts:11
RedactionImageOutcomeinterface#
interface RedactionImageOutcome| Property | Type | Description |
|---|---|---|
name | string | — |
action | 'modified' | 'removed' | — |
filteroptional | string | — |
decodedByoptional | 'package' | 'callback' | — |
reasonoptional | RedactionImageRemovalReason | — |
messageoptional | string | — |
Defined in packages/pdf/src/redaction/images.ts:32
RedactionImageRequestinterface#
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. |
colorSpaceoptional | string | undefined | Inherited from RedactionImageInfo. |
isMask | boolean | Inherited from RedactionImageInfo. |
decodeoptional | number[] | undefined | Inherited from RedactionImageInfo. |
decodeParmsoptional | Record<string, number | boolean> | undefined | Inherited from RedactionImageInfo. |
jbig2Globalsoptional | Uint8Array<ArrayBufferLike> | undefined | Inherited from RedactionImageInfo. |
Defined in packages/pdf/src/redaction/redact.ts:55
RedactionReportinterface#
interface RedactionReport| Property | Type | Description |
|---|---|---|
glyphsRemoved | number | — |
removedText | string | — |
imagesRemoved | number | — |
imagesModified | number | — |
pathsRemoved | number | — |
formsRewritten | number | — |
images | RedactionImageOutcome[] | — |
Defined in packages/pdf/src/redaction/redact.ts:39
RedactionSearchOptionsinterface#
interface RedactionSearchOptions| Property | Type | Description |
|---|---|---|
pagesoptional | number[] | — |
caseSensitiveoptional | boolean | — |
wholeWordoptional | boolean | — |
overlayTextoptional | string | — |
fillColoroptional | string | — |
Defined in packages/pdf/src/document/session-types.ts:152
RemoteAnnotationChangesinterface#
interface RemoteAnnotationChanges| Property | Type | Description |
|---|---|---|
upsert | PdfAnnotation[] | — |
remove | string[] | — |
Defined in packages/pdf/src/annotations/sync.ts:38
RenderedPageImageinterface#
interface RenderedPageImageDefined in packages/pdf/src/document/session-types.ts:84
RendererDocumentinterface#
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()optional | () => Promise<string[] | null> | — |
getMetadata()optional | () => Promise<{ info?: Record<string, unknown> } | null> | — |
getAttachments()optional | () => Promise<Record<string, { filename?: string; content?: Uint8Array; description?: string }> | null> | — |
getData()optional | () => Promise<Uint8Array> | — |
getOptionalContentConfig()optional | (params?: { intent?: string }) => Promise<RendererOptionalContentConfig> | — |
destroy() | () => Promise<void> | — |
Defined in packages/pdf/src/viewer/renderer.ts:112
RendererDocumentSourceinterface#
interface RendererDocumentSource| Property | Type | Description |
|---|---|---|
dataoptional | Uint8Array | — |
urloptional | string | — |
httpHeadersoptional | Record<string, string> | — |
withCredentialsoptional | boolean | — |
rangeoptional | RendererRangeTransport | — |
lengthoptional | number | — |
passwordoptional | string | — |
rangeChunkSizeoptional | number | — |
allowFetchoptional | boolean | — |
fetchDocumentoptional | RendererFetchDocument | — |
Defined in packages/pdf/src/viewer/renderer.ts:147
RendererFetchReplyinterface#
interface RendererFetchReplyDefined in packages/pdf/src/viewer/renderer.ts:140
RendererFetchRequestinterface#
interface RendererFetchRequest| Property | Type | Description |
|---|---|---|
url | string | — |
rangeoptional | { begin: number; end: number } | — |
headersoptional | Record<string, string> | — |
withCredentials | boolean | — |
signal | AbortSignal | — |
Defined in packages/pdf/src/viewer/renderer.ts:132
RendererLoadingTaskinterface#
interface RendererLoadingTask| Property | Type | Description |
|---|---|---|
promise | Promise<RendererDocument> | — |
destroy() | () => Promise<void> | — |
onPasswordoptional | (update: (password: string) => void, reason: number) => void | — |
Defined in packages/pdf/src/viewer/renderer.ts:126
RendererPageinterface#
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()optional | () => Promise<RendererStructNode | null | undefined> | — |
getAnnotations()optional | (params?: { intent?: string }) => Promise<RendererLinkAnnotation[]> | — |
cleanup()optional | () => void | — |
Defined in packages/pdf/src/viewer/renderer.ts:60
RenderPageContextinterface#
interface RenderPageContext| Property | Type | Description |
|---|---|---|
pageIndex | number | — |
canvas | HTMLCanvasElement | — |
viewport | RendererViewport | — |
scale | number | — |
pixelRatio | number | — |
areaoptional | { x: number; y: number; width: number; height: number } | — |
signal | AbortSignal | — |
defaultRender() | () => Promise<void> | — |
Defined in packages/pdf/src/viewer/types.ts:147
RenderStatsinterface#
interface RenderStats| Property | Type | Description |
|---|---|---|
views | number | — |
renderedViews | number | — |
canvasPixels | number | — |
queued | number | — |
thumbnails | number | — |
thumbnailPixels | number | — |
renderMode | 'worker' | 'main' | — |
Defined in packages/pdf/src/viewer/viewport.ts:43
ReplaceTextResultinterface#
interface ReplaceTextResult| Property | Type | Description |
|---|---|---|
replaced | number | — |
failed | { id: string; text: string; reason: ContentEditFailure; message: string }[] | — |
Defined in packages/pdf/src/content-edit/find-replace.ts:28
ResetFormActioninterface#
interface ResetFormActionDefined in packages/pdf/src/forms/types.ts:225
ResizePagesOptionsinterface#
interface ResizePagesOptions| Property | Type | Description |
|---|---|---|
width | number | — |
height | number | — |
anchoroptional | PageAnchor | — |
scaleContent | boolean | — |
fitoptional | 'fit' | 'fill' | — |
marginoptional | number | — |
Defined in packages/pdf/src/document/session-types.ts:53
RestyleResultinterface#
interface RestyleResult extends TextEditResult| Property | Type | Description |
|---|---|---|
rectoptional | PdfRect | — |
isSyntheticoptional | boolean | — |
ok | boolean | Inherited from TextEditResult. |
reasonoptional | ContentEditFailure | undefined | Inherited from TextEditResult. |
messageoptional | string | undefined | Inherited from TextEditResult. |
usedFontoptional | "original" | "embedded" | "standard" | undefined | Inherited from TextEditResult. |
fontNamesoptional | string[] | undefined | Inherited from TextEditResult. |
missingoptional | string | undefined | Inherited from TextEditResult. |
widthChangeoptional | number | undefined | Inherited from TextEditResult. |
Defined in packages/pdf/src/content-edit/text-style.ts:56
RevocationAnswerinterface#
interface RevocationAnswer| Property | Type | Description |
|---|---|---|
status | 'good' | 'revoked' | 'unknown' | — |
revokedAtoptional | Date | string | — |
reasonoptional | string | — |
Defined in packages/pdf/src/signatures/verify.ts:48
RichTextDefaultsinterface#
interface RichTextDefaults| Property | Type | Description |
|---|---|---|
fontSize | number | — |
color | string | — |
fontFamily | string | — |
align | RichTextAlign | — |
Defined in packages/pdf/src/annotations/rich-text.ts:18
RichTextLineinterface#
interface RichTextLine| Property | Type | Description |
|---|---|---|
pieces | { text: string; style: ResolvedStyle; width: number }[] | — |
width | number | — |
fontSize | number | — |
align | RichTextAlign | — |
Defined in packages/pdf/src/annotations/rich-text.ts:465
RichTextParagraphinterface#
interface RichTextParagraph| Property | Type | Description |
|---|---|---|
runs | RichTextRun[] | — |
alignoptional | RichTextAlign | — |
Defined in packages/pdf/src/annotations/types.ts:81
RichTextRuninterface#
interface RichTextRun| Property | Type | Description |
|---|---|---|
text | string | — |
boldoptional | boolean | — |
italicoptional | boolean | — |
underlineoptional | boolean | — |
strikethroughoptional | boolean | — |
coloroptional | string | — |
fontSizeoptional | number | — |
fontFamilyoptional | string | — |
Defined in packages/pdf/src/annotations/types.ts:70
SanitizeOptionsinterface#
interface SanitizeOptions| Property | Type | Description |
|---|---|---|
metadataoptional | boolean | Document information, XMP packets and private application data. |
attachmentsoptional | boolean | Embedded files and file attachment annotations. |
scriptsoptional | boolean | JavaScript, open actions and additional actions. |
commentsoptional | boolean | Every annotation except links and form fields. |
Defined in packages/pdf/src/tools/sanitize.ts:11
SanitizeReportinterface#
interface SanitizeReport| Property | Type | Description |
|---|---|---|
metadata | number | — |
attachments | number | — |
scripts | number | — |
comments | number | — |
before | number | — |
after | number | — |
Defined in packages/pdf/src/tools/sanitize.ts:24
SanitizeResultinterface#
interface SanitizeResult| Property | Type | Description |
|---|---|---|
bytes | PdfBytes | — |
report | SanitizeReport | — |
Defined in packages/pdf/src/tools/sanitize.ts:34
SavedSignatureinterface#
interface SavedSignature| Property | Type | Description |
|---|---|---|
id | string | — |
draft | SignatureDraft | — |
createdAt | string | — |
Defined in packages/pdf/src/viewer/types.ts:293
SaveOptionsinterface#
interface SaveOptions| Property | Type | Description |
|---|---|---|
allowMissingGlyphsoptional | boolean | — |
objectStreamsoptional | boolean | — |
modeoptional | SaveMode | — |
compressoptional | boolean | — |
flattenoptional | FlattenMode | — |
linearizeoptional | boolean | — |
Defined in packages/pdf/src/document/session-types.ts:135
SaveResultinterface#
interface SaveResult| Property | Type | Description |
|---|---|---|
bytes | PdfBytes | — |
mode | 'incremental' | 'full' | — |
redactions | RedactionReport[] | — |
missingGlyphsoptional | MissingGlyphReport | Characters that were written without a glyph, and their scripts; absent when every character was drawn. |
Defined in packages/pdf/src/document/session-types.ts:144
SearchOptionsinterface#
interface SearchOptions| Property | Type | Description |
|---|---|---|
caseSensitiveoptional | boolean | — |
wholeWordoptional | boolean | — |
diacriticSensitiveoptional | boolean | — |
regexoptional | boolean | — |
Defined in packages/pdf/src/viewer/search.ts:15
Shortcutinterface#
interface Shortcut| Property | Type | Description |
|---|---|---|
keys | string | — |
command | ViewerCommand | — |
description | string | — |
Defined in packages/pdf/src/viewer/keyboard.ts:144
SignatureAppearanceOptionsinterface#
interface SignatureAppearanceOptions| Property | Type | Description |
|---|---|---|
textoptional | string[] | — |
imageoptional | Uint8Array | — |
showDateoptional | boolean | — |
showReasonoptional | boolean | — |
showLocationoptional | boolean | — |
fontSizeoptional | number | — |
textColoroptional | [number, number, number] | — |
borderColoroptional | [number, number, number] | null | — |
borderWidthoptional | number | — |
backgroundColoroptional | [number, number, number] | null | — |
Defined in packages/pdf/src/signatures/appearance.ts:6
SignatureDraftinterface#
interface SignatureDraft| Property | Type | Description |
|---|---|---|
kind | 'drawn' | 'typed' | 'image' | — |
inkListoptional | PdfPoint[][] | — |
textoptional | string | — |
imageoptional | { data: Uint8Array; mimeType: 'image/png' | 'image/jpeg'; width: number; height: number } | — |
Defined in packages/pdf/src/viewer/types.ts:586
SignatureFieldInfointerface#
interface SignatureFieldInfo| Property | Type | Description |
|---|---|---|
name | string | — |
pageIndex | number | — |
rect | PdfRect | — |
isSigned | boolean | — |
isRequired | boolean | — |
isReadOnly | boolean | — |
lockoptional | SignatureFieldLock | — |
Defined in packages/pdf/src/forms/types.ts:261
SignatureFieldLockinterface#
interface SignatureFieldLockDefined in packages/pdf/src/forms/types.ts:256
SignatureFieldPlacementinterface#
interface SignatureFieldPlacementDefined in packages/pdf/src/signatures/sign.ts:33
SignatureInfointerface#
interface SignatureInfo| Property | Type | Description |
|---|---|---|
signerNameoptional | string | — |
signedAtoptional | string | — |
reasonoptional | string | — |
locationoptional | string | — |
filteroptional | string | — |
subFilteroptional | string | — |
byteRangeoptional | number[] | — |
coversWholeFile | boolean | — |
hasLaterChanges | boolean | — |
integrity | 'unchecked' | 'intact' | 'modified' | 'unsupported' | — |
Defined in packages/pdf/src/forms/types.ts:67
SignatureStorageinterface#
interface SignatureStorage| Property | Type | Description |
|---|---|---|
load() | () => SavedSignature[] | Promise<SavedSignature[]> | — |
save() | (signatures: SavedSignature[]) => void | Promise<void> | — |
Defined in packages/pdf/src/viewer/types.ts:299
SignDigestInfointerface#
interface SignDigestInfo| Property | Type | Description |
|---|---|---|
algorithm | 'RSASSA-PKCS1-v1_5' | 'ECDSA' | — |
hash | HashName | — |
curveoptional | 'P-256' | 'P-384' | 'P-521' | — |
signedAttributes | Uint8Array | — |
Defined in packages/pdf/src/signatures/signer.ts:9
SignPdfOptionsinterface#
interface SignPdfOptions| Property | Type | Description |
|---|---|---|
certificateoptional | Uint8Array | string | — |
certificateChainoptional | (Uint8Array | string)[] | — |
privateKeyoptional | string | CryptoKey | — |
signDigestoptional | SignDigestCallback | — |
pkcs12optional | Uint8Array | ArrayBuffer | — |
pkcs12Passwordoptional | string | — |
timestampoptional | TimestampCallback | — |
reasonoptional | string | — |
locationoptional | string | — |
contactInfooptional | string | — |
nameoptional | string | — |
fieldoptional | string | SignatureFieldPlacement | — |
appearanceoptional | SignatureAppearanceOptions | false | — |
certificationLeveloptional | 1 | 2 | 3 | — |
certifyoptional | PdfCertificationPermission | — |
subFilteroptional | PdfSignatureSubFilter | — |
signedAtoptional | Date | — |
placeholderSizeoptional | number | — |
passwordoptional | string | — |
lockFieldsoptional | PdfFieldLock | — |
Defined in packages/pdf/src/signatures/sign.ts:48
SplitNaminginterface#
interface SplitNaming| Property | Type | Description |
|---|---|---|
baseNameoptional | string | — |
Defined in packages/pdf/src/tools/split.ts:20
SplitPartinterface#
interface SplitPart| Property | Type | Description |
|---|---|---|
bytes | PdfBytes | — |
pageIndexes | number[] | — |
name | string | — |
titleoptional | string | — |
Defined in packages/pdf/src/tools/split.ts:13
StampDefinitioninterface#
interface StampDefinition| Property | Type | Description |
|---|---|---|
name | string | — |
label | string | ((context: DynamicStampContext) => string) | — |
coloroptional | string | — |
subtitleoptional | string | ((context: DynamicStampContext) => string) | A function, or text in which {name} and {date} stand for the current user and the date and time. |
isUserMadeoptional | boolean | Set on stamps made in the stamp gallery; these can be deleted there. |
Defined in packages/pdf/src/viewer/types.ts:312
StampImageOptionsinterface#
interface StampImageOptions| Property | Type | Description |
|---|---|---|
data | Uint8Array | — |
rectoptional | PdfRect | — |
positionoptional | StampPosition | — |
widthoptional | number | — |
heightoptional | number | — |
opacityoptional | number | — |
rotationoptional | number | — |
layeroptional | 'over' | 'under' | — |
marginoptional | number | — |
Defined in packages/pdf/src/tools/stamping.ts:29
StampTextOptionsinterface#
interface StampTextOptions| Property | Type | Description |
|---|---|---|
text | string | — |
positionoptional | StampPosition | — |
fontSizeoptional | number | — |
coloroptional | string | — |
opacityoptional | number | — |
rotationoptional | number | — |
fontoptional | StandardFont | — |
layeroptional | 'over' | 'under' | — |
marginoptional | number | — |
fontsoptional | FontRegistry | — |
Defined in packages/pdf/src/tools/stamping.ts:16
SubmitFormActioninterface#
interface SubmitFormAction| Property | Type | Description |
|---|---|---|
type | 'submitForm' | — |
url | string | — |
flags | number | — |
format | SubmitFormat | — |
method | 'get' | 'post' | — |
fields | string[] | — |
isExclude | boolean | — |
includeEmpty | boolean | — |
Defined in packages/pdf/src/forms/types.ts:214
SyncableDocumentinterface#
interface SyncableDocument| Property | Type | Description |
|---|---|---|
on() | (event: DocumentSyncEvent, listener: (payload: object) => void) => () => void | — |
getFormValues() | () => Record<string, FormSyncValue> | — |
setFormValues() | (values: Record<string, FormSyncValue>) => unknown | — |
getFormField()optional | (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 | — |
Defined in packages/pdf/src/annotations/sync-hosts.ts:6
SyncAnnotationChangesinterface#
interface SyncAnnotationChanges| Property | Type | Description |
|---|---|---|
added | PdfAnnotation[] | — |
changed | { before: PdfAnnotation; after: PdfAnnotation }[] | — |
removed | PdfAnnotation[] | — |
source | string | — |
Defined in packages/pdf/src/annotations/sync.ts:31
SyncChannelOptionsinterface#
interface SyncChannelOptions| Property | Type | Description |
|---|---|---|
actorIdoptional | string | — |
coloroptional | string | — |
channelsoptional | readonly SyncChannelName[] | — |
snapshotoptional | SyncSnapshot | — |
presenceTimeoutoptional | number | — |
onConflictoptional | (conflict: SyncConflict) => void | — |
onPresenceChangeoptional | (collaborators: PresenceState[]) => void | — |
Defined in packages/pdf/src/viewer/collaboration-channel.ts:20
SyncClockinterface#
interface SyncClockDefined in packages/pdf/src/annotations/sync.ts:7
SyncConflictinterface#
interface SyncConflict| Property | Type | Description |
|---|---|---|
annotationId | string | — |
reason | 'older-write' | 'removed' | — |
keys | string[] | — |
operation | SyncOperation | — |
winner | SyncClock | — |
Defined in packages/pdf/src/annotations/sync.ts:23
SyncOperationinterface#
interface SyncOperation| Property | Type | Description |
|---|---|---|
id | string | — |
kind | SyncOperationKind | — |
annotationId | string | — |
payload | { [key: string]: SyncJson } | — |
author | string | — |
clock | SyncClock | — |
Defined in packages/pdf/src/annotations/sync.ts:14
SyncSnapshotinterface#
interface SyncSnapshot| Property | Type | Description |
|---|---|---|
version | 1 | — |
counter | number | — |
entries | SyncSnapshotEntry[] | — |
formsoptional | FormSyncSnapshot | — |
pagesoptional | PageSyncSnapshot | — |
Defined in packages/pdf/src/annotations/sync.ts:73
SyncSnapshotEntryinterface#
interface SyncSnapshotEntry| Property | Type | Description |
|---|---|---|
id | string | — |
addedoptional | SyncClock | — |
removedoptional | SyncClock | — |
groups | { [group: string]: { clock: SyncClock; values: { [key: string]: SyncJson } } } | — |
replies | { [replyId: string]: { clock: SyncClock; added?: SyncClock; removed?: SyncClock; reply?: { [key: string]: SyncJson }; }; } | — |
Defined in packages/pdf/src/annotations/sync.ts:58
SyncTransportinterface#
interface SyncTransport| Property | Type | Description |
|---|---|---|
actorIdoptional | string | — |
send() | (message: SyncMessage) => void | — |
subscribe() | (receive: (message: SyncMessage) => void) => (() => void) | void | — |
Defined in packages/pdf/src/viewer/collaboration-channel.ts:14
TextEditResultinterface#
interface TextEditResult| Property | Type | Description |
|---|---|---|
ok | boolean | — |
reasonoptional | ContentEditFailure | — |
messageoptional | string | — |
usedFontoptional | 'original' | 'embedded' | 'standard' | — |
fontNamesoptional | string[] | — |
missingoptional | string | — |
widthChangeoptional | number | — |
Defined in packages/pdf/src/content-edit/types.ts:32
TextLayerResultinterface#
interface TextLayerResult| Property | Type | Description |
|---|---|---|
words | number | — |
skippedWords | number | — |
Defined in packages/pdf/src/content-edit/text-layer.ts:38
TextLayerWordinterface#
interface TextLayerWord| Property | Type | Description |
|---|---|---|
text | string | — |
rect | PdfRect | — |
rotationoptional | 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. |
Defined in packages/pdf/src/content-edit/text-layer.ts:14
TextMatchinterface#
interface TextMatchDefined in packages/pdf/src/content/text.ts:386
TextMoveinterface#
interface TextMoveDefined in packages/pdf/src/content-edit/types.ts:109
TextMoveResultinterface#
interface TextMoveResult extends TextEditResult| Property | Type | Description |
|---|---|---|
runoptional | TextRun | — |
ok | boolean | Inherited from TextEditResult. |
reasonoptional | ContentEditFailure | undefined | Inherited from TextEditResult. |
messageoptional | string | undefined | Inherited from TextEditResult. |
usedFontoptional | "original" | "embedded" | "standard" | undefined | Inherited from TextEditResult. |
fontNamesoptional | string[] | undefined | Inherited from TextEditResult. |
missingoptional | string | undefined | Inherited from TextEditResult. |
widthChangeoptional | number | undefined | Inherited from TextEditResult. |
Defined in packages/pdf/src/content-edit/types.ts:114
TextParagraphinterface#
interface TextParagraph| Property | Type | Description |
|---|---|---|
index | number | — |
text | string | — |
lines | string[] | — |
runs | TextRun[] | — |
rect | PdfRect | — |
fontName | string | — |
baseFontoptional | string | — |
fontSize | number | — |
lineHeight | number | — |
alignment | ParagraphAlignment | How the lines sit in the block. A rewritten paragraph keeps it. |
Defined in packages/pdf/src/content-edit/paragraphs.ts:26
TextRuninterface#
interface TextRun| Property | Type | Description |
|---|---|---|
index | number | — |
operator | string | — |
text | string | — |
rect | PdfRect | — |
fontName | string | — |
fontSize | number | — |
baseFontoptional | string | — |
origin | PdfPoint | — |
matrix | Matrix | — |
advance | number | — |
isInvisibleoptional | boolean | Drawn with the invisible render mode, as a text layer over a scan is. |
Defined in packages/pdf/src/content-edit/types.ts:8
TextStyleinterface#
interface TextStyle| Property | Type | Description |
|---|---|---|
fontoptional | string | A standard font, or the name of a supplied font. |
fontSizeoptional | number | — |
coloroptional | string | — |
isBoldoptional | boolean | — |
isItalicoptional | boolean | — |
Defined in packages/pdf/src/content-edit/types.ts:98
TimestampRequestInfointerface#
interface TimestampRequestInfoDefined in packages/pdf/src/signatures/sign.ts:39
ValidationDataRequestinterface#
interface ValidationDataRequest| Property | Type | Description |
|---|---|---|
certificate | PdfCertificateInfo | — |
issuer | PdfCertificateInfo | — |
ocspUrls | string[] | — |
crlUrls | string[] | — |
Defined in packages/pdf/src/signatures/dss.ts:81
ValidationDataResponseinterface#
interface ValidationDataResponseDefined in packages/pdf/src/signatures/dss.ts:88
VerifySignaturesOptionsinterface#
interface VerifySignaturesOptions| Property | Type | Description |
|---|---|---|
trustedRootsoptional | (Uint8Array | string)[] | — |
trustListsoptional | PdfTrustList[] | Trust lists from loadTrustList. A list past its expiry date is not used and is named in the result. |
nowoptional | Date | — |
passwordoptional | string | — |
ocspsoptional | Uint8Array[] | — |
crlsoptional | Uint8Array[] | — |
checkRevocationoptional | RevocationCallback | — |
requireRevocationoptional | boolean | — |
limitsoptional | Partial<PdfLimits> | — |
Defined in packages/pdf/src/signatures/verify.ts:59
ViewerCommandInfointerface#
interface ViewerCommandInfo| Property | Type | Description |
|---|---|---|
id | ViewerCommand | — |
label | string | — |
shortcutoptional | string | — |
isEnabled | boolean | — |
Defined in packages/pdf/src/viewer/types.ts:245
ViewerOcrOptionsinterface#
interface ViewerOcrOptions| Property | Type | Description |
|---|---|---|
modeloptional | 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. |
workeroptional | boolean | OcrWorkerLike | (() => OcrWorkerLike) | true starts the packaged worker, or pass a worker running @birchui/pdf/ocr-worker or a function creating one. |
engineoptional | ViewerOcrEngine | An engine of your own instead of the packaged one; model and worker are then ignored. |
languagesoptional | string[] | Languages offered in the dialog. Read from the model by default. |
dpioptional | number | Resolution pages are rendered at for recognition. 200 by default. |
banneroptional | boolean | false hides the banner offered on scanned pages. |
Defined in packages/pdf/src/viewer/types.ts:391
XfdfImportinterface#
interface XfdfImport| Property | Type | Description |
|---|---|---|
annotations | AnnotationInput[] | — |
fields | Record<string, FormValue> | — |
Defined in packages/pdf/src/annotations/xfdf.ts:417
ZipEntryinterface#
interface ZipEntryDefined in packages/pdf/src/tools/zip.ts:3
AccessibilityCodetype#
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';Defined in packages/pdf/src/tools/accessibility.ts:8
AnnotationFonttype#
type AnnotationFont = 'Helvetica' | 'Times' | 'Courier';Defined in packages/pdf/src/annotations/types.ts:42
AnnotationInputtype#
type AnnotationInput = Partial<Omit<PdfAnnotation, 'type' | 'pageIndex'>> &
Pick<PdfAnnotation, 'type' | 'pageIndex'>;Defined in packages/pdf/src/annotations/types.ts:186
AnnotationPatchtype#
type AnnotationPatch = Partial<Omit<PdfAnnotation, 'id'>>;Defined in packages/pdf/src/annotations/types.ts:189
AnnotationTypetype#
type AnnotationType =
| TextMarkupType
| ShapeType
| MeasurementType
| 'note'
| 'caret'
| 'freeText'
| 'ink'
| 'stamp'
| 'image'
| 'signature'
| 'redaction'
| 'link'
| MediaAnnotationType;Defined in packages/pdf/src/annotations/types.ts:18
ArchiveRuletype#
type ArchiveRule =
| 'encryption'
| 'fonts'
| 'metadata'
| 'output-intent'
| 'javascript'
| 'launch-action'
| 'embedded-files'
| 'transparency'
| 'lzw'
| 'file-id';Defined in packages/pdf/src/tools/archive-check.ts:9
ArchiveSeveritytype#
type ArchiveSeverity = 'error' | 'warning' | 'info';Defined in packages/pdf/src/tools/archive-check.ts:7
AsyncRedactionImageDecodertype#
type AsyncRedactionImageDecoder = (
image: PageRedactionImage,
) => DecodedRedactionImage | undefined | Promise<DecodedRedactionImage | undefined>;Defined in packages/pdf/src/document/session-types.ts:166
AttachmentInputtype#
type AttachmentInput = FileSpecInput;Defined in packages/pdf/src/tools/attachments.ts:30
AttachmentRelationshiptype#
type AttachmentRelationship =
'Source' | 'Data' | 'Alternative' | 'Supplement' | 'EncryptedPayload' | 'FormData' | 'Schema' | 'Unspecified';Defined in packages/pdf/src/pdf/file-spec.ts:20
BorderStyletype#
type BorderStyle = 'solid' | 'dashed' | 'dotted' | 'cloudy';Defined in packages/pdf/src/annotations/types.ts:40
BuiltInStamptype#
type BuiltInStamp =
'Approved' | 'Draft' | 'Confidential' | 'Final' | 'NotApproved' | 'ForComment' | 'Void' | 'Received';Defined in packages/pdf/src/annotations/types.ts:35
ChainProblemCodetype#
type ChainProblemCode =
'ca-not-valid-at-signing' | 'not-a-ca' | 'key-usage' | 'path-length' | 'name-constraints';Defined in packages/pdf/src/signatures/x509.ts:394
ChainStatustype#
type ChainStatus = 'trusted' | 'untrusted' | 'self-signed' | 'incomplete';Defined in packages/pdf/src/signatures/x509.ts:342
ChangeSourcetype#
type ChangeSource = 'user' | 'api' | 'history' | 'import' | 'remote';Defined in packages/pdf/src/annotations/store.ts:122
CheckResulttype#
type CheckResult = 'valid' | 'invalid' | 'unsupported';Defined in packages/pdf/src/signatures/algorithms.ts:15
CommentSorttype#
type CommentSort = 'page' | 'date' | 'author' | 'type';Defined in packages/pdf/src/viewer/comment-summary.ts:18
CommentSummaryFormattype#
type CommentSummaryFormat = 'pdf' | 'html' | 'csv';Defined in packages/pdf/src/viewer/comment-summary.ts:16
CompareInputtype#
type CompareInput = Uint8Array | ArrayBuffer | ComparableDocument;Defined in packages/pdf/src/compare/types.ts:69
CompareReportFormattype#
type CompareReportFormat = 'html' | 'csv' | 'json';Defined in packages/pdf/src/compare/report.ts:3
ContentEditFailuretype#
type ContentEditFailure =
| 'stale-hit'
| 'unsupported-font'
| 'missing-glyphs'
| 'empty-text'
| 'unsupported-image'
| 'not-invertible'
| 'unsupported-object';Defined in packages/pdf/src/content-edit/types.ts:23
DocCommandIdtype#
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';Defined in packages/pdf/src/viewer/keyboard.ts:31
DocumentChangeReasontype#
type DocumentChangeReason =
| 'metadata'
| 'outline'
| 'attachments'
| 'watermark'
| 'headerFooter'
| 'bates'
| 'crop'
| 'pageLabels'
| 'pageText'
| 'pageImage'
| 'pageObject'
| 'background'
| 'flatten'
| 'history';Defined in packages/pdf/src/document/session-types.ts:37
EncodedImageMimeTypetype#
type EncodedImageMimeType = 'image/jpeg' | 'image/jp2' | 'image/x-jbig2' | 'image/g3fax';Defined in packages/pdf/src/content-edit/extract-images.ts:27
EncryptionAlgorithmtype#
type EncryptionAlgorithm = 'rc4-40' | 'rc4-128' | 'aes-128' | 'aes-256';Defined in packages/pdf/src/security/standard.ts:8
ExtractedImageStatustype#
type ExtractedImageStatus = 'decoded' | 'encoded-only' | 'unsupported';Defined in packages/pdf/src/content-edit/extract-images.ts:25
FieldActiontype#
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 };Defined in packages/pdf/src/forms/types.ts:231
FieldActionTriggertype#
type FieldActionTrigger =
| 'activate'
| 'mouseUp'
| 'mouseDown'
| 'mouseEnter'
| 'mouseExit'
| 'focus'
| 'blur'
| 'keystroke'
| 'format'
| 'validate'
| 'calculate';Defined in packages/pdf/src/forms/types.ts:199
FieldAlignmenttype#
type FieldAlignment = 'left' | 'right' | 'top' | 'bottom' | 'center' | 'middle';Defined in packages/pdf/src/forms/types.ts:288
FieldFormattype#
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 };Defined in packages/pdf/src/forms/types.ts:41
FieldScriptReporttype#
type FieldScriptReport = Record<FieldScriptTrigger, FieldScriptInfo>;Defined in packages/pdf/src/forms/types.ts:164
FieldScriptTriggertype#
type FieldScriptTrigger = keyof FieldScripts;Defined in packages/pdf/src/forms/types.ts:156
FieldSignatureInputtype#
type FieldSignatureInput =
| { kind: 'image'; image: AnnotationImage }
| { kind: 'drawn'; inkList: PdfPoint[][]; strokeWidth?: number; color?: string }
| { kind: 'typed'; text: string };Defined in packages/pdf/src/forms/form-tools.ts:311
FileAttachmentIcontype#
type FileAttachmentIcon = 'PushPin' | 'Paperclip' | 'Graph' | 'Tag';Defined in packages/pdf/src/annotations/types.ts:110
FlattenModetype#
type FlattenMode = 'forms' | 'annotations' | 'all';Defined in packages/pdf/src/forms/flatten.ts:22
FormDataFormattype#
type FormDataFormat = 'fdf' | 'xfdf' | 'json' | 'xml';Defined in packages/pdf/src/viewer/types.ts:328
FormFieldPatchtype#
type FormFieldPatch = Partial<Omit<FormFieldInput, 'name' | 'type'>> & { widgetIndex?: number };Defined in packages/pdf/src/forms/types.ts:147
FormFieldTargettype#
type FormFieldTarget = string | { name: string; widgetIndex?: number };Defined in packages/pdf/src/forms/types.ts:286
FormFieldTypetype#
type FormFieldType = 'text' | 'checkbox' | 'radio' | 'combo' | 'list' | 'signature' | 'button';Defined in packages/pdf/src/forms/types.ts:5
FormIssueCodetype#
type FormIssueCode = 'required' | 'format' | 'range' | 'script' | 'maxLength' | 'pattern';Defined in packages/pdf/src/forms/types.ts:166
FormJsontype#
type FormJson = { [name: string]: FormJsonValue };Defined in packages/pdf/src/forms/form-data.ts:13
FormJsonValuetype#
type FormJsonValue = string | boolean | null | string[] | FormJson;Defined in packages/pdf/src/forms/form-data.ts:14
FormMessageKeytype#
type FormMessageKey =
| 'required'
| 'maxLength'
| 'number'
| 'rangeMin'
| 'rangeMax'
| 'date'
| 'time'
| 'special'
| 'mask'
| 'script'
| 'option'
| 'readOnlyType';Defined in packages/pdf/src/forms/form-messages.ts:1
FormMessageParamstype#
type FormMessageParams = Record<string, string | number>;Defined in packages/pdf/src/forms/form-messages.ts:15
FormSyncValuetype#
type FormSyncValue = string | string[] | boolean | null;Defined in packages/pdf/src/annotations/sync-forms.ts:3
FormValuetype#
type FormValue = string | string[] | boolean | null;Defined in packages/pdf/src/forms/types.ts:9
HashNametype#
type HashName = 'SHA-1' | 'SHA-256' | 'SHA-384' | 'SHA-512';Defined in packages/pdf/src/signatures/algorithms.ts:14
ImageDecodertype#
type ImageDecoder = (
bytes: Uint8Array,
mimeType: string,
) => DecodedImage | undefined | Promise<DecodedImage | undefined>;Defined in packages/pdf/src/formats/image/types.ts:9
ImageFileFormattype#
type ImageFileFormat = 'png' | 'jpeg' | 'gif' | 'bmp' | 'tiff' | 'webp' | 'svg';Defined in packages/pdf/src/formats/image/types.ts:1
ImageMovetype#
type ImageMove = { dx: number; dy: number } | { rect: PdfRect } | { matrix: Matrix };Defined in packages/pdf/src/content-edit/types.ts:107
ImagePageSizetype#
type ImagePageSize = 'image' | 'a4' | 'letter' | { width: number; height: number };Defined in packages/pdf/src/tools/images.ts:27
KeyUsagetype#
type KeyUsage =
| 'digitalSignature'
| 'nonRepudiation'
| 'keyEncipherment'
| 'dataEncipherment'
| 'keyAgreement'
| 'keyCertSign'
| 'cRLSign'
| 'encipherOnly'
| 'decipherOnly';Defined in packages/pdf/src/signatures/x509.ts:81
LineEndingtype#
type LineEnding = 'none' | 'openArrow' | 'closedArrow' | 'circle' | 'square' | 'diamond' | 'butt';Defined in packages/pdf/src/annotations/types.ts:33
LinkActiontype#
type LinkAction =
| { kind: 'uri'; uri: string }
| ({ kind: 'goto' } & LinkDestination)
| { kind: 'named'; name: string }
| { kind: 'other'; actionType: string; name?: string };Defined in packages/pdf/src/annotations/types.ts:98
LinkFittype#
type LinkFit = 'page' | 'width' | 'height' | 'box' | 'boxWidth' | 'boxHeight' | 'point' | 'rect';Defined in packages/pdf/src/annotations/types.ts:86
LinkHighlightModetype#
type LinkHighlightMode = 'none' | 'invert' | 'outline' | 'push';Defined in packages/pdf/src/annotations/types.ts:104
MailFormattype#
type MailFormat = 'msg' | 'eml';Defined in packages/pdf/src/formats/mail/types.ts:8
MailPageSizetype#
type MailPageSize = 'a4' | 'letter' | { width: number; height: number };Defined in packages/pdf/src/formats/mail/mail-to-pdf.ts:25
MailPdfWarningCodetype#
type MailPdfWarningCode =
| 'substituted-characters'
| 'remote-image'
| 'missing-image'
| 'unsupported-image'
| 'unsafe-link'
| 'embedded-message-converted';Defined in packages/pdf/src/formats/mail/mail-to-pdf.ts:58
Measurabletype#
type Measurable = Pick<PdfAnnotation, 'type' | 'line' | 'vertices' | 'measureScale'> &
Partial<Pick<PdfAnnotation, 'label' | 'rect'>>;Defined in packages/pdf/src/annotations/geometry.ts:543
MeasurementTypetype#
type MeasurementType = 'distance' | 'perimeter' | 'area' | 'count' | 'arc' | 'angle';Defined in packages/pdf/src/annotations/types.ts:14
MediaAnnotationTypetype#
type MediaAnnotationType = 'fileAttachment' | 'sound' | 'movie' | 'screen' | 'richMedia' | 'media3d';Defined in packages/pdf/src/annotations/types.ts:16
NoteIcontype#
type NoteIcon = 'comment' | 'note' | 'key' | 'help' | 'paragraph' | 'insert';Defined in packages/pdf/src/annotations/types.ts:38
ObjectOrdertype#
type ObjectOrder = 'front' | 'forward' | 'backward' | 'back';Defined in packages/pdf/src/content-edit/types.ts:89
OcrPageStatetype#
type OcrPageState = 'running' | 'recognized' | 'failed' | 'no-text';Defined in packages/pdf/src/viewer/types.ts:379
OfficeBlocktype#
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 };Defined in packages/pdf/src/tools/export-office.ts:11
OptimizePresettype#
type OptimizePreset = 'lossless' | 'balanced' | 'smallest';Defined in packages/pdf/src/viewer/types.ts:419
PadesLeveltype#
type PadesLevel = 'B-B' | 'B-T' | 'B-LT' | 'B-LTA' | 'not-pades';Defined in packages/pdf/src/signatures/verify.ts:72
PageAnchortype#
type PageAnchor =
| 'center'
| 'top-left'
| 'top-center'
| 'top-right'
| 'center-left'
| 'center-right'
| 'bottom-left'
| 'bottom-center'
| 'bottom-right';Defined in packages/pdf/src/tools/page-boxes.ts:14
PageBoxesPatchtype#
type PageBoxesPatch = { media?: PdfRect } & Partial<Record<Exclude<PageBoxKey, 'media'>, PdfRect | null>>;Defined in packages/pdf/src/tools/page-boxes.ts:160
PageBoxKeytype#
type PageBoxKey = keyof PageBoxes;Defined in packages/pdf/src/tools/page-boxes.ts:158
PageCommandIdtype#
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';Defined in packages/pdf/src/viewer/keyboard.ts:3
PageComparisonStatustype#
type PageComparisonStatus = 'unchanged' | 'changed' | 'added' | 'removed' | 'moved';Defined in packages/pdf/src/compare/types.ts:3
PageImageFormattype#
type PageImageFormat = 'raw' | 'jpeg' | 'jpeg2000' | 'jbig2' | 'ccitt' | 'unknown';Defined in packages/pdf/src/content-edit/types.ts:42
PageLabelStyletype#
type PageLabelStyle = 'decimal' | 'roman-upper' | 'roman-lower' | 'alpha-upper' | 'alpha-lower' | 'none';Defined in packages/pdf/src/tools/page-labels.ts:6
PageLayerKindtype#
type PageLayerKind = 'watermark' | 'header' | 'footer' | 'background' | 'pageNumbers' | 'bates';Defined in packages/pdf/src/tools/page-layers.ts:9
PageMarkKindtype#
type PageMarkKind = 'tick' | 'cross' | 'dot' | 'circle';Defined in packages/pdf/src/content-edit/add-content.ts:199
PageNumberPositiontype#
type PageNumberPosition =
'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';Defined in packages/pdf/src/document/session-page-tools.ts:17
PageObjectKindtype#
type PageObjectKind = 'text' | 'image' | 'path' | 'form' | 'shading' | 'inlineImage';Defined in packages/pdf/src/content-edit/types.ts:68
PageObjectLayertype#
type PageObjectLayer = 'watermark' | 'header' | 'footer' | 'background' | 'pageNumbers' | 'bates';Defined in packages/pdf/src/content-edit/types.ts:70
PagesChangeReasontype#
type PagesChangeReason =
'move' | 'rotate' | 'delete' | 'insert' | 'merge' | 'history' | 'redaction' | 'crop' | 'content';Defined in packages/pdf/src/document/session-types.ts:34
PageSelectortype#
type PageSelector = 'all' | 'odd' | 'even' | string;Defined in packages/pdf/src/tools/split.ts:42
PageSourceKindtype#
type PageSourceKind = 'original' | 'merged' | 'blank';Defined in packages/pdf/src/document/session-types.ts:20
PageSyncOperationKindtype#
type PageSyncOperationKind = 'insert' | 'move' | 'rotate' | 'delete';Defined in packages/pdf/src/annotations/sync-pages.ts:3
PageTextDirectiontype#
type PageTextDirection = 'ltr' | 'rtl' | 'ttb';Defined in packages/pdf/src/content/structured-text.ts:13
PageTextOptionstype#
type PageTextOptions = Omit<StructuredTextOptions, 'exclude'>;Defined in packages/pdf/src/document/session-types.ts:178
PageTextOrdertype#
type PageTextOrder = 'reading' | 'content';Defined in packages/pdf/src/content/structured-text.ts:15
PdfARuletype#
type PdfARule =
| 'header'
| 'encryption'
| 'file-id'
| 'stream'
| 'output-intent'
| 'device-colour'
| 'transparency'
| 'image'
| 'content'
| 'xobject'
| 'fonts'
| 'annotations'
| 'actions'
| 'metadata'
| 'forms'
| 'embedded-files';Defined in packages/pdf/src/tools/pdfa-validate.ts:8
PdfBytestype#
type PdfBytes = Uint8Array<ArrayBuffer>;Defined in packages/pdf/src/pdf/bytes.ts:1
PdfCertificationPermissiontype#
type PdfCertificationPermission = 'no-changes' | 'form-filling' | 'annotations-and-forms';Defined in packages/pdf/src/signatures/fields.ts:79
PdfCollectionFieldTypetype#
type PdfCollectionFieldType =
'text' | 'date' | 'number' | 'fileName' | 'description' | 'modified' | 'created' | 'size' | 'compressedSize';Defined in packages/pdf/src/tools/attachments.ts:44
PdfCollectionValuetype#
type PdfCollectionValue = string | number | Date;Defined in packages/pdf/src/tools/attachments.ts:47
PdfCollectionViewtype#
type PdfCollectionView = 'details' | 'tile' | 'hidden';Defined in packages/pdf/src/tools/attachments.ts:42
PdfFieldLocktype#
type PdfFieldLock = 'all' | { include: string[] } | { exclude: string[] };Defined in packages/pdf/src/signatures/sign.ts:71
PdfFieldTypetype#
type PdfFieldType = FormFieldType | 'barcode';Defined in packages/pdf/src/forms/types.ts:7
PdfFileConvertertype#
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.
Defined in packages/pdf/src/viewer/types.ts:447
PdfFontFallbacktype#
type PdfFontFallback = (
script: TextScript,
characters: string,
) => Uint8Array | PdfFontSource | undefined | Promise<Uint8Array | PdfFontSource | undefined>;Defined in packages/pdf/src/fonts/fallback.ts:4
PdfInitialPageLayouttype#
type PdfInitialPageLayout =
'single' | 'continuous' | 'two-column' | 'two-column-cover' | 'two-page' | 'two-page-cover';Defined in packages/pdf/src/tools/initial-view.ts:7
PdfInitialPageModetype#
type PdfInitialPageMode = 'none' | 'outlines' | 'thumbnails' | 'fullscreen' | 'layers' | 'attachments';Defined in packages/pdf/src/tools/initial-view.ts:5
PdfLimitNametype#
type PdfLimitName = keyof PdfLimits;Defined in packages/pdf/src/pdf/limits.ts:14
PdfPermissionNametype#
type PdfPermissionName = keyof PdfPermissions | 'changeSecurity';Defined in packages/pdf/src/document/permissions.ts:3
PdfProgressiveSourcetype#
type PdfProgressiveSource = PdfUrlSource | PdfRangeSource;Defined in packages/pdf/src/viewer/types.ts:145
PdfQuadtype#
type PdfQuad = [bottomLeft: PdfPoint, bottomRight: PdfPoint, topRight: PdfPoint, topLeft: PdfPoint];Defined in packages/pdf/src/content/structured-text.ts:11
PdfRecttype#
type PdfRect = [x1: number, y1: number, x2: number, y2: number];Defined in packages/pdf/src/annotations/types.ts:8
PdfRendererSourcetype#
type PdfRendererSource = PdfRenderer | (() => PdfRenderer | Promise<PdfRenderer>);Defined in packages/pdf/src/viewer/renderer.ts:168
PdfSegmenttype#
type PdfSegment = [x1: number, y1: number, x2: number, y2: number];Defined in packages/pdf/src/content/geometry.ts:11
PdfSignatureSubFiltertype#
type PdfSignatureSubFilter = 'adbe.pkcs7.detached' | 'ETSI.CAdES.detached';Defined in packages/pdf/src/signatures/sign.ts:46
PdfSignatureSummarytype#
type PdfSignatureSummary =
'trusted' | 'valid-untrusted' | 'changed-after-signing' | 'revoked' | 'invalid' | 'unsupported';Defined in packages/pdf/src/signatures/verify.ts:137
PdfSourcetype#
type PdfSource = Uint8Array | ArrayBuffer | Blob;Defined in packages/pdf/src/viewer/types.ts:127
PdfViewerLabelstype#
type PdfViewerLabels = Record<LabelKey, string> & { tools: Record<ViewerTool, string> };Defined in packages/pdf/src/viewer/types.ts:340
PdfWorkerSourcetype#
type PdfWorkerSource = boolean | Worker | (() => Worker);Defined in packages/pdf/src/viewer/renderer.ts:170
Pkcs12ErrorReasontype#
type Pkcs12ErrorReason = 'password-incorrect' | 'unsupported' | 'malformed';Defined in packages/pdf/src/signatures/pkcs12.ts:20
PresenceMessagetype#
type PresenceMessage =
{ type: 'presence'; state: PresenceState; sentAt: number } | { type: 'leave'; actorId: string; sentAt: number };Defined in packages/pdf/src/annotations/sync.ts:589
PrintModetype#
type PrintMode = 'auto' | 'vector' | 'raster';Defined in packages/pdf/src/viewer/print-vector.ts:3
PrintScaletype#
type PrintScale = 'actual' | 'fit' | number;Defined in packages/pdf/src/viewer/print.ts:18
RecognizeTextCallbacktype#
type RecognizeTextCallback = (image: OcrPageImage) => OcrWord[] | Promise<OcrWord[]>;Defined in packages/pdf/src/content-edit/text-layer.ts:36
RedactionImageDecodertype#
type RedactionImageDecoder = (image: PageRedactionImage) => DecodedRedactionImage | undefined;Defined in packages/pdf/src/document/session-types.ts:164
RedactionImageRemovalReasontype#
type RedactionImageRemovalReason = 'covered' | 'undecodable' | 'mask-undecodable' | 'inline-image';Defined in packages/pdf/src/redaction/images.ts:30
RedactionPatterntype#
type RedactionPattern = RedactionPatternName;Defined in packages/pdf/src/content/text.ts:437
RedactionPatternNametype#
type RedactionPatternName = keyof typeof REDACTION_PATTERNS;Defined in packages/pdf/src/content/text.ts:435
RedactionQuerytype#
type RedactionQuery =
| string
| RegExp
| { text: string; matchCase?: boolean; wholeWord?: boolean }
| { pattern: RegExp }
| { preset: RedactionPatternName };Defined in packages/pdf/src/content/text.ts:441
RendererFetchDocumenttype#
type RendererFetchDocument = (request: RendererFetchRequest) => Promise<RendererFetchReply>;Defined in packages/pdf/src/viewer/renderer.ts:145
ReplyInputtype#
type ReplyInput = string | (Partial<AnnotationReply> & { contents: string });Defined in packages/pdf/src/document/input-checks.ts:129
ReviewStatustype#
type ReviewStatus = 'none' | 'accepted' | 'rejected' | 'cancelled' | 'completed';Defined in packages/pdf/src/annotations/types.ts:44
RevisionChangeKindtype#
type RevisionChangeKind =
'form' | 'annotation' | 'signature' | 'timestamp' | 'dss' | 'appearance' | 'metadata' | 'other';Defined in packages/pdf/src/signatures/revisions.ts:18
RevocationCallbacktype#
type RevocationCallback = (
certificate: PdfCertificateInfo,
issuer: PdfCertificateInfo,
) => RevocationAnswer | Promise<RevocationAnswer>;Defined in packages/pdf/src/signatures/verify.ts:54
RevocationStatustype#
type RevocationStatus = 'good' | 'revoked' | 'unknown' | 'not-checked';Defined in packages/pdf/src/signatures/revocation.ts:23
RichTextAligntype#
type RichTextAlign = 'left' | 'center' | 'right';Defined in packages/pdf/src/annotations/types.ts:68
SaveModetype#
type SaveMode = 'auto' | 'incremental' | 'full';Defined in packages/pdf/src/document/session-types.ts:133
ScrollModetype#
type ScrollMode = 'vertical' | 'horizontal' | 'page';Defined in packages/pdf/src/viewer/layout.ts:9
ShapeTypetype#
type ShapeType = 'rectangle' | 'ellipse' | 'line' | 'arrow' | 'polygon' | 'polyline';Defined in packages/pdf/src/annotations/types.ts:12
ShortcutOverridestype#
type ShortcutOverrides = Partial<Record<ViewerCommand, string | string[] | false>>;Defined in packages/pdf/src/viewer/keyboard.ts:250
SidebarPaneltype#
type SidebarPanel =
| 'thumbnails'
| 'outline'
| 'annotations'
| 'fields'
| 'search'
| 'redaction'
| 'attachments'
| 'signatures'
| 'layers'
| 'objects';Defined in packages/pdf/src/viewer/types.ts:275
SignDigestCallbacktype#
type SignDigestCallback = (digest: PdfBytes, info: SignDigestInfo) => Promise<Uint8Array> | Uint8Array;Defined in packages/pdf/src/signatures/signer.ts:16
SimpleCalculationtype#
type SimpleCalculation =
{ op: 'sum' | 'product' | 'average' | 'min' | 'max'; fields: string[] } | { expression: string };Defined in packages/pdf/src/forms/types.ts:290
SplitOptionstype#
type SplitOptions =
| { ranges: string | readonly (readonly [number, number])[] }
| { every: number }
| { byBookmark: { level?: number } }
| { maxBytes: number }
| { byBlankPages: true };Defined in packages/pdf/src/tools/split.ts:6
SpreadModetype#
type SpreadMode = 'none' | 'odd' | 'even';Defined in packages/pdf/src/viewer/layout.ts:7
StampPositiontype#
type StampPosition = PageAnchor | { x: number; y: number };Defined in packages/pdf/src/tools/stamping.ts:14
StandardFonttype#
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';Defined in packages/pdf/src/annotations/text-metrics.ts:68
StandardFontNametype#
type StandardFontName =
| 'Helvetica'
| 'Helvetica-Bold'
| 'Helvetica-Oblique'
| 'Helvetica-BoldOblique'
| 'Times-Roman'
| 'Times-Bold'
| 'Times-Italic'
| 'Times-BoldItalic'
| 'Courier'
| 'Courier-Bold'
| 'Courier-Oblique'
| 'Courier-BoldOblique';Defined in packages/pdf/src/content-edit/types.ts:128
SubmitFormattype#
type SubmitFormat = 'fdf' | 'xfdf' | 'html' | 'pdf';Defined in packages/pdf/src/forms/types.ts:212
SyncChannelNametype#
type SyncChannelName = SyncMessage['channel'];Defined in packages/pdf/src/viewer/collaboration-channel.ts:12
SyncJsontype#
type SyncJson = string | number | boolean | null | SyncJson[] | { [key: string]: SyncJson };Defined in packages/pdf/src/annotations/sync.ts:12
SyncMessagetype#
type SyncMessage =
| { channel: 'annotations'; operations: SyncOperation[] }
| { channel: 'forms'; operations: FormSyncOperation[] }
| { channel: 'pages'; operations: PageSyncOperation[] }
| { channel: 'presence'; message: PresenceMessage };Defined in packages/pdf/src/viewer/collaboration-channel.ts:6
SyncOperationKindtype#
type SyncOperationKind = 'add' | 'update' | 'remove' | 'reply-add' | 'reply-update' | 'reply-remove';Defined in packages/pdf/src/annotations/sync.ts:5
TabOrderModetype#
type TabOrderMode = 'row' | 'column' | 'structure' | 'manual' | 'unspecified';Defined in packages/pdf/src/forms/types.ts:27
TextChangeTypetype#
type TextChangeType = 'inserted' | 'deleted' | 'moved';Defined in packages/pdf/src/compare/types.ts:5
TextLayerRotationtype#
type TextLayerRotation = 0 | 90 | 180 | 270;Defined in packages/pdf/src/content-edit/text-layer.ts:12
TextMarkupTypetype#
type TextMarkupType = 'highlight' | 'underline' | 'strikeout' | 'squiggly';Defined in packages/pdf/src/annotations/types.ts:10
TimestampCallbacktype#
type TimestampCallback = (data: Uint8Array, info: TimestampRequestInfo) => Promise<Uint8Array> | Uint8Array;Defined in packages/pdf/src/signatures/sign.ts:44
ToolbarItemtype#
type ToolbarItem = ToolbarItemName | CustomToolbarItem;Defined in packages/pdf/src/viewer/types.ts:252
ToolbarItemNametype#
type ToolbarItemName =
| 'sidebar'
| 'pageNavigation'
| 'zoom'
| 'rotate'
| 'view'
| 'pointer'
| 'search'
| 'tools'
| 'undoRedo'
| 'print'
| 'download'
| 'theme'
| 'menu'
| 'separator'
| 'spacer';Defined in packages/pdf/src/viewer/types.ts:254
ToolbarPresettype#
type ToolbarPreset = 'viewer' | 'reviewer' | 'editor' | 'form-filler' | 'full';Defined in packages/pdf/src/viewer/types.ts:203
ToolbarTabtype#
type ToolbarTab = 'view' | 'comment' | 'edit' | 'pages' | 'forms' | 'protect' | 'tools';Defined in packages/pdf/src/viewer/types.ts:271
ToolGrouptype#
type ToolGroup = ToolbarTab | 'annotate' | 'shapes' | 'insert' | 'measure' | 'redact' | 'content';Defined in packages/pdf/src/viewer/types.ts:273
ValidationDataCallbacktype#
type ValidationDataCallback = (
request: ValidationDataRequest,
) => ValidationDataResponse | undefined | Promise<ValidationDataResponse | undefined>;Defined in packages/pdf/src/signatures/dss.ts:93
ViewerCommandtype#
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';Defined in packages/pdf/src/viewer/keyboard.ts:76
ViewerOcrEnginetype#
type ViewerOcrEngine = Pick<OcrEngine, 'recognizePage'>;Defined in packages/pdf/src/viewer/types.ts:389
ViewerTooltype#
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';Defined in packages/pdf/src/viewer/types.ts:158
ZoomValuetype#
type ZoomValue = number | 'fit-width' | 'fit-page' | 'auto';Defined in packages/pdf/src/viewer/types.ts:310
@birchui/pdf/engine#
addDocumentTimestampfunction#
function addDocumentTimestamp(data: Uint8Array | ArrayBuffer, options: AddDocumentTimestampOptions): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
options | AddDocumentTimestampOptions | — |
Defined in packages/pdf/src/signatures/document-timestamp.ts:24
addValidationDatafunction#
function addValidationData(data: Uint8Array | ArrayBuffer, options: AddValidationDataOptions = {}): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | AddValidationDataOptions | — |
Defined in packages/pdf/src/signatures/dss.ts:262
analyzeLayoutfunction#
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 | — |
optionsoptional | OfficeExportOptions | — |
Defined in packages/pdf/src/tools/export-office.ts:170
angleBetweenfunction#
function angleBetween(a: PdfPoint, vertex: PdfPoint, b: PdfPoint): numberDefined in packages/pdf/src/annotations/geometry.ts:332
annotationBoundsfunction#
function annotationBounds(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>): PdfRect| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'rect' | 'rotation'> | — |
Defined in packages/pdf/src/annotations/rotation.ts:100
annotationCornersfunction#
function annotationCorners(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>): PdfPoint[]| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'rect' | 'rotation'> | — |
Defined in packages/pdf/src/annotations/rotation.ts:96
annotationFlagsfunction#
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' > | — |
extraoptional | unknown | — |
Defined in packages/pdf/src/annotations/pdf-annotations.ts:137
annotationInputFromPresetfunction#
function annotationInputFromPreset(preset: AnnotationPreset, placement: Partial<Omit<AnnotationInput, 'type'>> & { pageIndex: number }): AnnotationInput| Parameter | Type | Description |
|---|---|---|
preset | AnnotationPreset | — |
placement | Partial<Omit<AnnotationInput, 'type'>> & { pageIndex: number } | — |
Defined in packages/pdf/src/annotations/presets.ts:118
annotationPermissionsfunction#
function annotationPermissions(annotation: PdfAnnotation, user: AnnotationUser | string, options: AnnotationPermissionOptions = {}): AnnotationPermissions| Parameter | Type | Description |
|---|---|---|
annotation | PdfAnnotation | — |
user | AnnotationUser | string | — |
optionsoptional | AnnotationPermissionOptions | — |
Defined in packages/pdf/src/annotations/permissions.ts:36
annotationPresetsFromJsonfunction#
function annotationPresetsFromJson(value: unknown): AnnotationPreset[]| Parameter | Type | Description |
|---|---|---|
value | unknown | — |
Defined in packages/pdf/src/annotations/presets.ts:147
annotationPresetsToJsonfunction#
function annotationPresetsToJson(presets: readonly AnnotationPreset[]): AnnotationPresetsJson| Parameter | Type | Description |
|---|---|---|
presets | readonly AnnotationPreset[] | — |
Defined in packages/pdf/src/annotations/presets.ts:133
annotationRichDefaultsfunction#
function annotationRichDefaults(annotation: Pick<PdfAnnotation, 'fontSize' | 'fontColor' | 'color' | 'fontFamily' | 'textAlign'>): RichTextDefaults| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'fontSize' | 'fontColor' | 'color' | 'fontFamily' | 'textAlign'> | — |
Defined in packages/pdf/src/annotations/rich-text.ts:75
annotationsFromJsonfunction#
function annotationsFromJson(value: unknown): AnnotationInput[]| Parameter | Type | Description |
|---|---|---|
value | unknown | — |
Defined in packages/pdf/src/annotations/xfdf.ts:661
annotationsToFdffunction#
function annotationsToFdf(annotations: readonly PdfAnnotation[], options: AnnotationsFdfOptions = {}): Uint8Array| Parameter | Type | Description |
|---|---|---|
annotations | readonly PdfAnnotation[] | — |
optionsoptional | AnnotationsFdfOptions | — |
Defined in packages/pdf/src/annotations/annotations-fdf.ts:38
annotationsToJsonfunction#
function annotationsToJson(annotations: readonly PdfAnnotation[]): AnnotationsJson| Parameter | Type | Description |
|---|---|---|
annotations | readonly PdfAnnotation[] | — |
Defined in packages/pdf/src/annotations/xfdf.ts:645
annotationsToXfdffunction#
function annotationsToXfdf(annotations: readonly PdfAnnotation[], fields: readonly PdfFormField[] = [], fileName?: string): string| Parameter | Type | Description |
|---|---|---|
annotations | readonly PdfAnnotation[] | — |
fieldsoptional | readonly PdfFormField[] | — |
fileNameoptional | string | — |
Defined in packages/pdf/src/annotations/xfdf.ts:202
arcPointsfunction#
function arcPoints(points: readonly PdfPoint[], segments = 48): PdfPoint[]| Parameter | Type | Description |
|---|---|---|
points | readonly PdfPoint[] | — |
segmentsoptional | unknown | — |
Defined in packages/pdf/src/annotations/geometry.ts:320
arcThroughfunction#
function arcThrough(start: PdfPoint, through: PdfPoint, end: PdfPoint): ArcGeometry | undefinedDefined in packages/pdf/src/annotations/geometry.ts:307
blocksTextfunction#
function blocksText(blocks: readonly OfficeBlock[]): stringThe text of the blocks, one block per line; cells of a table row are separated by tabs.
| Parameter | Type | Description |
|---|---|---|
blocks | readonly OfficeBlock[] | — |
Defined in packages/pdf/src/tools/export-office.ts:250
blocksToDocxfunction#
function blocksToDocx(blocks: readonly OfficeBlock[], options: { title?: string } = {}): PdfBytesWrites the blocks as a Word document: heading styles, bulleted and numbered lists, and bordered tables.
| Parameter | Type | Description |
|---|---|---|
blocks | readonly OfficeBlock[] | — |
optionsoptional | { title?: string } | — |
Defined in packages/pdf/src/tools/export-office.ts:320
bookletOrderfunction#
function bookletOrder(pageCount: number, isRightToLeft = false): number[][]| Parameter | Type | Description |
|---|---|---|
pageCount | number | — |
isRightToLeftoptional | unknown | — |
Defined in packages/pdf/src/tools/impose.ts:33
buildCompareReportfunction#
function buildCompareReport(comparison: PdfComparison, options: CompareReportOptions = {}): string| Parameter | Type | Description |
|---|---|---|
comparison | PdfComparison | — |
optionsoptional | CompareReportOptions | — |
Defined in packages/pdf/src/compare/report.ts:69
buildSrgbProfilefunction#
function buildSrgbProfile(): Uint8ArrayDefined in packages/pdf/src/tools/pdfa.ts:63
canonicalFontNamefunction#
function canonicalFontName(baseFont: string): string| Parameter | Type | Description |
|---|---|---|
baseFont | string | — |
Defined in packages/pdf/src/tools/pdfa-fonts.ts:24
certificateToDerfunction#
function certificateToDer(input: Uint8Array | string): Uint8Array| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | string | — |
Defined in packages/pdf/src/signatures/pem.ts:59
checkArchiveReadinessfunction#
function checkArchiveReadiness(input: Uint8Array | ArrayBuffer | ArchiveSource): ArchiveReport| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | ArchiveSource | — |
Defined in packages/pdf/src/tools/archive-check.ts:258
checkChainConstraintsfunction#
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 | — |
Defined in packages/pdf/src/signatures/x509.ts:437
checkFieldValuefunction#
function checkFieldValue(field: ValidatedField, value: FormValue, resolve?: FieldValueResolver): FieldIssue | undefined| Parameter | Type | Description |
|---|---|---|
field | ValidatedField | — |
value | FormValue | — |
resolveoptional | FieldValueResolver | — |
Defined in packages/pdf/src/forms/scripts.ts:341
circleThroughfunction#
function circleThrough(a: PdfPoint, b: PdfPoint, c: PdfPoint): { center: PdfPoint; radius: number } | undefinedDefined in packages/pdf/src/annotations/geometry.ts:285
classifyScriptfunction#
function classifyScript(trigger: FieldScriptTrigger, source: string | undefined): FieldScriptInfo| Parameter | Type | Description |
|---|---|---|
trigger | FieldScriptTrigger | — |
source | string | undefined | — |
Defined in packages/pdf/src/forms/scripts.ts:515
comparePageTextsfunction#
function comparePageTexts(textsA: readonly ComparablePageText[], textsB: readonly ComparablePageText[], options: ComparePdfOptions = {}): PdfComparison| Parameter | Type | Description |
|---|---|---|
textsA | readonly ComparablePageText[] | — |
textsB | readonly ComparablePageText[] | — |
optionsoptional | ComparePdfOptions | — |
Defined in packages/pdf/src/compare/compare.ts:275
comparePdffunction#
function comparePdf(a: CompareInput, b: CompareInput, options: ComparePdfOptions = {}): PdfComparison| Parameter | Type | Description |
|---|---|---|
a | CompareInput | — |
b | CompareInput | — |
optionsoptional | ComparePdfOptions | — |
Defined in packages/pdf/src/compare/compare.ts:339
comparePdfAsyncfunction#
function comparePdfAsync(a: CompareInput, b: CompareInput, options: ComparePdfAsyncOptions = {}): Promise<PdfComparison>| Parameter | Type | Description |
|---|---|---|
a | CompareInput | — |
b | CompareInput | — |
optionsoptional | ComparePdfAsyncOptions | — |
Defined in packages/pdf/src/compare/compare.ts:343
compareSyncClocksfunction#
function compareSyncClocks(a: SyncClock, b: SyncClock): numberDefined in packages/pdf/src/annotations/sync.ts:117
comparisonAnnotationsfunction#
function comparisonAnnotations(changes: readonly PdfTextChange[], options: Pick<ComparePdfOptions, 'colors' | 'author'> = {}): { a: AnnotationInput[]; b: AnnotationInput[] }| Parameter | Type | Description |
|---|---|---|
changes | readonly PdfTextChange[] | — |
optionsoptional | Pick<ComparePdfOptions, 'colors' | 'author'> | — |
Defined in packages/pdf/src/compare/compare.ts:213
convertMailFilefunction#
function convertMailFile(bytes: Uint8Array, hint: MailFileHint = {}, options: MailToPdfOptions = {}): Promise<MailConversion>| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
hintoptional | MailFileHint | — |
optionsoptional | MailToPdfOptions | — |
Defined in packages/pdf/src/formats/mail/convert.ts:18
convertToPdfAfunction#
function convertToPdfA(data: Uint8Array | ArrayBuffer, options: PdfAConversionOptions = {}): Promise<PdfAConversionResult>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | PdfAConversionOptions | — |
Defined in packages/pdf/src/tools/pdfa.ts:208
createAnnotationSyncfunction#
function createAnnotationSync(host: AnnotationSyncHost, options: AnnotationSyncOptions): AnnotationSync| Parameter | Type | Description |
|---|---|---|
host | AnnotationSyncHost | — |
options | AnnotationSyncOptions | — |
Defined in packages/pdf/src/annotations/sync.ts:271
createFontRegistryfunction#
function createFontRegistry(fonts: readonly PdfFontSource[] = []): FontRegistry| Parameter | Type | Description |
|---|---|---|
fontsoptional | readonly PdfFontSource[] | — |
Defined in packages/pdf/src/fonts/registry.ts:429
createFormSyncfunction#
function createFormSync(host: FormSyncHost, options: FormSyncOptions): FormSync| Parameter | Type | Description |
|---|---|---|
host | FormSyncHost | — |
options | FormSyncOptions | — |
Defined in packages/pdf/src/annotations/sync-forms.ts:68
createPageSyncfunction#
function createPageSync(host: PageSyncHost, options: PageSyncOptions): PageSync| Parameter | Type | Description |
|---|---|---|
host | PageSyncHost | — |
options | PageSyncOptions | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:208
createPresenceTrackerfunction#
function createPresenceTracker(options: { actorId?: string; timeout?: number; onChange?: (states: PresenceState[]) => void; now?: () => number; } = {}): PresenceTracker| Parameter | Type | Description |
|---|---|---|
optionsoptional | { actorId?: string; timeout?: number; onChange?: (states: PresenceState[]) => void; now?: () => number; } | — |
Defined in packages/pdf/src/annotations/sync.ts:612
createZipfunction#
function createZip(entries: readonly ZipEntry[]): PdfBytes| Parameter | Type | Description |
|---|---|---|
entries | readonly ZipEntry[] | — |
Defined in packages/pdf/src/tools/zip.ts:57
decodeImageFilefunction#
function decodeImageFile(bytes: Uint8Array, options: PrepareImageOptions = {}): Promise<DecodedImage>| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
optionsoptional | PrepareImageOptions | — |
Defined in packages/pdf/src/formats/image/prepare.ts:36
decodeJpegfunction#
function decodeJpeg(bytes: Uint8Array, options: JpegDecodeOptions = {}): JpegImage| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
optionsoptional | JpegDecodeOptions | — |
Defined in packages/pdf/src/pdf/jpeg.ts:587
decompressRtffunction#
function decompressRtf(data: Uint8Array, options: DecompressRtfOptions = {}): Uint8Array| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | — |
optionsoptional | DecompressRtfOptions | — |
Defined in packages/pdf/src/formats/mail/rtf.ts:38
decryptPdffunction#
function decryptPdf(data: Uint8Array | ArrayBuffer, password?: string): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
passwordoptional | string | — |
Defined in packages/pdf/src/document/headless.ts:380
derToPemfunction#
function derToPem(der: Uint8Array, label: string): string| Parameter | Type | Description |
|---|---|---|
der | Uint8Array | — |
label | string | — |
Defined in packages/pdf/src/signatures/pem.ts:19
describeLinkActionfunction#
function describeLinkAction(action: LinkAction | undefined): string| Parameter | Type | Description |
|---|---|---|
action | LinkAction | undefined | — |
Defined in packages/pdf/src/annotations/links.ts:295
describeScriptsfunction#
function describeScripts(field: Pick<PdfFormField, 'format' | 'calculation' | 'range' | 'scripts'>): FieldScriptReport| Parameter | Type | Description |
|---|---|---|
field | Pick<PdfFormField, 'format' | 'calculation' | 'range' | 'scripts'> | — |
Defined in packages/pdf/src/forms/scripts.ts:530
detectFieldsfunction#
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 | — |
optionsoptional | DetectFieldsOptions | — |
Defined in packages/pdf/src/forms/detect.ts:229
detectImageFormatfunction#
function detectImageFormat(bytes: Uint8Array): ImageFileFormat | undefined| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
Defined in packages/pdf/src/formats/image/detect.ts:25
detectMailFormatfunction#
function detectMailFormat(bytes: Uint8Array, hint: MailFileHint = {}): MailFormat | undefined| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
hintoptional | MailFileHint | — |
Defined in packages/pdf/src/formats/mail/detect.ts:19
embedMissingFontsfunction#
function embedMissingFonts(editor: PdfEditor, fonts: Readonly<Record<string, Uint8Array>> = {}): PdfAFontReplacement[]| Parameter | Type | Description |
|---|---|---|
editor | PdfEditor | — |
fontsoptional | Readonly<Record<string, Uint8Array>> | — |
Defined in packages/pdf/src/tools/pdfa-fonts.ts:217
encryptPdffunction#
function encryptPdf(data: Uint8Array | ArrayBuffer, options: EncryptOptions & { password?: string }): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
options | EncryptOptions & { password?: string } | — |
Defined in packages/pdf/src/document/headless.ts:370
fieldKindfunction#
function fieldKind(field: Pick<PdfFormField, 'type' | 'barcode'>): PdfFieldType| Parameter | Type | Description |
|---|---|---|
field | Pick<PdfFormField, 'type' | 'barcode'> | — |
Defined in packages/pdf/src/forms/form-tools.ts:373
filterFieldKeystrokefunction#
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 | — |
selEndoptional | number | — |
Defined in packages/pdf/src/forms/keystroke.ts:76
formatBatesNumberfunction#
function formatBatesNumber(index: number, options: BatesOptions = {}): string| Parameter | Type | Description |
|---|---|---|
index | number | — |
optionsoptional | BatesOptions | — |
Defined in packages/pdf/src/tools/stamping.ts:394
formatFieldValuefunction#
function formatFieldValue(field: Pick<PdfFormField, 'format' | 'value'> & { scripts?: FieldScripts }, value: FormValue = field.value): string| Parameter | Type | Description |
|---|---|---|
field | Pick<PdfFormField, 'format' | 'value'> & { scripts?: FieldScripts } | — |
valueoptional | FormValue | — |
Defined in packages/pdf/src/forms/scripts.ts:208
formatFormMessagefunction#
function formatFormMessage(key: FormMessageKey, params: FormMessageParams = {}, messages: Partial<Record<FormMessageKey, string>> = {}): string| Parameter | Type | Description |
|---|---|---|
key | FormMessageKey | — |
paramsoptional | FormMessageParams | — |
messagesoptional | Partial<Record<FormMessageKey, string>> | — |
Defined in packages/pdf/src/forms/form-messages.ts:32
formatMeasurementfunction#
function formatMeasurement(annotation: Measurable): string| Parameter | Type | Description |
|---|---|---|
annotation | Measurable | — |
Defined in packages/pdf/src/annotations/geometry.ts:647
formSyncHostfunction#
function formSyncHost(document: SyncableDocument): FormSyncHost| Parameter | Type | Description |
|---|---|---|
document | SyncableDocument | — |
Defined in packages/pdf/src/annotations/sync-hosts.ts:18
fromSyncJsonfunction#
function fromSyncJson(value: SyncJson): unknown| Parameter | Type | Description |
|---|---|---|
value | SyncJson | — |
Defined in packages/pdf/src/annotations/sync.ts:149
getDefaultPdfLimitsfunction#
function getDefaultPdfLimits(): PdfLimitsDefined in packages/pdf/src/pdf/limits.ts:62
hitTestAnnotationfunction#
function hitTestAnnotation(annotation: PdfAnnotation, point: PdfPoint, tolerance = 4): boolean| Parameter | Type | Description |
|---|---|---|
annotation | PdfAnnotation | — |
point | PdfPoint | — |
toleranceoptional | unknown | — |
Defined in packages/pdf/src/annotations/geometry.ts:361
hitTestRotatedfunction#
function hitTestRotated(annotation: PdfAnnotation, p: PdfPoint, tolerance = 4): boolean| Parameter | Type | Description |
|---|---|---|
annotation | PdfAnnotation | — |
p | PdfPoint | — |
toleranceoptional | unknown | — |
Defined in packages/pdf/src/annotations/rotation.ts:109
imageMimeTypefunction#
function imageMimeType(format: ImageFileFormat): string| Parameter | Type | Description |
|---|---|---|
format | ImageFileFormat | — |
Defined in packages/pdf/src/formats/image/detect.ts:38
imagesToPdffunction#
function imagesToPdf(images: readonly (Uint8Array | ImagePageInput)[], options: ImagesToPdfOptions = {}): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
images | readonly (Uint8Array | ImagePageInput)[] | — |
optionsoptional | ImagesToPdfOptions | — |
Defined in packages/pdf/src/tools/images.ts:78
importPkcs12PrivateKeyfunction#
function importPkcs12PrivateKey(contents: Pkcs12Contents, hash: 'SHA-256' | 'SHA-384' | 'SHA-512' = 'SHA-256'): Promise<CryptoKey>| Parameter | Type | Description |
|---|---|---|
contents | Pkcs12Contents | — |
hashoptional | 'SHA-256' | 'SHA-384' | 'SHA-512' | — |
Defined in packages/pdf/src/signatures/pkcs12.ts:459
imposePdffunction#
function imposePdf(data: Uint8Array | ArrayBuffer, options: ImposeOptions): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
options | ImposeOptions | — |
Defined in packages/pdf/src/tools/impose.ts:81
isAnnotationOwnerfunction#
function isAnnotationOwner(annotation: Pick<PdfAnnotation, 'author' | 'customData'>, user: AnnotationUser | string): boolean| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'author' | 'customData'> | — |
user | AnnotationUser | string | — |
Defined in packages/pdf/src/annotations/permissions.ts:26
isMediaTypefunction#
function isMediaType(type: AnnotationType): type is MediaAnnotationType| Parameter | Type | Description |
|---|---|---|
type | AnnotationType | — |
Defined in packages/pdf/src/annotations/media.ts:39
isReadOnlyTypefunction#
function isReadOnlyType(type: AnnotationType): boolean| Parameter | Type | Description |
|---|---|---|
type | AnnotationType | — |
Defined in packages/pdf/src/annotations/media.ts:35
isSafeLinkUrifunction#
function isSafeLinkUri(uri: string | undefined | null): boolean| Parameter | Type | Description |
|---|---|---|
uri | string | undefined | null | — |
Defined in packages/pdf/src/annotations/links.ts:39
isTrustListExpiredfunction#
function isTrustListExpired(list: PdfTrustList, now: Date = new Date()): boolean| Parameter | Type | Description |
|---|---|---|
list | PdfTrustList | — |
nowoptional | Date | — |
Defined in packages/pdf/src/signatures/trust-list.ts:64
isUniformRichTextfunction#
function isUniformRichText(paragraphs: readonly RichTextParagraph[]): boolean| Parameter | Type | Description |
|---|---|---|
paragraphs | readonly RichTextParagraph[] | — |
Defined in packages/pdf/src/annotations/rich-text.ts:145
layoutRichTextfunction#
function layoutRichText(paragraphs: readonly RichTextParagraph[], maxWidth: number, defaults: RichTextDefaults = RICH_TEXT_DEFAULTS, registry?: FontRegistry): RichTextLine[]| Parameter | Type | Description |
|---|---|---|
paragraphs | readonly RichTextParagraph[] | — |
maxWidth | number | — |
defaultsoptional | RichTextDefaults | — |
registryoptional | FontRegistry | — |
Defined in packages/pdf/src/annotations/rich-text.ts:504
leaveMessagefunction#
function leaveMessage(actorId: string, sentAt: number = Date.now()): PresenceMessage| Parameter | Type | Description |
|---|---|---|
actorId | string | — |
sentAtoptional | number | — |
Defined in packages/pdf/src/annotations/sync.ts:608
linearizePdffunction#
function linearizePdf(data: Uint8Array | ArrayBuffer, options: LinearizeOptions = {}): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | LinearizeOptions | — |
Defined in packages/pdf/src/tools/linearize.ts:332
linkUriSchemefunction#
function linkUriScheme(uri: string): string | undefined| Parameter | Type | Description |
|---|---|---|
uri | string | — |
Defined in packages/pdf/src/annotations/links.ts:34
loadPdfDocumentfunction#
function loadPdfDocument(data: Uint8Array | ArrayBuffer, options: OpenPdfOptions = {}): Promise<PdfDocument>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | OpenPdfOptions | — |
Defined in packages/pdf/src/document/headless.ts:362
loadTrustListfunction#
function loadTrustList(input: PdfTrustListInput | string): PdfTrustListReads 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 | — |
Defined in packages/pdf/src/signatures/trust-list.ts:33
mailToPdffunction#
function mailToPdf(message: MailMessage, options: MailToPdfOptions = {}): Promise<MailPdfResult>| Parameter | Type | Description |
|---|---|---|
message | MailMessage | — |
optionsoptional | MailToPdfOptions | — |
Defined in packages/pdf/src/formats/mail/mail-to-pdf.ts:646
measureDetailsfunction#
function measureDetails(annotation: Measurable): MeasureDetails| Parameter | Type | Description |
|---|---|---|
annotation | Measurable | — |
Defined in packages/pdf/src/annotations/geometry.ts:571
measureValuefunction#
function measureValue(annotation: Measurable): number| Parameter | Type | Description |
|---|---|---|
annotation | Measurable | — |
Defined in packages/pdf/src/annotations/geometry.ts:643
mergeLineRectsfunction#
function mergeLineRects(rects: readonly PdfRect[], gap = 3): PdfRect[]| Parameter | Type | Description |
|---|---|---|
rects | readonly PdfRect[] | — |
gapoptional | unknown | — |
Defined in packages/pdf/src/annotations/geometry.ts:137
mergePdfsfunction#
function mergePdfs(inputs: readonly MergeFileInput[], options: MergePdfsOptions = {}): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
inputs | readonly MergeFileInput[] | — |
optionsoptional | MergePdfsOptions | — |
Defined in packages/pdf/src/tools/merge.ts:30
mimeTypeForFileNamefunction#
function mimeTypeForFileName(fileName: string): string| Parameter | Type | Description |
|---|---|---|
fileName | string | — |
Defined in packages/pdf/src/pdf/file-spec.ts:88
normalizeDegreesfunction#
function normalizeDegrees(degrees: number): number| Parameter | Type | Description |
|---|---|---|
degrees | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:11
normalizeRichTextfunction#
function normalizeRichText(paragraphs: readonly RichTextParagraph[]): RichTextParagraph[]| Parameter | Type | Description |
|---|---|---|
paragraphs | readonly RichTextParagraph[] | — |
Defined in packages/pdf/src/annotations/rich-text.ts:111
openPdfDocumentfunction#
function openPdfDocument(data: Uint8Array | ArrayBuffer, options: OpenPdfOptions = {}): PdfDocument| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | OpenPdfOptions | — |
Defined in packages/pdf/src/document/headless.ts:357
optimizePdffunction#
function optimizePdf(data: Uint8Array | ArrayBuffer, options: OptimizeOptions = {}): Promise<OptimizeResult>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | OptimizeOptions | — |
Defined in packages/pdf/src/tools/optimize.ts:124
originalPageIdfunction#
function originalPageId(sourceIndex: number): string| Parameter | Type | Description |
|---|---|---|
sourceIndex | number | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:108
pageSyncHostfunction#
function pageSyncHost(document: SyncableDocument): PageSyncHost| Parameter | Type | Description |
|---|---|---|
document | SyncableDocument | — |
Defined in packages/pdf/src/annotations/sync-hosts.ts:38
parseAnnotationsFdffunction#
function parseAnnotationsFdf(data: Uint8Array | ArrayBuffer, fallbackAuthor = 'Unknown'): AnnotationsFdfImport| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
fallbackAuthoroptional | unknown | — |
Defined in packages/pdf/src/annotations/annotations-fdf.ts:137
parseCalculateScriptfunction#
function parseCalculateScript(script: string | undefined): FieldCalculation | undefined| Parameter | Type | Description |
|---|---|---|
script | string | undefined | — |
Defined in packages/pdf/src/forms/scripts.ts:107
parseEmlfunction#
function parseEml(bytes: Uint8Array | ArrayBuffer): MailMessage| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | ArrayBuffer | — |
Defined in packages/pdf/src/formats/mail/eml.ts:159
parseFormatScriptfunction#
function parseFormatScript(script: string | undefined): FieldFormat | undefined| Parameter | Type | Description |
|---|---|---|
script | string | undefined | — |
Defined in packages/pdf/src/forms/scripts.ts:97
parseMailfunction#
function parseMail(bytes: Uint8Array, hint: MailFileHint = {}): MailMessage| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
hintoptional | MailFileHint | — |
Defined in packages/pdf/src/formats/mail/convert.ts:12
parseMsgfunction#
function parseMsg(bytes: Uint8Array | ArrayBuffer): MailMessage| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | ArrayBuffer | — |
Defined in packages/pdf/src/formats/mail/msg.ts:243
parsePageRangesfunction#
function parsePageRanges(text: string, pageCount: number): [number, number][]| Parameter | Type | Description |
|---|---|---|
text | string | — |
pageCount | number | — |
Defined in packages/pdf/src/tools/split.ts:24
parsePkcs12function#
function parsePkcs12(data: Uint8Array | ArrayBuffer, password = ''): Promise<Pkcs12Contents>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
passwordoptional | unknown | — |
Defined in packages/pdf/src/signatures/pkcs12.ts:436
parseRichTextfunction#
function parseRichText(xhtml: string, defaults: Partial<RichTextDefaults> = {}): RichTextParagraph[] | undefined| Parameter | Type | Description |
|---|---|---|
xhtml | string | — |
defaultsoptional | Partial<RichTextDefaults> | — |
Defined in packages/pdf/src/annotations/rich-text.ts:420
parseValidateScriptfunction#
function parseValidateScript(script: string | undefined): FieldRange | undefined| Parameter | Type | Description |
|---|---|---|
script | string | undefined | — |
Defined in packages/pdf/src/forms/scripts.ts:121
parseXfdffunction#
function parseXfdf(xml: string): XfdfImport| Parameter | Type | Description |
|---|---|---|
xml | string | — |
Defined in packages/pdf/src/annotations/xfdf.ts:422
pemBlocksfunction#
function pemBlocks(pem: string, label: string): Uint8Array[]| Parameter | Type | Description |
|---|---|---|
pem | string | — |
label | string | — |
Defined in packages/pdf/src/signatures/pem.ts:11
pemToDerfunction#
function pemToDer(pem: string, label?: string): Uint8Array| Parameter | Type | Description |
|---|---|---|
pem | string | — |
labeloptional | string | — |
Defined in packages/pdf/src/signatures/pem.ts:1
permissionsFromFlagsfunction#
function permissionsFromFlags(flags: number): PdfPermissions| Parameter | Type | Description |
|---|---|---|
flags | number | — |
Defined in packages/pdf/src/security/standard.ts:77
permissionsToFlagsfunction#
function permissionsToFlags(permissions: Partial<PdfPermissions> = {}): number| Parameter | Type | Description |
|---|---|---|
permissionsoptional | Partial<PdfPermissions> | — |
Defined in packages/pdf/src/security/standard.ts:85
plainToRichTextfunction#
function plainToRichText(text: string, style: Omit<RichTextRun, 'text'> = {}): RichTextParagraph[]| Parameter | Type | Description |
|---|---|---|
text | string | — |
styleoptional | Omit<RichTextRun, 'text'> | — |
Defined in packages/pdf/src/annotations/rich-text.ts:141
polygonAreafunction#
function polygonArea(points: readonly PdfPoint[]): number| Parameter | Type | Description |
|---|---|---|
points | readonly PdfPoint[] | — |
Defined in packages/pdf/src/annotations/geometry.ts:534
polylineLengthfunction#
function polylineLength(points: readonly PdfPoint[], isClosed = false): number| Parameter | Type | Description |
|---|---|---|
points | readonly PdfPoint[] | — |
isClosedoptional | unknown | — |
Defined in packages/pdf/src/annotations/geometry.ts:524
positionBetweenfunction#
function positionBetween(before: string | undefined, after: string | undefined, actor = ''): string| Parameter | Type | Description |
|---|---|---|
before | string | undefined | — |
after | string | undefined | — |
actoroptional | unknown | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:135
prepareImagefunction#
function prepareImage(bytes: Uint8Array, options: PrepareImageOptions = {}): Promise<AnnotationImage>| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
optionsoptional | PrepareImageOptions | — |
Defined in packages/pdf/src/formats/image/prepare.ts:56
presenceMessagefunction#
function presenceMessage(state: PresenceState, sentAt: number = Date.now()): PresenceMessage| Parameter | Type | Description |
|---|---|---|
state | PresenceState | — |
sentAtoptional | number | — |
Defined in packages/pdf/src/annotations/sync.ts:600
presetFromAnnotationfunction#
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 } | — |
optionsoptional | { keepText?: boolean; keepSize?: boolean } | — |
Defined in packages/pdf/src/annotations/presets.ts:99
presetStylefunction#
function presetStyle(preset: AnnotationPreset): AnnotationPresetStyle| Parameter | Type | Description |
|---|---|---|
preset | AnnotationPreset | — |
Defined in packages/pdf/src/annotations/presets.ts:128
quadPointsFromQuadsfunction#
function quadPointsFromQuads(quads: readonly PdfQuad[]): number[]| Parameter | Type | Description |
|---|---|---|
quads | readonly PdfQuad[] | — |
Defined in packages/pdf/src/content/structured-text.ts:119
quadPointsFromRectsfunction#
function quadPointsFromRects(rects: readonly PdfRect[]): number[]| Parameter | Type | Description |
|---|---|---|
rects | readonly PdfRect[] | — |
Defined in packages/pdf/src/annotations/geometry.ts:123
quadsFromQuadPointsfunction#
function quadsFromQuadPoints(quadPoints: readonly number[]): [PdfPoint, PdfPoint, PdfPoint, PdfPoint][]| Parameter | Type | Description |
|---|---|---|
quadPoints | readonly number[] | — |
Defined in packages/pdf/src/annotations/geometry.ts:275
readImageInfofunction#
function readImageInfo(bytes: Uint8Array): AnnotationImage| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
Defined in packages/pdf/src/annotations/images.ts:234
rectsFromQuadPointsfunction#
function rectsFromQuadPoints(quadPoints: readonly number[]): PdfRect[]| Parameter | Type | Description |
|---|---|---|
quadPoints | readonly number[] | — |
Defined in packages/pdf/src/annotations/geometry.ts:127
resizeRotatedfunction#
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 | — |
minSizeoptional | unknown | — |
Defined in packages/pdf/src/annotations/rotation.ts:125
richTextDefaultStylefunction#
function richTextDefaultStyle(defaults: RichTextDefaults = RICH_TEXT_DEFAULTS): string| Parameter | Type | Description |
|---|---|---|
defaultsoptional | RichTextDefaults | — |
Defined in packages/pdf/src/annotations/rich-text.ts:176
richTextToPlainfunction#
function richTextToPlain(paragraphs: readonly RichTextParagraph[]): string| Parameter | Type | Description |
|---|---|---|
paragraphs | readonly RichTextParagraph[] | — |
Defined in packages/pdf/src/annotations/rich-text.ts:137
richTextToXhtmlfunction#
function richTextToXhtml(paragraphs: readonly RichTextParagraph[], defaults: RichTextDefaults = RICH_TEXT_DEFAULTS): string| Parameter | Type | Description |
|---|---|---|
paragraphs | readonly RichTextParagraph[] | — |
defaultsoptional | RichTextDefaults | — |
Defined in packages/pdf/src/annotations/rich-text.ts:180
rotateAnnotationfunction#
function rotateAnnotation(annotation: PdfAnnotation, degrees: number): AnnotationPatch| Parameter | Type | Description |
|---|---|---|
annotation | PdfAnnotation | — |
degrees | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:70
rotatedBoundsfunction#
function rotatedBounds(rect: PdfRect, degrees: number): PdfRect| Parameter | Type | Description |
|---|---|---|
rect | PdfRect | — |
degrees | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:28
rotatedCornersfunction#
function rotatedCorners(rect: PdfRect, degrees: number): [PdfPoint, PdfPoint, PdfPoint, PdfPoint]| Parameter | Type | Description |
|---|---|---|
rect | PdfRect | — |
degrees | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:21
rotationFromPointerfunction#
function rotationFromPointer(annotation: Pick<PdfAnnotation, 'rect'>, pointer: PdfPoint, snap = 0): number| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'rect'> | — |
pointer | PdfPoint | — |
snapoptional | unknown | — |
Defined in packages/pdf/src/annotations/rotation.ts:118
rotationHandlePointfunction#
function rotationHandlePoint(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>, offset = 20): PdfPoint| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'rect' | 'rotation'> | — |
offsetoptional | unknown | — |
Defined in packages/pdf/src/annotations/rotation.ts:113
rtfToHtmlfunction#
function rtfToHtml(rtf: Uint8Array | string): string| Parameter | Type | Description |
|---|---|---|
rtf | Uint8Array | string | — |
Defined in packages/pdf/src/formats/mail/rtf.ts:317
rtfToTextfunction#
function rtfToText(rtf: Uint8Array | string): string| Parameter | Type | Description |
|---|---|---|
rtf | Uint8Array | string | — |
Defined in packages/pdf/src/formats/mail/rtf.ts:321
sanitizePdffunction#
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 | — |
optionsoptional | SanitizeOptions | — |
Defined in packages/pdf/src/tools/sanitize.ts:393
selectPagesfunction#
function selectPages(pageCount: number, selector: PageSelector): number[]| Parameter | Type | Description |
|---|---|---|
pageCount | number | — |
selector | PageSelector | — |
Defined in packages/pdf/src/tools/split.ts:44
setAnnotationRotationfunction#
function setAnnotationRotation(annotation: PdfAnnotation, degrees: number): AnnotationPatch| Parameter | Type | Description |
|---|---|---|
annotation | PdfAnnotation | — |
degrees | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:66
setDefaultPdfLimitsfunction#
function setDefaultPdfLimits(limits?: Partial<PdfLimits>): PdfLimits| Parameter | Type | Description |
|---|---|---|
limitsoptional | Partial<PdfLimits> | — |
Defined in packages/pdf/src/pdf/limits.ts:66
signPdffunction#
function signPdf(data: Uint8Array | ArrayBuffer, input: SignPdfOptions): Promise<PdfBytes>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
input | SignPdfOptions | — |
Defined in packages/pdf/src/signatures/sign.ts:414
simplifyPathfunction#
function simplifyPath(points: readonly PdfPoint[], tolerance = 0.6): PdfPoint[]| Parameter | Type | Description |
|---|---|---|
points | readonly PdfPoint[] | — |
toleranceoptional | unknown | — |
Defined in packages/pdf/src/annotations/geometry.ts:167
smoothStrokefunction#
function smoothStroke(points: readonly PdfPoint[]): PdfPoint[]| Parameter | Type | Description |
|---|---|---|
points | readonly PdfPoint[] | — |
Defined in packages/pdf/src/annotations/geometry.ts:208
splitPdffunction#
function splitPdf(data: Uint8Array | ArrayBuffer, options: SplitOptions, naming: SplitNaming = {}): Promise<SplitPart[]>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
options | SplitOptions | — |
namingoptional | SplitNaming | — |
Defined in packages/pdf/src/tools/split.ts:167
tablesToXlsxfunction#
function tablesToXlsx(tables: readonly (readonly string[][])[]): PdfBytesWrites 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[][])[] | — |
Defined in packages/pdf/src/tools/export-office.ts:376
toPdfBytesfunction#
function toPdfBytes(bytes: Uint8Array): PdfBytes| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
Defined in packages/pdf/src/pdf/bytes.ts:3
toRotatedPointfunction#
function toRotatedPoint(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>, p: PdfPoint): PdfPoint| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'rect' | 'rotation'> | — |
p | PdfPoint | — |
Defined in packages/pdf/src/annotations/rotation.ts:104
toSyncJsonfunction#
function toSyncJson(value: unknown): SyncJson| Parameter | Type | Description |
|---|---|---|
value | unknown | — |
Defined in packages/pdf/src/annotations/sync.ts:136
toUnrotatedPointfunction#
function toUnrotatedPoint(annotation: Pick<PdfAnnotation, 'rect' | 'rotation'>, p: PdfPoint): PdfPoint| Parameter | Type | Description |
|---|---|---|
annotation | Pick<PdfAnnotation, 'rect' | 'rotation'> | — |
p | PdfPoint | — |
Defined in packages/pdf/src/annotations/geometry.ts:269
unrotatedRectFromBoundsfunction#
function unrotatedRectFromBounds(bounds: PdfRect, degrees: number, aspect?: number): PdfRect | undefined| Parameter | Type | Description |
|---|---|---|
bounds | PdfRect | — |
degrees | number | — |
aspectoptional | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:33
uprightPlacementfunction#
function uprightPlacement(rect: PdfRect, pageRotation: number): { rect: PdfRect; rotation: number | undefined }| Parameter | Type | Description |
|---|---|---|
rect | PdfRect | — |
pageRotation | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:150
uprightRotationfunction#
function uprightRotation(pageRotation: number): number| Parameter | Type | Description |
|---|---|---|
pageRotation | number | — |
Defined in packages/pdf/src/annotations/rotation.ts:146
validateFieldValuefunction#
function validateFieldValue(field: ValidatedField, value: FormValue, resolve?: FieldValueResolver): string | undefined| Parameter | Type | Description |
|---|---|---|
field | ValidatedField | — |
value | FormValue | — |
resolveoptional | FieldValueResolver | — |
Defined in packages/pdf/src/forms/scripts.ts:361
validatePdfAfunction#
function validatePdfA(input: Uint8Array | ArrayBuffer | PdfFile): PdfAValidation| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | PdfFile | — |
Defined in packages/pdf/src/tools/pdfa-validate.ts:682
verifyPdfSignaturesfunction#
function verifyPdfSignatures(data: Uint8Array | ArrayBuffer, options: VerifySignaturesOptions = {}): Promise<PdfSignatureVerification[]>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | VerifySignaturesOptions | — |
Defined in packages/pdf/src/signatures/verify.ts:731
viewportTransformfunction#
function viewportTransform(box: PdfRect, rotation: number, scale: number): Matrix| Parameter | Type | Description |
|---|---|---|
box | PdfRect | — |
rotation | number | — |
scale | number | — |
Defined in packages/pdf/src/annotations/geometry.ts:35
zipSplitPartsfunction#
function zipSplitParts(parts: readonly SplitPart[]): PdfBytes| Parameter | Type | Description |
|---|---|---|
parts | readonly SplitPart[] | — |
Defined in packages/pdf/src/tools/split.ts:199
FontFormatErrorclass#
class FontFormatError extends Error
new FontFormatError(message: string)Defined in packages/pdf/src/fonts/truetype.ts:21
ImageDecoderRequiredErrorclass#
class ImageDecoderRequiredError extends ImageFormatError
new ImageDecoderRequiredError(readonly mimeType: string)| Member | Type | Description |
|---|---|---|
mimeTypereadonly | string | — |
Defined in packages/pdf/src/formats/image/prepare.ts:7
ImageFormatErrorclass#
class ImageFormatError extends Error
new ImageFormatError(message: string)Defined in packages/pdf/src/annotations/images.ts:6
InflateErrorclass#
class InflateError extends Error
new InflateError(message: string)Defined in packages/pdf/src/pdf/inflate.ts:44
JpegErrorclass#
class JpegError extends Error
new JpegError(message: string)Defined in packages/pdf/src/pdf/jpeg.ts:2
MailFormatErrorclass#
class MailFormatError extends Error
new MailFormatError(message: string)Defined in packages/pdf/src/formats/mail/types.ts:1
PdfCryptoUnavailableErrorclass#
class PdfCryptoUnavailableError extends Error
new PdfCryptoUnavailableError()Defined in packages/pdf/src/security/aes.ts:3
PdfInputErrorclass#
class PdfInputError extends TypeError
new PdfInputError(readonly path: string, message: string)| Member | Type | Description |
|---|---|---|
pathreadonly | string | — |
Defined in packages/pdf/src/document/input-checks.ts:6
PdfLimitErrorclass#
class PdfLimitError extends Error
new PdfLimitError(readonly limit: PdfLimitName, readonly allowed: number, message: string)| Member | Type | Description |
|---|---|---|
limitreadonly | PdfLimitName | — |
allowedreadonly | number | — |
Defined in packages/pdf/src/pdf/limits.ts:16
PdfMissingGlyphErrorclass#
class PdfMissingGlyphError extends Error
new PdfMissingGlyphError(report: MissingGlyphReport)| Member | Type | Description |
|---|---|---|
charactersreadonly | string | — |
scriptsreadonly | TextScript[] | — |
Defined in packages/pdf/src/fonts/missing-glyphs.ts:8
PdfPasswordErrorclass#
class PdfPasswordError extends Error
new PdfPasswordError(readonly reason: 'password-required' | 'password-incorrect' | 'unsupported')| Member | Type | Description |
|---|---|---|
reasonreadonly | 'password-required' | 'password-incorrect' | 'unsupported' | — |
Defined in packages/pdf/src/security/standard.ts:36
PdfPermissionErrorclass#
class PdfPermissionError extends Error
new PdfPermissionError(readonly permission: PdfPermissionName)| Member | Type | Description |
|---|---|---|
permissionreadonly | PdfPermissionName | — |
Defined in packages/pdf/src/document/permissions.ts:17
PdfSyntaxErrorclass#
class PdfSyntaxError extends Error
new PdfSyntaxError(message: string, readonly offset: number)| Member | Type | Description |
|---|---|---|
offsetreadonly | number | — |
Defined in packages/pdf/src/pdf/parser.ts:4
PdfWriteErrorclass#
class PdfWriteError extends Error
new PdfWriteError(message: string)Defined in packages/pdf/src/pdf/writer.ts:7
Pkcs12Errorclass#
class Pkcs12Error extends Error
new Pkcs12Error(readonly reason: Pkcs12ErrorReason, message: string)| Member | Type | Description |
|---|---|---|
reasonreadonly | Pkcs12ErrorReason | — |
Defined in packages/pdf/src/signatures/pkcs12.ts:22
UnsupportedFilterErrorclass#
class UnsupportedFilterError extends Error
new UnsupportedFilterError(readonly filter: string)| Member | Type | Description |
|---|---|---|
filterreadonly | string | — |
Defined in packages/pdf/src/pdf/filters.ts:13
ATTACHMENT_RELATIONSHIPSconst#
const ATTACHMENT_RELATIONSHIPS: readonly AttachmentRelationship[]Defined in packages/pdf/src/pdf/file-spec.ts:23
DEFAULT_STYLESconst#
const DEFAULT_STYLES: Record<AnnotationType, AnnotationDefaults>Defined in packages/pdf/src/annotations/store.ts:139
FILE_ATTACHMENT_ICONSconst#
const FILE_ATTACHMENT_ICONS: readonly FileAttachmentIcon[]Defined in packages/pdf/src/annotations/media.ts:33
FORM_MESSAGESconst#
const FORM_MESSAGES: Record<FormMessageKey, string>Defined in packages/pdf/src/forms/form-messages.ts:17
PLACEHOLDER_PAGE_IDconst#
const PLACEHOLDER_PAGE_ID: "placeholder" = 'placeholder'Defined in packages/pdf/src/annotations/sync-pages.ts:106
RECOGNISED_FUNCTIONSconst#
const RECOGNISED_FUNCTIONS: readonly string[]Defined in packages/pdf/src/forms/scripts.ts:41
REDACTION_PATTERN_NAMESconst#
const REDACTION_PATTERN_NAMES: readonly ("date" | "email" | "phone" | "ssn" | "creditCard" | "iban")[]Defined in packages/pdf/src/content/text.ts:439
REDACTION_PATTERNSconst#
const REDACTION_PATTERNS: { readonly email: RegExp; readonly phone: RegExp; readonly ssn: RegExp; readonly creditCard: RegExp; readonly iban: RegExp; readonly date: RegExp; }Defined in packages/pdf/src/content/text.ts:426
RICH_TEXT_DEFAULTSconst#
const RICH_TEXT_DEFAULTS: RichTextDefaultsDefined in packages/pdf/src/annotations/rich-text.ts:25
STAMP_COLORSconst#
const STAMP_COLORS: Record<string, string>Defined in packages/pdf/src/annotations/stamp-layout.ts:4
STAMP_LABELSconst#
const STAMP_LABELS: Record<string, string>Defined in packages/pdf/src/annotations/stamp-layout.ts:15
AccessibilityIssueinterface#
interface AccessibilityIssue| Property | Type | Description |
|---|---|---|
code | AccessibilityCode | — |
severity | 'error' | 'warning' | — |
message | string | — |
pageIndexoptional | number | — |
figureIdoptional | string | For figure-without-alt: the id to pass to setAlternateText. |
Defined in packages/pdf/src/tools/accessibility.ts:21
AccessibilityReportinterface#
interface AccessibilityReport| Property | Type | Description |
|---|---|---|
isTagged | boolean | — |
titleoptional | string | — |
languageoptional | 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. |
Defined in packages/pdf/src/tools/accessibility.ts:30
AddDocumentTimestampOptionsinterface#
interface AddDocumentTimestampOptions| Property | Type | Description |
|---|---|---|
timestamp | TimestampCallback | — |
fieldNameoptional | string | — |
placeholderSizeoptional | number | — |
passwordoptional | string | — |
Defined in packages/pdf/src/signatures/document-timestamp.ts:14
AddImageOptionsinterface#
interface AddImageOptionsDefined in packages/pdf/src/content-edit/types.ts:161
AddMarkOptionsinterface#
interface AddMarkOptions| Property | Type | Description |
|---|---|---|
kind | PageMarkKind | — |
x | number | Centre of the mark. |
y | number | — |
sizeoptional | number | — |
coloroptional | string | — |
Defined in packages/pdf/src/content-edit/add-content.ts:201
AddTextOptionsinterface#
interface AddTextOptions| Property | Type | Description |
|---|---|---|
text | string | — |
x | number | — |
y | number | — |
fontSizeoptional | number | — |
coloroptional | string | — |
opacityoptional | number | — |
fontoptional | StandardFontName | — |
fontNameoptional | string | Name of a supplied font to use instead of a standard one. |
rotationoptional | number | — |
lineHeightoptional | number | — |
fontsoptional | FontRegistry | — |
Defined in packages/pdf/src/content-edit/types.ts:142
AddTextResultinterface#
interface AddTextResult extends TextEditResult| Property | Type | Description |
|---|---|---|
rectoptional | PdfRect | — |
ok | boolean | Inherited from TextEditResult. |
reasonoptional | ContentEditFailure | undefined | Inherited from TextEditResult. |
messageoptional | string | undefined | Inherited from TextEditResult. |
usedFontoptional | "original" | "embedded" | "standard" | undefined | Inherited from TextEditResult. |
fontNamesoptional | string[] | undefined | Inherited from TextEditResult. |
missingoptional | string | undefined | Inherited from TextEditResult. |
widthChangeoptional | number | undefined | Inherited from TextEditResult. |
Defined in packages/pdf/src/content-edit/types.ts:157
AddValidationDataOptionsinterface#
interface AddValidationDataOptions| Property | Type | Description |
|---|---|---|
certificatesoptional | (Uint8Array | string)[] | — |
ocspsoptional | Uint8Array[] | — |
crlsoptional | Uint8Array[] | — |
fetchoptional | ValidationDataCallback | — |
passwordoptional | string | — |
nowoptional | Date | — |
Defined in packages/pdf/src/signatures/dss.ts:97
AnnotationAttachmentinterface#
interface AnnotationAttachment| Property | Type | Description |
|---|---|---|
fileName | string | — |
mimeTypeoptional | string | — |
descriptionoptional | string | — |
sizeoptional | number | — |
dataoptional | Uint8Array | — |
relationshipoptional | AttachmentRelationship | — |
Defined in packages/pdf/src/annotations/types.ts:112
AnnotationAttachmentFileinterface#
interface AnnotationAttachmentFile| Property | Type | Description |
|---|---|---|
fileName | string | — |
mimeType | string | — |
descriptionoptional | string | — |
data | Uint8Array | — |
relationshipoptional | AttachmentRelationship | — |
Defined in packages/pdf/src/annotations/types.ts:121
AnnotationChangeSetinterface#
interface AnnotationChangeSet| Property | Type | Description |
|---|---|---|
added | PdfAnnotation[] | — |
changed | { before: PdfAnnotation; after: PdfAnnotation }[] | — |
removed | PdfAnnotation[] | — |
source | ChangeSource | — |
Defined in packages/pdf/src/annotations/store.ts:124
AnnotationDefaultsinterface#
interface AnnotationDefaults| Property | Type | Description |
|---|---|---|
color | string | — |
opacity | number | — |
strokeWidth | number | — |
fillColoroptional | string | — |
fontSizeoptional | number | — |
Defined in packages/pdf/src/annotations/store.ts:131
AnnotationImageinterface#
interface AnnotationImageDefined in packages/pdf/src/annotations/types.ts:54
AnnotationPermissionOptionsinterface#
interface AnnotationPermissionOptions| Property | Type | Description |
|---|---|---|
isDocumentReadOnlyoptional | boolean | — |
canAnnotateoptional | boolean | — |
Defined in packages/pdf/src/annotations/permissions.ts:21
AnnotationPermissionsinterface#
interface AnnotationPermissions| Property | Type | Description |
|---|---|---|
canMove | boolean | — |
canResize | boolean | — |
canEditContents | boolean | — |
canEditStyle | boolean | — |
canDelete | boolean | — |
canReply | boolean | — |
canChangeStatus | boolean | — |
isOwner | boolean | — |
Defined in packages/pdf/src/annotations/permissions.ts:10
AnnotationPresetinterface#
interface AnnotationPreset extends AnnotationPresetStyle| Property | Type | Description |
|---|---|---|
id | string | — |
name | string | — |
type | AnnotationType | — |
coloroptional | string | undefined | Inherited from AnnotationPresetStyle. |
fillColoroptional | string | undefined | Inherited from AnnotationPresetStyle. |
opacityoptional | number | undefined | Inherited from AnnotationPresetStyle. |
strokeWidthoptional | number | undefined | Inherited from AnnotationPresetStyle. |
borderStyleoptional | BorderStyle | undefined | Inherited from AnnotationPresetStyle. |
lineEndingsoptional | [LineEnding, LineEnding] | undefined | Inherited from AnnotationPresetStyle. |
fontSizeoptional | number | undefined | Inherited from AnnotationPresetStyle. |
fontColoroptional | string | undefined | Inherited from AnnotationPresetStyle. |
fontFamilyoptional | AnnotationFont | undefined | Inherited from AnnotationPresetStyle. |
textAlignoptional | RichTextAlign | undefined | Inherited from AnnotationPresetStyle. |
iconoptional | NoteIcon | undefined | Inherited from AnnotationPresetStyle. |
iconNameoptional | string | undefined | Inherited from AnnotationPresetStyle. |
stampoptional | string | undefined | Inherited from AnnotationPresetStyle. |
stampLabeloptional | string | undefined | Inherited from AnnotationPresetStyle. |
labeloptional | string | undefined | Inherited from AnnotationPresetStyle. |
measureScaleoptional | MeasureScale | undefined | Inherited from AnnotationPresetStyle. |
rotationoptional | number | undefined | Inherited from AnnotationPresetStyle. |
overlayTextoptional | string | undefined | Inherited from AnnotationPresetStyle. |
textoptional | string | undefined | Inherited from AnnotationPresetStyle. |
contentsoptional | string | undefined | Inherited from AnnotationPresetStyle. |
widthoptional | number | undefined | Inherited from AnnotationPresetStyle. |
heightoptional | number | undefined | Inherited from AnnotationPresetStyle. |
Defined in packages/pdf/src/annotations/presets.ts:38
AnnotationPresetsJsoninterface#
interface AnnotationPresetsJson| Property | Type | Description |
|---|---|---|
format | 'birchui-pdf-annotation-presets' | — |
version | 1 | — |
presets | AnnotationPreset[] | — |
Defined in packages/pdf/src/annotations/presets.ts:44
AnnotationPresetStyleinterface#
interface AnnotationPresetStyle| Property | Type | Description |
|---|---|---|
coloroptional | string | — |
fillColoroptional | string | — |
opacityoptional | number | — |
strokeWidthoptional | number | — |
borderStyleoptional | BorderStyle | — |
lineEndingsoptional | [LineEnding, LineEnding] | — |
fontSizeoptional | number | — |
fontColoroptional | string | — |
fontFamilyoptional | AnnotationFont | — |
textAlignoptional | RichTextAlign | — |
iconoptional | NoteIcon | — |
iconNameoptional | string | — |
stampoptional | string | — |
stampLabeloptional | string | — |
labeloptional | string | — |
measureScaleoptional | MeasureScale | — |
rotationoptional | number | — |
overlayTextoptional | string | — |
textoptional | string | — |
contentsoptional | string | — |
widthoptional | number | — |
heightoptional | number | — |
Defined in packages/pdf/src/annotations/presets.ts:13
AnnotationReplyinterface#
interface AnnotationReply| Property | Type | Description |
|---|---|---|
id | string | — |
author | string | — |
contents | string | — |
createdAt | string | — |
modifiedAt | string | — |
Defined in packages/pdf/src/annotations/types.ts:46
AnnotationsFdfImportinterface#
interface AnnotationsFdfImport| Property | Type | Description |
|---|---|---|
annotations | AnnotationInput[] | — |
fileNameoptional | string | — |
Defined in packages/pdf/src/annotations/annotations-fdf.ts:18
AnnotationsFdfOptionsinterface#
interface AnnotationsFdfOptions| Property | Type | Description |
|---|---|---|
fileNameoptional | string | — |
includeAppearancesoptional | boolean | — |
fontsoptional | FontRegistry | — |
pageRotationsoptional | readonly number[] | — |
Defined in packages/pdf/src/annotations/annotations-fdf.ts:11
AnnotationsJsoninterface#
interface AnnotationsJson| Property | Type | Description |
|---|---|---|
format | 'birchui-pdf-annotations' | — |
version | 1 | — |
annotations | (Omit<PdfAnnotation, 'image'> & { image?: { data: string; mimeType: string; width: number; height: number }; })[] | — |
Defined in packages/pdf/src/annotations/xfdf.ts:637
AnnotationSyncinterface#
interface AnnotationSync| Property | Type | Description |
|---|---|---|
receive() | (operations: SyncOperation | SyncOperation[]) => void | — |
merge() | (snapshot: SyncSnapshot) => void | — |
snapshot() | () => SyncSnapshot | — |
refresh() | () => void | — |
destroy() | () => void | — |
Defined in packages/pdf/src/annotations/sync.ts:81
AnnotationSyncHostinterface#
interface AnnotationSyncHost| Property | Type | Description |
|---|---|---|
getAnnotations() | () => PdfAnnotation[] | — |
applyRemoteChanges() | (changes: RemoteAnnotationChanges) => void | — |
subscribeAnnotationChanges() | (listener: (changes: SyncAnnotationChanges) => void) => () => void | — |
Defined in packages/pdf/src/annotations/sync.ts:43
AnnotationSyncOptionsinterface#
interface AnnotationSyncOptions| Property | Type | Description |
|---|---|---|
actorId | string | — |
send | (operations: SyncOperation[]) => void | — |
authoroptional | string | — |
onConflictoptional | (conflict: SyncConflict) => void | — |
snapshotoptional | SyncSnapshot | — |
pageIdsoptional | () => readonly (string | undefined)[] | — |
Defined in packages/pdf/src/annotations/sync.ts:49
AnnotationUserinterface#
interface AnnotationUserDefined in packages/pdf/src/annotations/permissions.ts:4
ApplyRedactionsAsyncOptionsinterface#
interface ApplyRedactionsAsyncOptions| Property | Type | Description |
|---|---|---|
decodeImageoptional | AsyncRedactionImageDecoder | — |
Defined in packages/pdf/src/document/session-types.ts:174
ApplyRedactionsOptionsinterface#
interface ApplyRedactionsOptions| Property | Type | Description |
|---|---|---|
decodeImageoptional | RedactionImageDecoder | — |
Defined in packages/pdf/src/document/session-types.ts:170
ArcGeometryinterface#
interface ArcGeometryDefined in packages/pdf/src/annotations/geometry.ts:299
ArchiveFindinginterface#
interface ArchiveFinding| Property | Type | Description |
|---|---|---|
rule | ArchiveRule | — |
severity | ArchiveSeverity | — |
message | string | — |
pageIndexoptional | number | — |
Defined in packages/pdf/src/tools/archive-check.ts:21
ArchiveFontUsageinterface#
interface ArchiveFontUsage| Property | Type | Description |
|---|---|---|
name | string | — |
isEmbedded | boolean | — |
pages | number[] | — |
Defined in packages/pdf/src/tools/archive-check.ts:28
ArchiveReportinterface#
interface ArchiveReport| Property | Type | Description |
|---|---|---|
isLikelyConformant | boolean | — |
declaredoptional | { part: number; conformance?: string } | — |
findings | ArchiveFinding[] | — |
fonts | ArchiveFontUsage[] | — |
Defined in packages/pdf/src/tools/archive-check.ts:34
BackgroundOptionsinterface#
interface BackgroundOptionsDefined in packages/pdf/src/tools/stamping.ts:430
BarcodeFieldInfointerface#
interface BarcodeFieldInfo| Property | Type | Description |
|---|---|---|
symbology | 'pdf417' | 'qrCode' | 'dataMatrix' | 'unknown' | — |
Defined in packages/pdf/src/forms/types.ts:115
BatesOptionsinterface#
interface BatesOptions| Property | Type | Description |
|---|---|---|
prefixoptional | string | — |
suffixoptional | string | — |
startoptional | number | — |
digitsoptional | number | — |
positionoptional | StampPosition | — |
fontSizeoptional | number | — |
coloroptional | string | — |
fontoptional | StandardFont | — |
marginoptional | number | — |
fontsoptional | FontRegistry | — |
Defined in packages/pdf/src/tools/stamping.ts:71
BlankScanOptionsinterface#
interface BlankScanOptions| Property | Type | Description |
|---|---|---|
whiteLeveloptional | number | Lightness from 0 to 255 at or above which a pixel counts as paper. |
toleranceoptional | number | Share of pixels that may be darker than paper, for dust and scanner noise. |
borderoptional | number | Share of each edge that is left out, where scanners leave shadows. |
Defined in packages/pdf/src/tools/blank-scan.ts:4
ChainProbleminterface#
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 | — |
Defined in packages/pdf/src/signatures/x509.ts:397
ComparableDocumentinterface#
interface ComparableDocument| Property | Type | Description |
|---|---|---|
pageCountreadonly | number | — |
getPageText() | (pageIndex: number) => ComparablePageText | — |
Defined in packages/pdf/src/compare/types.ts:64
ComparablePageTextinterface#
interface ComparablePageTextDefined in packages/pdf/src/compare/types.ts:59
ComparePdfAsyncOptionsinterface#
interface ComparePdfAsyncOptions extends ComparePdfOptions| Property | Type | Description |
|---|---|---|
passwordoptional | string | — |
otherPasswordoptional | string | — |
ignoreCaseoptional | boolean | undefined | Inherited from ComparePdfOptions. |
ignoreWhitespaceoptional | boolean | undefined | Inherited from ComparePdfOptions. |
annotationsoptional | boolean | undefined | Inherited from ComparePdfOptions. |
minMoveWordsoptional | number | undefined | Inherited from ComparePdfOptions. |
pageSimilarityThresholdoptional | number | undefined | Inherited from ComparePdfOptions. |
colorsoptional | { inserted?: string; deleted?: string; moved?: string; } | undefined | Inherited from ComparePdfOptions. |
authoroptional | string | undefined | Inherited from ComparePdfOptions. |
Defined in packages/pdf/src/compare/types.ts:71
ComparePdfOptionsinterface#
interface ComparePdfOptions| Property | Type | Description |
|---|---|---|
ignoreCaseoptional | boolean | — |
ignoreWhitespaceoptional | boolean | — |
annotationsoptional | boolean | — |
minMoveWordsoptional | number | — |
pageSimilarityThresholdoptional | number | — |
colorsoptional | { inserted?: string; deleted?: string; moved?: string } | — |
authoroptional | string | — |
Defined in packages/pdf/src/compare/types.ts:49
CompareReportLabelsinterface#
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 | — |
Defined in packages/pdf/src/compare/report.ts:5
CompareReportOptionsinterface#
interface CompareReportOptions| Property | Type | Description |
|---|---|---|
formatoptional | CompareReportFormat | — |
fileNameAoptional | string | — |
fileNameBoptional | string | — |
dateoptional | Date | string | — |
labelsoptional | Partial<CompareReportLabels> | — |
Defined in packages/pdf/src/compare/report.ts:20
CropPagesOptionsinterface#
interface CropPagesOptions| Property | Type | Description |
|---|---|---|
removeContentoptional | boolean | — |
Defined in packages/pdf/src/tools/page-boxes.ts:8
DecodedImageinterface#
interface DecodedImageDefined in packages/pdf/src/formats/image/types.ts:3
DecodedRedactionImageinterface#
interface DecodedRedactionImageDefined in packages/pdf/src/redaction/images.ts:24
DecompressRtfOptionsinterface#
interface DecompressRtfOptions| Property | Type | Description |
|---|---|---|
verifyCrcoptional | boolean | — |
Defined in packages/pdf/src/formats/mail/rtf.ts:34
DetectedFieldinterface#
interface DetectedField| Property | Type | Description |
|---|---|---|
type | 'text' | 'checkbox' | — |
pageIndex | number | — |
rect | PdfRect | — |
name | string | — |
labeloptional | string | The text on the page the name was taken from. |
isMultilineoptional | boolean | — |
source | 'underline' | 'box' | 'square' | 'underscores' | — |
Defined in packages/pdf/src/forms/detect.ts:4
DetectFieldsOptionsinterface#
interface DetectFieldsOptions| Property | Type | Description |
|---|---|---|
takenNamesoptional | Iterable<string> | Names that are taken already; detected names are made different from these and from each other. |
existingoptional | readonly PdfRect[] | Rectangles of fields the page has already; a candidate that overlaps one is left out. |
Defined in packages/pdf/src/forms/detect.ts:21
DetectionShapeinterface#
interface DetectionShape| Property | Type | Description |
|---|---|---|
rect | PdfRect | — |
operator | string | The painting operator of the path: S, f, B and their variants. |
Defined in packages/pdf/src/forms/detect.ts:15
DownsampleReportinterface#
interface DownsampleReport| Property | Type | Description |
|---|---|---|
imagesDownsampled | number | — |
imagesKept | number | — |
Defined in packages/pdf/src/tools/downsample.ts:12
DuplicateFieldOptionsinterface#
interface DuplicateFieldOptions| Property | Type | Description |
|---|---|---|
offsetoptional | [number, number] | — |
pageIndexoptional | number | — |
newNameoptional | string | — |
Defined in packages/pdf/src/forms/types.ts:293
EditableTextMatchinterface#
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 | — |
Defined in packages/pdf/src/content-edit/find-replace.ts:15
EmbeddedTextinterface#
interface EmbeddedText| Property | Type | Description |
|---|---|---|
ref | PdfRef | — |
fontName | string | — |
encoded | Uint8Array | — |
width | number | — |
ascent | number | — |
descent | number | — |
isRtl | boolean | — |
placementsoptional | (GlyphPlacement | undefined)[] | — |
Defined in packages/pdf/src/fonts/registry.ts:25
EncryptOptionsinterface#
interface EncryptOptions| Property | Type | Description |
|---|---|---|
userPasswordoptional | string | — |
ownerPasswordoptional | string | — |
permissionsoptional | Partial<PdfPermissions> | — |
algorithmoptional | EncryptionAlgorithm | — |
encryptMetadataoptional | boolean | — |
Defined in packages/pdf/src/security/standard.ts:354
ExtractedImageinterface#
interface ExtractedImage| Property | Type | Description |
|---|---|---|
id | string | — |
index | number | — |
name | string | — |
isInline | boolean | — |
refoptional | PdfRef | — |
rect | PdfRect | — |
quad | [PdfPoint, PdfPoint, PdfPoint, PdfPoint] | — |
matrix | Matrix | — |
width | number | — |
height | number | — |
bitsPerComponent | number | — |
colorSpaceoptional | string | — |
filters | string[] | — |
format | PageImageFormat | — |
isMask | boolean | — |
hasMask | boolean | — |
status | ExtractedImageStatus | — |
dataoptional | ExtractedImagePixels | — |
encodedoptional | ExtractedImageEncoding | — |
isRenderedoptional | boolean | — |
messageoptional | string | — |
Defined in packages/pdf/src/content-edit/extract-images.ts:43
ExtractedImageEncodinginterface#
interface ExtractedImageEncoding| Property | Type | Description |
|---|---|---|
mimeType | EncodedImageMimeType | — |
filter | string | — |
bytes | Uint8Array | — |
decodeParmsoptional | Record<string, number | boolean> | — |
jbig2Globalsoptional | Uint8Array | — |
Defined in packages/pdf/src/content-edit/extract-images.ts:35
ExtractedImagePixelsinterface#
interface ExtractedImagePixelsDefined in packages/pdf/src/content-edit/extract-images.ts:29
FieldActionEntryinterface#
interface FieldActionEntry| Property | Type | Description |
|---|---|---|
trigger | FieldActionTrigger | — |
widgetIndexoptional | number | — |
action | FieldAction | — |
Defined in packages/pdf/src/forms/types.ts:241
FieldCalculationinterface#
interface FieldCalculation| Property | Type | Description |
|---|---|---|
operation | 'SUM' | 'AVG' | 'PRD' | 'MIN' | 'MAX' | 'CUSTOM' | — |
fields | string[] | — |
expressionoptional | string | — |
Defined in packages/pdf/src/forms/types.ts:56
FieldIssueinterface#
interface FieldIssue| Property | Type | Description |
|---|---|---|
code | FormIssueCode | — |
key | FormMessageKey | — |
params | FormMessageParams | — |
message | string | — |
Defined in packages/pdf/src/forms/types.ts:168
FieldRangeinterface#
interface FieldRangeDefined in packages/pdf/src/forms/types.ts:62
FieldScriptInfointerface#
interface FieldScriptInfo| Property | Type | Description |
|---|---|---|
status | 'supported' | 'unsupported' | 'none' | — |
kind | 'none' | 'builtin' | 'expression' | 'custom' | — |
source | string | — |
Defined in packages/pdf/src/forms/types.ts:158
FieldScriptsinterface#
interface FieldScripts| Property | Type | Description |
|---|---|---|
formatoptional | string | — |
keystrokeoptional | string | — |
validateoptional | string | — |
calculateoptional | string | — |
Defined in packages/pdf/src/forms/types.ts:149
FindTextOptionsinterface#
interface FindTextOptionsDefined in packages/pdf/src/content-edit/find-replace.ts:10
FontRegistryinterface#
interface FontRegistry| Property | Type | Description |
|---|---|---|
isEmptyreadonly | boolean | — |
fontNamesreadonly | 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 | — |
Defined in packages/pdf/src/fonts/registry.ts:74
FormFieldInputinterface#
interface FormFieldInput| Property | Type | Description |
|---|---|---|
name | string | — |
type | FormFieldType | — |
pageIndex | number | — |
rect | PdfRect | — |
valueoptional | FormValue | — |
optionsoptional | (FormFieldOption | string)[] | — |
tooltipoptional | string | — |
isReadOnlyoptional | boolean | — |
isRequiredoptional | boolean | — |
isMultilineoptional | boolean | — |
isPasswordoptional | boolean | — |
isComboptional | boolean | — |
maxLengthoptional | number | — |
isMultiSelectoptional | boolean | — |
isEditableoptional | boolean | — |
alignmentoptional | 'left' | 'center' | 'right' | — |
fontSizeoptional | number | — |
borderColoroptional | string | null | — |
backgroundColoroptional | string | null | — |
formatoptional | FieldFormat | — |
calculationoptional | FieldCalculation | — |
rangeoptional | FieldRange | — |
radioValueoptional | string | — |
isNoExportoptional | boolean | — |
richTextoptional | RichTextParagraph[] | — |
Defined in packages/pdf/src/forms/types.ts:119
FormFieldOptioninterface#
interface FormFieldOptionDefined in packages/pdf/src/forms/types.ts:11
FormFieldWidgetinterface#
interface FormFieldWidget| Property | Type | Description |
|---|---|---|
id | string | — |
pageIndex | number | — |
rect | PdfRect | — |
onValueoptional | string | — |
exportValueoptional | string | — |
tabIndexoptional | number | — |
rotationoptional | 90 | 180 | 270 | — |
Defined in packages/pdf/src/forms/types.ts:16
FormImportRejectioninterface#
interface FormImportRejection| Property | Type | Description |
|---|---|---|
name | string | — |
code | FormIssueCode | 'option' | 'type' | — |
key | FormMessageKey | — |
params | FormMessageParams | — |
message | string | — |
Defined in packages/pdf/src/forms/types.ts:271
FormImportResultinterface#
interface FormImportResult| Property | Type | Description |
|---|---|---|
imported | number | — |
changed | string[] | — |
unknown | string[] | — |
rejected | FormImportRejection[] | — |
Defined in packages/pdf/src/forms/types.ts:279
FormIssueinterface#
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. |
Defined in packages/pdf/src/forms/types.ts:175
FormJsonOptionsinterface#
interface FormJsonOptions| Property | Type | Description |
|---|---|---|
flatoptional | boolean | — |
Defined in packages/pdf/src/forms/form-data.ts:9
FormStateinterface#
interface FormState| Property | Type | Description |
|---|---|---|
isDirty | boolean | — |
dirtyFields | string[] | — |
isValid | boolean | — |
fieldCount | number | — |
filledCount | number | — |
requiredCount | number | — |
requiredFilledCount | number | — |
Defined in packages/pdf/src/forms/types.ts:181
FormSubmitPayloadinterface#
interface FormSubmitPayload| Property | Type | Description |
|---|---|---|
url | string | — |
method | 'get' | 'post' | — |
format | SubmitFormat | — |
body | PdfBytes | string | — |
contentType | string | — |
fieldNames | string[] | — |
Defined in packages/pdf/src/forms/types.ts:247
FormSyncinterface#
interface FormSync| Property | Type | Description |
|---|---|---|
receive() | (operations: FormSyncOperation | FormSyncOperation[]) => void | — |
merge() | (snapshot: FormSyncSnapshot) => void | — |
snapshot() | () => FormSyncSnapshot | — |
destroy() | () => void | — |
Defined in packages/pdf/src/annotations/sync-forms.ts:41
FormSyncConflictinterface#
interface FormSyncConflict| Property | Type | Description |
|---|---|---|
field | string | — |
operation | FormSyncOperation | — |
winner | SyncClock | — |
Defined in packages/pdf/src/annotations/sync-forms.ts:14
FormSyncHostinterface#
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()optional | (field: string) => boolean | — |
Defined in packages/pdf/src/annotations/sync-forms.ts:20
FormSyncOperationinterface#
interface FormSyncOperation| Property | Type | Description |
|---|---|---|
id | string | — |
kind | 'set' | — |
field | string | — |
value | FormSyncValue | — |
author | string | — |
clock | SyncClock | — |
Defined in packages/pdf/src/annotations/sync-forms.ts:5
FormSyncOptionsinterface#
interface FormSyncOptions| Property | Type | Description |
|---|---|---|
actorId | string | — |
send | (operations: FormSyncOperation[]) => void | — |
authoroptional | string | — |
onConflictoptional | (conflict: FormSyncConflict) => void | — |
snapshotoptional | FormSyncSnapshot | — |
Defined in packages/pdf/src/annotations/sync-forms.ts:27
FormSyncSnapshotinterface#
interface FormSyncSnapshot| Property | Type | Description |
|---|---|---|
version | 1 | — |
counter | number | — |
fields | { [field: string]: { clock: SyncClock; value: FormSyncValue } } | — |
Defined in packages/pdf/src/annotations/sync-forms.ts:35
GeneralNameinterface#
interface GeneralNameDefined in packages/pdf/src/signatures/x509.ts:92
HeaderFooterOptionsinterface#
interface HeaderFooterOptions| Property | Type | Description |
|---|---|---|
headeroptional | HeaderFooterSlots | — |
footeroptional | HeaderFooterSlots | — |
marginoptional | number | PageMargins | — |
fontSizeoptional | number | — |
coloroptional | string | — |
fontoptional | StandardFont | — |
startNumberoptional | number | — |
totalPagesoptional | number | — |
rangeoptional | { from?: number; to?: number } | — |
dateoptional | Date | string | — |
fileNameoptional | string | — |
fontsoptional | FontRegistry | — |
layerKindoptional | 'header' | 'footer' | 'pageNumbers' | How the stamped text is marked in the page content; header and footer by default. |
Defined in packages/pdf/src/tools/stamping.ts:54
HeaderFooterSlotsinterface#
interface HeaderFooterSlotsDefined in packages/pdf/src/tools/stamping.ts:41
ImageEditResultinterface#
interface ImageEditResult| Property | Type | Description |
|---|---|---|
ok | boolean | — |
reasonoptional | ContentEditFailure | — |
messageoptional | string | — |
nameoptional | string | — |
refoptional | PdfRef | — |
rectoptional | PdfRect | — |
imageoptional | PageImage | — |
Defined in packages/pdf/src/content-edit/types.ts:118
ImagePageInputinterface#
interface ImagePageInputDefined in packages/pdf/src/tools/images.ts:22
ImagesToPdfOptionsinterface#
interface ImagesToPdfOptions| Property | Type | Description |
|---|---|---|
pageSizeoptional | ImagePageSize | — |
marginoptional | number | — |
fitoptional | 'contain' | 'cover' | 'none' | — |
dpioptional | number | — |
metadataoptional | { title?: string; author?: string; subject?: string; keywords?: string; creator?: string } | — |
decodeImageoptional | ImageDecoder | — |
Defined in packages/pdf/src/tools/images.ts:29
ImposeOptionsinterface#
interface ImposeOptions| Property | Type | Description |
|---|---|---|
layout | 'n-up' | 'booklet' | — |
columnsoptional | number | — |
rowsoptional | number | — |
sheetSizeoptional | { width: number; height: number } | — |
marginoptional | number | — |
gutteroptional | number | — |
rightToLeftoptional | boolean | — |
passwordoptional | string | — |
Defined in packages/pdf/src/tools/impose.ts:9
InterleaveOptionsinterface#
interface InterleaveOptions| Property | Type | Description |
|---|---|---|
reverseSecondoptional | boolean | — |
Defined in packages/pdf/src/document/session-page-tools.ts:61
JpegDecodeOptionsinterface#
interface JpegDecodeOptions| Property | Type | Description |
|---|---|---|
colorTransformoptional | boolean | — |
maxPixelsoptional | number | — |
Defined in packages/pdf/src/pdf/jpeg.ts:28
JpegImageinterface#
interface JpegImage| Property | Type | Description |
|---|---|---|
width | number | — |
height | number | — |
components | 1 | 3 | 4 | — |
data | Uint8Array | — |
isProgressive | boolean | — |
hasAdobeMarker | boolean | — |
colorTransform | boolean | — |
planes | JpegPlane[] | — |
Defined in packages/pdf/src/pdf/jpeg.ts:17
KeystrokeResultinterface#
interface KeystrokeResult| Property | Type | Description |
|---|---|---|
isAccepted | boolean | — |
value | string | — |
selStart | number | — |
selEnd | number | — |
keyoptional | FormMessageKey | — |
Defined in packages/pdf/src/forms/types.ts:191
LinearizeOptionsinterface#
interface LinearizeOptions| Property | Type | Description |
|---|---|---|
recompressoptional | boolean | — |
Defined in packages/pdf/src/tools/linearize.ts:327
LinkDestinationinterface#
interface LinkDestination| Property | Type | Description |
|---|---|---|
pageIndex | number | — |
fitoptional | LinkFit | — |
leftoptional | number | — |
topoptional | number | — |
rightoptional | number | — |
bottomoptional | number | — |
zoomoptional | number | — |
Defined in packages/pdf/src/annotations/types.ts:88
MailAddressinterface#
interface MailAddressDefined in packages/pdf/src/formats/mail/types.ts:10
MailAttachmentinterface#
interface MailAttachment| Property | Type | Description |
|---|---|---|
fileName | string | — |
mimeType | string | — |
data | Uint8Array | — |
contentIdoptional | string | — |
isInline | boolean | — |
embeddedMessageoptional | MailMessage | — |
Defined in packages/pdf/src/formats/mail/types.ts:20
MailConversioninterface#
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. |
Defined in packages/pdf/src/formats/mail/convert.ts:7
MailFileHintinterface#
interface MailFileHintDefined in packages/pdf/src/formats/mail/detect.ts:3
MailHeaderinterface#
interface MailHeaderDefined in packages/pdf/src/formats/mail/types.ts:15
MailMessageinterface#
interface MailMessage| Property | Type | Description |
|---|---|---|
format | MailFormat | — |
subject | string | — |
fromoptional | MailAddress | — |
to | MailAddress[] | — |
cc | MailAddress[] | — |
bcc | MailAddress[] | — |
sentAtoptional | Date | — |
text | string | — |
html | string | — |
headers | MailHeader[] | — |
attachments | MailAttachment[] | — |
Defined in packages/pdf/src/formats/mail/types.ts:29
MailOriginalFileinterface#
interface MailOriginalFileDefined in packages/pdf/src/formats/mail/mail-to-pdf.ts:39
MailPdfLabelsinterface#
interface MailPdfLabels| Property | Type | Description |
|---|---|---|
subject | string | — |
from | string | — |
to | string | — |
cc | string | — |
bcc | string | — |
sent | string | — |
attachments | string | — |
noSubject | string | — |
image | string | — |
Defined in packages/pdf/src/formats/mail/mail-to-pdf.ts:27
MailPdfResultinterface#
interface MailPdfResult| Property | Type | Description |
|---|---|---|
bytes | PdfBytes | — |
pageCount | number | — |
substitutedCharacters | number | — |
attachmentNames | string[] | — |
warnings | MailPdfWarning[] | — |
Defined in packages/pdf/src/formats/mail/mail-to-pdf.ts:72
MailPdfWarninginterface#
interface MailPdfWarning| Property | Type | Description |
|---|---|---|
code | MailPdfWarningCode | — |
message | string | — |
count | number | — |
Defined in packages/pdf/src/formats/mail/mail-to-pdf.ts:66
MailToPdfOptionsinterface#
interface MailToPdfOptions| Property | Type | Description |
|---|---|---|
pageSizeoptional | MailPageSize | — |
marginoptional | number | PageMargins | — |
fontSizeoptional | number | — |
fontsoptional | FontRegistry | readonly PdfFontSource[] | — |
fontFallbackoptional | PdfFontFallback | — |
allowMissingGlyphsoptional | boolean | — |
includeAttachmentsoptional | boolean | — |
attachOriginaloptional | Uint8Array | MailOriginalFile | — |
preferPlainTextoptional | boolean | — |
labelsoptional | Partial<MailPdfLabels> | — |
formatDateoptional | (date: Date) => string | — |
Defined in packages/pdf/src/formats/mail/mail-to-pdf.ts:44
MeasureDetailsinterface#
interface MeasureDetails| Property | Type | Description |
|---|---|---|
type | PdfAnnotation['type'] | — |
value | number | — |
unit | string | — |
text | string | — |
lengthoptional | number | — |
perimeteroptional | number | — |
areaoptional | number | — |
radiusoptional | number | — |
angleoptional | number | — |
countoptional | number | — |
Defined in packages/pdf/src/annotations/geometry.ts:546
MeasureScaleinterface#
interface MeasureScaleDefined in packages/pdf/src/annotations/types.ts:61
MergeFileInputinterface#
interface MergeFileInput| Property | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
nameoptional | string | — |
pagesoptional | string | readonly number[] | — |
passwordoptional | string | — |
Defined in packages/pdf/src/document/session-page-tools.ts:32
MergeFilesOptionsinterface#
interface MergeFilesOptions| Property | Type | Description |
|---|---|---|
atoptional | number | — |
bookmarkPerFileoptional | boolean | — |
keepBookmarksoptional | boolean | — |
keepFormFieldsoptional | boolean | — |
signaloptional | AbortSignal | — |
onProgressoptional | (progress: MergeProgress) => void | Promise<void> | — |
Defined in packages/pdf/src/document/session-page-tools.ts:45
MergeFilesResultinterface#
interface MergeFilesResult| Property | Type | Description |
|---|---|---|
at | number | — |
pageCount | number | — |
documentIndexes | number[] | — |
renamedFields | { from: string; to: string }[] | — |
Defined in packages/pdf/src/document/session-page-tools.ts:54
MergePdfsOptionsinterface#
interface MergePdfsOptions extends Omit<MergeFilesOptions, 'at'>| Property | Type | Description |
|---|---|---|
decodeImageoptional | ImageDecoder | — |
bookmarkPerFileoptional | boolean | undefined | Inherited from MergeFilesOptions. |
keepBookmarksoptional | boolean | undefined | Inherited from MergeFilesOptions. |
keepFormFieldsoptional | boolean | undefined | Inherited from MergeFilesOptions. |
signaloptional | AbortSignal | undefined | Inherited from MergeFilesOptions. |
onProgressoptional | ((progress: MergeProgress) => void | Promise<void>) | undefined | Inherited from MergeFilesOptions. |
Defined in packages/pdf/src/tools/merge.ts:26
MergeProgressinterface#
interface MergeProgressDefined in packages/pdf/src/document/session-page-tools.ts:39
MissingGlyphReportinterface#
interface MissingGlyphReport| Property | Type | Description |
|---|---|---|
characters | string | — |
scripts | TextScript[] | — |
Defined in packages/pdf/src/fonts/missing-glyphs.ts:3
NameConstraintsinterface#
interface NameConstraints| Property | Type | Description |
|---|---|---|
permitted | GeneralName[] | — |
excluded | GeneralName[] | — |
Defined in packages/pdf/src/signatures/x509.ts:97
NamedDestinationinterface#
interface NamedDestination extends LinkDestination| Property | Type | Description |
|---|---|---|
name | string | — |
pageIndex | number | Inherited from LinkDestination. |
fitoptional | LinkFit | undefined | Inherited from LinkDestination. |
leftoptional | number | undefined | Inherited from LinkDestination. |
topoptional | number | undefined | Inherited from LinkDestination. |
rightoptional | number | undefined | Inherited from LinkDestination. |
bottomoptional | number | undefined | Inherited from LinkDestination. |
zoomoptional | number | undefined | Inherited from LinkDestination. |
Defined in packages/pdf/src/annotations/types.ts:106
ObjectEditResultinterface#
interface ObjectEditResult| Property | Type | Description |
|---|---|---|
ok | boolean | — |
reasonoptional | ContentEditFailure | — |
messageoptional | string | — |
objectoptional | PageObject | — |
Defined in packages/pdf/src/content-edit/types.ts:91
OcrPageImageinterface#
interface OcrPageImageDefined in packages/pdf/src/content-edit/text-layer.ts:29
OcrWordinterface#
interface OcrWordDefined in packages/pdf/src/content-edit/text-layer.ts:24
OfficeExportOptionsinterface#
interface OfficeExportOptions| Property | Type | Description |
|---|---|---|
pagesoptional | readonly number[] | Pages to export, zero-based. Default: every page. |
titleoptional | string | — |
Defined in packages/pdf/src/tools/export-office.ts:22
OfficeExportSourceinterface#
interface OfficeExportSource| Property | Type | Description |
|---|---|---|
pageCountreadonly | number | — |
getStructuredText() | (pageIndex: number) => PageTextStructure | — |
Defined in packages/pdf/src/tools/export-office.ts:17
OfficeRuninterface#
interface OfficeRunDefined in packages/pdf/src/tools/export-office.ts:5
OpenPdfOptionsinterface#
interface OpenPdfOptions| Property | Type | Description |
|---|---|---|
limitsoptional | Partial<PdfLimits> | — |
fontFallbackoptional | PdfFontFallback | — |
allowMissingGlyphsoptional | 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. |
textRasterizeroptional | PdfTextRasterizer | Draws annotation text no font covers as an image. The viewer sets one that uses the fonts of the browser. |
authoroptional | string | — |
createIdoptional | () => string | — |
nowoptional | () => Date | — |
annotationDefaultsoptional | Partial<Record<AnnotationType, Partial<AnnotationDefaults>>> | — |
historyLimitoptional | number | — |
readAnnotationsoptional | boolean | — |
annotationScopeoptional | 'markup' | 'all' | — |
passwordoptional | string | — |
fontsoptional | PdfFontSource[] | — |
decodeImageoptional | ImageDecoder | — |
ignorePermissionsoptional | boolean | — |
authorIdoptional | string | — |
Defined in packages/pdf/src/document/session-types.ts:96
OptimizeImageOptionsinterface#
interface OptimizeImageOptions| Property | Type | Description |
|---|---|---|
maxDpi | number | — |
jpegQualityoptional | number | — |
Defined in packages/pdf/src/tools/downsample.ts:7
OptimizeOptionsinterface#
interface OptimizeOptions| Property | Type | Description |
|---|---|---|
keepVerbatimoptional | boolean | False serialises every object anew, so the output has one spelling of stream and object syntax. |
objectStreamsoptional | boolean | — |
dedupeoptional | boolean | — |
removeUnusedoptional | boolean | — |
recompressoptional | boolean | — |
transformoptional | ObjectTransform | — |
imagesoptional | OptimizeImageOptions | — |
fontsoptional | boolean | — |
Defined in packages/pdf/src/tools/optimize.ts:21
OptimizeReportinterface#
interface OptimizeReport extends Partial<DownsampleReport>, Partial<FontSubsetReport>| Property | Type | Description |
|---|---|---|
before | number | — |
after | number | — |
objectsBefore | number | — |
objectsAfter | number | — |
duplicatesMerged | number | — |
imagesDownsampledoptional | number | undefined | Inherited from DownsampleReport. |
imagesKeptoptional | number | undefined | Inherited from DownsampleReport. |
fontsSubsetoptional | number | undefined | Inherited from FontSubsetReport. |
fontsKeptoptional | number | undefined | Inherited from FontSubsetReport. |
fontBytesBeforeoptional | number | undefined | Inherited from FontSubsetReport. |
fontBytesAfteroptional | number | undefined | Inherited from FontSubsetReport. |
Defined in packages/pdf/src/tools/optimize.ts:33
OptimizeResultinterface#
interface OptimizeResult| Property | Type | Description |
|---|---|---|
bytes | PdfBytes | — |
report | OptimizeReport | — |
Defined in packages/pdf/src/tools/optimize.ts:41
OutlineIteminterface#
interface OutlineItem| Property | Type | Description |
|---|---|---|
title | string | — |
pageIndexoptional | number | — |
leftoptional | number | — |
topoptional | number | — |
zoomoptional | number | — |
urioptional | string | — |
isOpenoptional | boolean | — |
coloroptional | string | — |
isBoldoptional | boolean | — |
isItalicoptional | boolean | — |
childrenoptional | OutlineItem[] | — |
Defined in packages/pdf/src/tools/outline.ts:19
PageBoxesinterface#
interface PageBoxesDefined in packages/pdf/src/tools/page-boxes.ts:150
PageDecorationinterface#
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. |
optionsoptional | Record<string, unknown> | — |
Defined in packages/pdf/src/document/session-document-tools.ts:71
PageGeometryinterface#
interface PageGeometry| Property | Type | Description |
|---|---|---|
points | PdfPoint[] | — |
segments | PdfSegment[] | — |
baselines | PdfSegment[] | — |
textBoxes | PageTextBox[] | — |
isTruncated | boolean | — |
Defined in packages/pdf/src/content/geometry.ts:18
PageGeometryOptionsinterface#
interface PageGeometryOptions| Property | Type | Description |
|---|---|---|
maxPointsoptional | number | — |
maxSegmentsoptional | number | — |
maxTextRunsoptional | number | — |
boundsoptional | PdfRect | — |
includeTextoptional | boolean | — |
includePathsoptional | boolean | — |
includeImagesoptional | boolean | — |
Defined in packages/pdf/src/content/geometry.ts:26
PageImageinterface#
interface PageImage| Property | Type | Description |
|---|---|---|
id | string | — |
index | number | — |
name | string | — |
refoptional | PdfRef | — |
rect | PdfRect | — |
quad | [PdfPoint, PdfPoint, PdfPoint, PdfPoint] | — |
matrix | Matrix | — |
width | number | — |
height | number | — |
filteroptional | string | — |
format | PageImageFormat | — |
bitsPerComponent | number | — |
colorSpaceoptional | string | — |
isMask | boolean | — |
hasAlpha | boolean | — |
opacity | number | Constant opacity set next to the image, 1 when none. |
cropoptional | [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. |
Defined in packages/pdf/src/content-edit/types.ts:44
PageLabelRangeinterface#
interface PageLabelRange| Property | Type | Description |
|---|---|---|
startPage | number | — |
style | PageLabelStyle | — |
prefixoptional | string | — |
startoptional | number | — |
Defined in packages/pdf/src/tools/page-labels.ts:8
PageMarginsinterface#
interface PageMargins| Property | Type | Description |
|---|---|---|
topoptional | number | — |
bottomoptional | number | — |
leftoptional | number | — |
rightoptional | number | — |
Defined in packages/pdf/src/tools/stamping.ts:47
PageNumberOptionsinterface#
interface PageNumberOptions| Property | Type | Description |
|---|---|---|
formatoptional | string | — |
positionoptional | PageNumberPosition | — |
startNumberoptional | number | — |
pagesoptional | number[] | — |
fontSizeoptional | number | — |
coloroptional | string | — |
marginoptional | number | — |
fontoptional | StandardFont | — |
fontsoptional | FontRegistry | — |
Defined in packages/pdf/src/document/session-page-tools.ts:20
PageObjectinterface#
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 | — |
hasClipoptional | boolean | — |
isInvisibleoptional | boolean | — |
layeroptional | PageObjectLayer | — |
Defined in packages/pdf/src/content-edit/types.ts:72
PageRedactionImageinterface#
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. |
colorSpaceoptional | string | undefined | Inherited from RedactionImageInfo. |
isMask | boolean | Inherited from RedactionImageInfo. |
decodeoptional | number[] | undefined | Inherited from RedactionImageInfo. |
decodeParmsoptional | Record<string, number | boolean> | undefined | Inherited from RedactionImageInfo. |
jbig2Globalsoptional | Uint8Array<ArrayBufferLike> | undefined | Inherited from RedactionImageInfo. |
Defined in packages/pdf/src/document/session-types.ts:160
PageSyncinterface#
interface PageSync| Property | Type | Description |
|---|---|---|
receive() | (operations: PageSyncOperation | PageSyncOperation[]) => void | — |
merge() | (snapshot: PageSyncSnapshot) => void | — |
snapshot() | () => PageSyncSnapshot | — |
pageIds() | () => (string | undefined)[] | — |
destroy() | () => void | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:69
PageSyncConflictinterface#
interface PageSyncConflict| Property | Type | Description |
|---|---|---|
pageId | string | — |
reason | 'older-write' | 'removed' | — |
operation | PageSyncOperation | — |
winner | SyncClock | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:21
PageSyncHostinterface#
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 | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:37
PageSyncOperationinterface#
interface PageSyncOperation| Property | Type | Description |
|---|---|---|
id | string | — |
kind | PageSyncOperationKind | — |
pageId | string | — |
positionoptional | string | — |
rotationoptional | number | — |
sizeoptional | PageSyncSize | — |
author | string | — |
clock | SyncClock | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:10
PageSyncOptionsinterface#
interface PageSyncOptions| Property | Type | Description |
|---|---|---|
actorId | string | — |
send | (operations: PageSyncOperation[]) => void | — |
authoroptional | string | — |
onConflictoptional | (conflict: PageSyncConflict) => void | — |
onApplyoptional | () => void | — |
snapshotoptional | PageSyncSnapshot | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:46
PageSyncPageinterface#
interface PageSyncPage| Property | Type | Description |
|---|---|---|
key | number | string | — |
kind | string | — |
sourceIndex | number | — |
rotation | number | — |
width | number | — |
height | number | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:28
PageSyncSizeinterface#
interface PageSyncSizeDefined in packages/pdf/src/annotations/sync-pages.ts:5
PageSyncSnapshotinterface#
interface PageSyncSnapshot| Property | Type | Description |
|---|---|---|
version | 1 | — |
counter | number | — |
pages | PageSyncSnapshotEntry[] | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:63
PageSyncSnapshotEntryinterface#
interface PageSyncSnapshotEntry| Property | Type | Description |
|---|---|---|
id | string | — |
positionoptional | { clock: SyncClock; value: string } | — |
rotationoptional | { clock: SyncClock; value: number } | — |
removedoptional | SyncClock | — |
sizeoptional | PageSyncSize | — |
Defined in packages/pdf/src/annotations/sync-pages.ts:55
PageTabOrderinterface#
interface PageTabOrder| Property | Type | Description |
|---|---|---|
pageIndex | number | — |
mode | TabOrderMode | — |
widgets | TabOrderEntry[] | — |
Defined in packages/pdf/src/forms/types.ts:35
PageTextBoxinterface#
interface PageTextBoxDefined in packages/pdf/src/content/geometry.ts:13
PageTextIteminterface#
interface PageTextItem| Property | Type | Description |
|---|---|---|
text | string | — |
rect | PdfRect | — |
quad | PdfQuad | — |
baseline | [PdfPoint, PdfPoint] | — |
fontNameoptional | string | — |
fontSize | number | — |
isBold | boolean | — |
isItalic | boolean | — |
rotation | number | — |
direction | PageTextDirection | — |
lineIndex | number | — |
hasSpaceAfter | boolean | — |
charQuadsoptional | PdfQuad[] | — |
Defined in packages/pdf/src/content/structured-text.ts:17
PageTextLineinterface#
interface PageTextLine| Property | Type | Description |
|---|---|---|
text | string | — |
rect | PdfRect | — |
quad | PdfQuad | — |
baseline | [PdfPoint, PdfPoint] | — |
fontSize | number | — |
rotation | number | — |
direction | PageTextDirection | — |
items | PageTextItem[] | — |
Defined in packages/pdf/src/content/structured-text.ts:33
PageTextStructureinterface#
interface PageTextStructure| Property | Type | Description |
|---|---|---|
text | string | — |
lines | PageTextLine[] | — |
items | PageTextItem[] | — |
sequenceoptional | (PageTextLine | PageTextMark)[] | With markedContent and content order: lines and marked-content boundaries as they follow each other. |
Defined in packages/pdf/src/content/structured-text.ts:50
ParagraphEditOptionsinterface#
interface ParagraphEditOptions| Property | Type | Description |
|---|---|---|
fontsoptional | FontRegistry | — |
widthoptional | number | — |
pushBelowoptional | boolean | Move the text, images and shapes under the paragraph down when it needs more lines than before. |
Defined in packages/pdf/src/content-edit/paragraphs.ts:42
ParagraphEditResultinterface#
interface ParagraphEditResult extends TextEditResult| Property | Type | Description |
|---|---|---|
linesoptional | string[] | — |
rectoptional | PdfRect | — |
overflowoptional | number | — |
pushedoptional | number | How many objects under the paragraph were moved down to make room. |
ok | boolean | Inherited from TextEditResult. |
reasonoptional | ContentEditFailure | undefined | Inherited from TextEditResult. |
messageoptional | string | undefined | Inherited from TextEditResult. |
usedFontoptional | "original" | "embedded" | "standard" | undefined | Inherited from TextEditResult. |
fontNamesoptional | string[] | undefined | Inherited from TextEditResult. |
missingoptional | string | undefined | Inherited from TextEditResult. |
widthChangeoptional | number | undefined | Inherited from TextEditResult. |
Defined in packages/pdf/src/content-edit/paragraphs.ts:49
PdfAConversionOptionsinterface#
interface PdfAConversionOptions| Property | Type | Description |
|---|---|---|
keepAttachmentsoptional | boolean | — |
fontsoptional | Readonly<Record<string, Uint8Array>> | — |
Defined in packages/pdf/src/tools/pdfa.ts:15
PdfAConversionResultinterface#
interface PdfAConversionResult| Property | Type | Description |
|---|---|---|
bytes | PdfBytes | — |
isConformant | boolean | — |
removed | string[] | — |
remaining | ArchiveFinding[] | — |
fonts | PdfAFontReplacement[] | — |
validation | PdfAValidation | — |
Defined in packages/pdf/src/tools/pdfa.ts:20
PdfAFontReplacementinterface#
interface PdfAFontReplacement| Property | Type | Description |
|---|---|---|
name | string | — |
replacement | string | — |
glyphs | number | — |
mismatchedWidths | number | — |
Defined in packages/pdf/src/tools/pdfa-fonts.ts:10
PdfAnnotationinterface#
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 | — |
contentsoptional | string | — |
repliesoptional | AnnotationReply[] | — |
statusoptional | ReviewStatus | — |
statusAuthoroptional | string | — |
statusModifiedAtoptional | string | — |
replacedQuadPointsoptional | number[] | — |
fillColoroptional | string | — |
dashedoptional | boolean | — |
borderStyleoptional | BorderStyle | — |
rotationoptional | number | — |
quadPointsoptional | number[] | — |
inkListoptional | PdfPoint[][] | — |
verticesoptional | PdfPoint[] | — |
lineoptional | [PdfPoint, PdfPoint] | — |
lineEndingsoptional | [LineEnding, LineEnding] | — |
textoptional | string | — |
fontSizeoptional | number | — |
fontColoroptional | string | — |
textAlignoptional | 'left' | 'center' | 'right' | — |
fontFamilyoptional | AnnotationFont | — |
calloutLineoptional | PdfPoint[] | — |
groupIdoptional | string | — |
iconoptional | NoteIcon | — |
stampoptional | BuiltInStamp | string | — |
stampLabeloptional | string | — |
imageoptional | AnnotationImage | — |
signatureKindoptional | 'drawn' | 'typed' | 'image' | — |
measureScaleoptional | MeasureScale | — |
overlayTextoptional | string | — |
urloptional | string | — |
destinationPageoptional | number | — |
isLockedoptional | boolean | — |
isReadOnlyoptional | boolean | — |
isContentsLockedoptional | boolean | — |
isNoViewoptional | boolean | — |
isPrintableoptional | boolean | — |
richTextoptional | RichTextParagraph[] | — |
actionoptional | LinkAction | — |
highlightModeoptional | LinkHighlightMode | — |
labeloptional | string | — |
iconNameoptional | string | — |
attachmentoptional | AnnotationAttachment | — |
customDataoptional | Record<string, unknown> | — |
Defined in packages/pdf/src/annotations/types.ts:129
PdfAttachmentinterface#
interface PdfAttachment extends FileSpecInfo| Property | Type | Description |
|---|---|---|
source | 'document' | 'annotation' | — |
pageIndexoptional | number | — |
name | string | Inherited from FileSpecInfo. |
descriptionoptional | string | undefined | Inherited from FileSpecInfo. |
mimeTypeoptional | string | undefined | Inherited from FileSpecInfo. |
size | number | Inherited from FileSpecInfo. |
createdoptional | Date | undefined | Inherited from FileSpecInfo. |
modifiedoptional | Date | undefined | Inherited from FileSpecInfo. |
relationshipoptional | AttachmentRelationship | undefined | Inherited from FileSpecInfo. |
checksumoptional | string | undefined | Inherited from FileSpecInfo. |
isChecksumValidoptional | boolean | undefined | Inherited from FileSpecInfo. |
data | Uint8Array<ArrayBufferLike> | Inherited from FileSpecInfo. |
Defined in packages/pdf/src/tools/attachments.ts:25
PdfAValidationinterface#
interface PdfAValidation| Property | Type | Description |
|---|---|---|
profile | 'PDF/A-2b' | — |
validator | 'built-in' | — |
isValid | boolean | — |
violations | PdfAViolation[] | — |
rulesChecked | PdfARule[] | — |
Defined in packages/pdf/src/tools/pdfa-validate.ts:35
PdfAViolationinterface#
interface PdfAViolation| Property | Type | Description |
|---|---|---|
rule | PdfARule | — |
clause | string | — |
severity | 'error' | 'warning' | — |
message | string | — |
pageIndexoptional | number | — |
objectoptional | number | — |
Defined in packages/pdf/src/tools/pdfa-validate.ts:26
PdfCertificateInfointerface#
interface PdfCertificateInfo| Property | Type | Description |
|---|---|---|
subject | PdfDistinguishedName | — |
issuer | PdfDistinguishedName | — |
serialNumber | string | — |
notBefore | string | — |
notAfter | string | — |
publicKeyAlgorithm | 'RSA' | 'EC' | 'unknown' | — |
publicKeyBitsoptional | number | — |
curveoptional | 'P-256' | 'P-384' | 'P-521' | — |
isCertificateAuthority | boolean | — |
isSelfIssued | boolean | — |
der | Uint8Array | — |
revocationoptional | RevocationStatus | — |
revocationDetailsoptional | PdfRevocationDetails | — |
Defined in packages/pdf/src/signatures/x509.ts:36
PdfCertificationInfointerface#
interface PdfCertificationInfo| Property | Type | Description |
|---|---|---|
level | 1 | 2 | 3 | — |
permission | PdfCertificationPermission | — |
Defined in packages/pdf/src/signatures/fields.ts:81
PdfCollectioninterface#
interface PdfCollection| Property | Type | Description |
|---|---|---|
view | PdfCollectionView | — |
initialDocumentoptional | string | — |
fields | PdfCollectionField[] | — |
sortoptional | PdfCollectionSort[] | — |
items | PdfCollectionItem[] | — |
Defined in packages/pdf/src/tools/attachments.ts:66
PdfCollectionFieldinterface#
interface PdfCollectionField| Property | Type | Description |
|---|---|---|
key | string | — |
name | string | — |
type | PdfCollectionFieldType | — |
order | number | — |
isVisible | boolean | — |
Defined in packages/pdf/src/tools/attachments.ts:49
PdfCollectionIteminterface#
interface PdfCollectionItem extends PdfAttachment| Property | Type | Description |
|---|---|---|
values | Record<string, PdfCollectionValue> | — |
source | "document" | "annotation" | Inherited from PdfAttachment. |
pageIndexoptional | number | undefined | Inherited from PdfAttachment. |
name | string | Inherited from FileSpecInfo. |
descriptionoptional | string | undefined | Inherited from FileSpecInfo. |
mimeTypeoptional | string | undefined | Inherited from FileSpecInfo. |
size | number | Inherited from FileSpecInfo. |
createdoptional | Date | undefined | Inherited from FileSpecInfo. |
modifiedoptional | Date | undefined | Inherited from FileSpecInfo. |
relationshipoptional | AttachmentRelationship | undefined | Inherited from FileSpecInfo. |
checksumoptional | string | undefined | Inherited from FileSpecInfo. |
isChecksumValidoptional | boolean | undefined | Inherited from FileSpecInfo. |
data | Uint8Array<ArrayBufferLike> | Inherited from FileSpecInfo. |
Defined in packages/pdf/src/tools/attachments.ts:62
PdfCollectionSortinterface#
interface PdfCollectionSort| Property | Type | Description |
|---|---|---|
key | string | — |
isAscending | boolean | — |
Defined in packages/pdf/src/tools/attachments.ts:57
PdfComparisoninterface#
interface PdfComparison| Property | Type | Description |
|---|---|---|
pages | PdfPageComparison[] | — |
changes | PdfTextChange[] | — |
summary | PdfComparisonSummary | — |
annotationsoptional | { a: AnnotationInput[]; b: AnnotationInput[] } | — |
Defined in packages/pdf/src/compare/types.ts:42
PdfComparisonSummaryinterface#
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 | — |
Defined in packages/pdf/src/compare/types.ts:25
PdfDistinguishedNameinterface#
interface PdfDistinguishedName| Property | Type | Description |
|---|---|---|
text | string | — |
commonNameoptional | string | — |
organizationoptional | string | — |
organizationalUnitoptional | string | — |
countryoptional | string | — |
emailoptional | string | — |
Defined in packages/pdf/src/signatures/x509.ts:27
PdfDocumentinterface#
interface PdfDocument| Property | Type | Description |
|---|---|---|
pageCountreadonly | number | — |
isModifiedreadonly | boolean | — |
isEncryptedreadonly | boolean | — |
isLockedreadonly | boolean | — |
hasSignaturesreadonly | boolean | — |
certificationreadonly | PdfCertificationInfo | undefined | — |
permissionsreadonly | PdfPermissions | — |
encryptionreadonly | 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[]> | — |
Defined in packages/pdf/src/document/headless.ts:127
PdfDocumentEventsinterface#
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 } | — |
Defined in packages/pdf/src/document/session-types.ts:62
PdfEncryptionInfointerface#
interface PdfEncryptionInfo| Property | Type | Description |
|---|---|---|
algorithm | EncryptionAlgorithm | — |
revision | number | — |
isOwner | boolean | — |
encryptsMetadata | boolean | — |
Defined in packages/pdf/src/document/session-types.ts:126
PdfFigureinterface#
interface PdfFigure| Property | Type | Description |
|---|---|---|
id | string | Stable while the structure tree is not rewritten: the object number of the structure element. |
pageIndexoptional | number | — |
alternateTextoptional | string | — |
actualTextoptional | string | — |
rectoptional | PdfRect | — |
Defined in packages/pdf/src/tools/accessibility.ts:40
PdfFontSourceinterface#
interface PdfFontSourceDefined in packages/pdf/src/fonts/registry.ts:20
PdfFormFieldinterface#
interface PdfFormField| Property | Type | Description |
|---|---|---|
name | string | — |
type | FormFieldType | — |
value | FormValue | — |
defaultValue | FormValue | — |
widgets | FormFieldWidget[] | — |
optionsoptional | FormFieldOption[] | — |
tooltipoptional | string | — |
isReadOnly | boolean | — |
isRequired | boolean | — |
isMultilineoptional | boolean | — |
isPasswordoptional | boolean | — |
isComboptional | boolean | — |
maxLengthoptional | number | — |
isMultiSelectoptional | boolean | — |
isEditableoptional | boolean | — |
alignmentoptional | 'left' | 'center' | 'right' | — |
fontSizeoptional | number | — |
borderColoroptional | string | null | — |
backgroundColoroptional | string | null | — |
formatoptional | FieldFormat | — |
calculationoptional | FieldCalculation | — |
rangeoptional | FieldRange | — |
signatureoptional | SignatureInfo | — |
scriptsoptional | FieldScripts | — |
isNoExportoptional | boolean | — |
isNoToggleToOffoptional | boolean | — |
isRadiosInUnisonoptional | boolean | — |
isRichTextoptional | boolean | — |
richTextoptional | RichTextParagraph[] | — |
actionsoptional | FieldActionEntry[] | — |
signatureLockoptional | SignatureFieldLock | — |
barcodeoptional | BarcodeFieldInfo | — |
Defined in packages/pdf/src/forms/types.ts:80
PdfInitialViewinterface#
interface PdfInitialView| Property | Type | Description |
|---|---|---|
pageModeoptional | PdfInitialPageMode | — |
pageLayoutoptional | PdfInitialPageLayout | — |
openPageoptional | number | Page shown when the document opens, from 0. |
zoomoptional | number | 'fit-page' | 'fit-width' | Zoom when the document opens: a factor (1 is 100%) or a fit mode. |
displayDocTitleoptional | boolean | Show the document title instead of the file name in the window title. |
Defined in packages/pdf/src/tools/initial-view.ts:10
PdfLimitsinterface#
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 | — |
Defined in packages/pdf/src/pdf/limits.ts:1
PdfMetadatainterface#
interface PdfMetadata| Property | Type | Description |
|---|---|---|
titleoptional | string | — |
authoroptional | string | — |
subjectoptional | string | — |
keywordsoptional | string | — |
creatoroptional | string | — |
produceroptional | string | — |
createdoptional | Date | — |
modifiedoptional | Date | — |
trappedoptional | boolean | — |
custom | Record<string, string> | — |
xmpoptional | string | — |
Defined in packages/pdf/src/tools/metadata.ts:20
PdfMetadataPatchinterface#
interface PdfMetadataPatch| Property | Type | Description |
|---|---|---|
titleoptional | string | null | — |
authoroptional | string | null | — |
subjectoptional | string | null | — |
keywordsoptional | string | null | — |
creatoroptional | string | null | — |
produceroptional | string | null | — |
createdoptional | Date | null | — |
modifiedoptional | Date | null | — |
trappedoptional | boolean | null | — |
customoptional | Record<string, string | null> | — |
Defined in packages/pdf/src/tools/metadata.ts:34
PdfModificationReportinterface#
interface PdfModificationReport| Property | Type | Description |
|---|---|---|
status | 'none' | 'allowed' | 'disallowed' | 'unknown' | — |
changes | PdfRevisionChange[] | — |
warningsoptional | PdfModificationWarning[] | — |
Defined in packages/pdf/src/signatures/revisions.ts:38
PdfModificationWarninginterface#
interface PdfModificationWarning| Property | Type | Description |
|---|---|---|
code | 'annotation-covers-content' | — |
objectNumber | number | — |
pageIndex | number | — |
coveredRatio | number | — |
Defined in packages/pdf/src/signatures/revisions.ts:31
PdfPageComparisoninterface#
interface PdfPageComparison| Property | Type | Description |
|---|---|---|
status | PageComparisonStatus | — |
pageIndexAoptional | number | — |
pageIndexBoptional | number | — |
similarity | number | — |
changes | PdfTextChange[] | — |
Defined in packages/pdf/src/compare/types.ts:17
PdfPageSummaryinterface#
interface PdfPageSummary| Property | Type | Description |
|---|---|---|
index | number | — |
width | number | — |
height | number | — |
rotation | number | — |
box | PdfRect | — |
kind | PageSourceKind | — |
sourceIndex | number | — |
documentIndex | number | — |
key | number | — |
Defined in packages/pdf/src/document/session-types.ts:22
PdfPermissionsinterface#
interface PdfPermissions| Property | Type | Description |
|---|---|---|
print | boolean | — |
printHighQuality | boolean | — |
modify | boolean | — |
copy | boolean | — |
annotate | boolean | — |
fillForms | boolean | — |
extractForAccessibility | boolean | — |
assemble | boolean | — |
Defined in packages/pdf/src/security/standard.ts:10
PdfPointinterface#
interface PdfPointDefined in packages/pdf/src/annotations/types.ts:3
PdfRevisionChangeinterface#
interface PdfRevisionChange| Property | Type | Description |
|---|---|---|
objectNumber | number | — |
change | 'added' | 'changed' | 'removed' | — |
kind | RevisionChangeKind | — |
ownerObjectNumberoptional | number | — |
pageIndexoptional | number | — |
coversContentoptional | boolean | — |
coveredRatiooptional | number | — |
Defined in packages/pdf/src/signatures/revisions.ts:21
PdfRevocationDetailsinterface#
interface PdfRevocationDetails| Property | Type | Description |
|---|---|---|
status | RevocationStatus | — |
sourceoptional | 'ocsp' | 'crl' | 'callback' | — |
revokedAtoptional | string | — |
reasonoptional | string | — |
thisUpdateoptional | string | — |
nextUpdateoptional | string | — |
Defined in packages/pdf/src/signatures/revocation.ts:25
PdfSignatureChaininterface#
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. |
Defined in packages/pdf/src/signatures/verify.ts:74
PdfSignatureTimestampinterface#
interface PdfSignatureTimestamp| Property | Type | Description |
|---|---|---|
timeoptional | string | — |
isValid | boolean | — |
authorityoptional | string | — |
policyoptional | string | — |
serialNumberoptional | string | — |
erroroptional | string | — |
chainoptional | PdfSignatureChain | — |
revocationoptional | RevocationStatus | — |
Defined in packages/pdf/src/signatures/verify.ts:81
PdfSignatureVerificationinterface#
interface PdfSignatureVerification| Property | Type | Description |
|---|---|---|
fieldName | string | — |
type | 'signature' | 'certification' | 'timestamp' | — |
subFilteroptional | string | — |
signerNameoptional | string | — |
reasonoptional | string | — |
locationoptional | string | — |
contactInfooptional | string | — |
signedAtoptional | string | — |
signedAtSourceoptional | 'timestamp' | 'signedAttribute' | 'dictionary' | — |
byteRange | number[] | — |
coversWholeFile | boolean | — |
laterChanges | 'none' | 'signatures-only' | 'allowed' | 'disallowed' | 'unknown' | — |
integrity | 'intact' | 'modified' | 'unsupported' | — |
signature | CheckResult | — |
signingCertificate | SigningCertificateCheck | — |
digestAlgorithmoptional | HashName | — |
signatureAlgorithmoptional | string | — |
certificateoptional | PdfCertificateInfo | — |
chain | PdfSignatureChain | — |
isCertificateValidAtSigningoptional | boolean | — |
isCertificateValidNowoptional | boolean | — |
revocation | RevocationStatus | — |
certificationLeveloptional | 1 | 2 | 3 | — |
certificationoptional | PdfCertificationPermission | — |
padesLeveloptional | PadesLevel | — |
modification | PdfModificationReport | — |
timestampoptional | PdfSignatureTimestamp | — |
isValid | boolean | — |
isTrusted | boolean | — |
summary | PdfSignatureSummary | — |
expiredTrustListsoptional | string[] | Names of the trust lists that were not used because they are past their expiry date. |
warnings | PdfSignatureWarning[] | — |
erroroptional | string | — |
Defined in packages/pdf/src/signatures/verify.ts:92
PdfSignatureWarninginterface#
interface PdfSignatureWarning| Property | Type | Description |
|---|---|---|
code | 'annotation-covers-content' | — |
message | string | — |
pageIndex | number | — |
objectNumber | number | — |
coveredRatio | number | — |
Defined in packages/pdf/src/signatures/verify.ts:129
PdfTextChangeinterface#
interface PdfTextChange| Property | Type | Description |
|---|---|---|
type | TextChangeType | — |
text | string | — |
pageIndexAoptional | number | — |
pageIndexBoptional | number | — |
rects | PdfRect[] | — |
fromRectsoptional | PdfRect[] | — |
wordCount | number | — |
Defined in packages/pdf/src/compare/types.ts:7
PdfTextRasterizerinterface#
interface PdfTextRasterizerDraws 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 | — |
Defined in packages/pdf/src/fonts/text-rasterizer.ts:24
PdfTrustListinterface#
interface PdfTrustList| Property | Type | Description |
|---|---|---|
name | string | — |
expires | Date | — |
issuedoptional | 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. |
Defined in packages/pdf/src/signatures/trust-list.ts:14
PdfTrustListInputinterface#
interface PdfTrustListInputA 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. |
issuedoptional | string | Date | — |
certificates | (string | Uint8Array)[] | PEM text (one or several certificates) or DER bytes. |
Defined in packages/pdf/src/signatures/trust-list.ts:5
Pkcs12Contentsinterface#
interface Pkcs12Contents| Property | Type | Description |
|---|---|---|
privateKey | Uint8Array | — |
privateKeyPem | string | — |
certificate | Uint8Array | — |
chain | Uint8Array[] | — |
friendlyNameoptional | string | — |
Defined in packages/pdf/src/signatures/pkcs12.ts:32
PrepareImageOptionsinterface#
interface PrepareImageOptions| Property | Type | Description |
|---|---|---|
decodeImageoptional | ImageDecoder | — |
mimeTypeoptional | string | — |
Defined in packages/pdf/src/formats/image/types.ts:14
PresenceStateinterface#
interface PresenceState| Property | Type | Description |
|---|---|---|
actorId | string | — |
name | string | — |
color | string | — |
pageIndexoptional | number | — |
pointoptional | PdfPoint | — |
selectionoptional | string[] | — |
viewPageIndexoptional | number | — |
Defined in packages/pdf/src/annotations/sync.ts:579
PresenceTrackerinterface#
interface PresenceTracker| Property | Type | Description |
|---|---|---|
receive() | (message: PresenceMessage) => void | — |
list() | () => PresenceState[] | — |
get() | (actorId: string) => PresenceState | undefined | — |
prune() | (now?: number) => string[] | — |
clear() | () => void | — |
Defined in packages/pdf/src/annotations/sync.ts:592
RasterizedTextinterface#
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. |
Defined in packages/pdf/src/fonts/text-rasterizer.ts:7
RasterTextStyleinterface#
interface RasterTextStyle| Property | Type | Description |
|---|---|---|
fontSize | number | — |
Defined in packages/pdf/src/fonts/text-rasterizer.ts:3
RecognizedPageinterface#
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. |
Defined in packages/pdf/src/document/session-types.ts:91
RecognizeTextOptionsinterface#
interface RecognizeTextOptions| Property | Type | Description |
|---|---|---|
recognizeText | RecognizeTextCallback | — |
pagesoptional | number[] | — |
includePagesWithTextoptional | boolean | — |
renderPageoptional | (pageIndex: number) => RenderedPageImage | undefined | Promise<RenderedPageImage | undefined> | — |
Defined in packages/pdf/src/document/session-types.ts:77
RedactionAreainterface#
interface RedactionArea| Property | Type | Description |
|---|---|---|
rect | PdfRect | — |
fillColoroptional | string | — |
overlayTextoptional | string | — |
Defined in packages/pdf/src/redaction/redact.ts:33
RedactionImageInfointerface#
interface RedactionImageInfo| Property | Type | Description |
|---|---|---|
data | Uint8Array | — |
filter | string | — |
width | number | — |
height | number | — |
bitsPerComponent | number | — |
colorSpaceoptional | string | — |
isMask | boolean | — |
decodeoptional | number[] | — |
decodeParmsoptional | Record<string, number | boolean> | — |
jbig2Globalsoptional | Uint8Array | — |
Defined in packages/pdf/src/redaction/images.ts:11
RedactionImageOutcomeinterface#
interface RedactionImageOutcome| Property | Type | Description |
|---|---|---|
name | string | — |
action | 'modified' | 'removed' | — |
filteroptional | string | — |
decodedByoptional | 'package' | 'callback' | — |
reasonoptional | RedactionImageRemovalReason | — |
messageoptional | string | — |
Defined in packages/pdf/src/redaction/images.ts:32
RedactionImageRequestinterface#
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. |
colorSpaceoptional | string | undefined | Inherited from RedactionImageInfo. |
isMask | boolean | Inherited from RedactionImageInfo. |
decodeoptional | number[] | undefined | Inherited from RedactionImageInfo. |
decodeParmsoptional | Record<string, number | boolean> | undefined | Inherited from RedactionImageInfo. |
jbig2Globalsoptional | Uint8Array<ArrayBufferLike> | undefined | Inherited from RedactionImageInfo. |
Defined in packages/pdf/src/redaction/redact.ts:55
RedactionReportinterface#
interface RedactionReport| Property | Type | Description |
|---|---|---|
glyphsRemoved | number | — |
removedText | string | — |
imagesRemoved | number | — |
imagesModified | number | — |
pathsRemoved | number | — |
formsRewritten | number | — |
images | RedactionImageOutcome[] | — |
Defined in packages/pdf/src/redaction/redact.ts:39
RedactionSearchOptionsinterface#
interface RedactionSearchOptions| Property | Type | Description |
|---|---|---|
pagesoptional | number[] | — |
caseSensitiveoptional | boolean | — |
wholeWordoptional | boolean | — |
overlayTextoptional | string | — |
fillColoroptional | string | — |
Defined in packages/pdf/src/document/session-types.ts:152
RemoteAnnotationChangesinterface#
interface RemoteAnnotationChanges| Property | Type | Description |
|---|---|---|
upsert | PdfAnnotation[] | — |
remove | string[] | — |
Defined in packages/pdf/src/annotations/sync.ts:38
RenderedPageImageinterface#
interface RenderedPageImageDefined in packages/pdf/src/document/session-types.ts:84
ReplaceTextResultinterface#
interface ReplaceTextResult| Property | Type | Description |
|---|---|---|
replaced | number | — |
failed | { id: string; text: string; reason: ContentEditFailure; message: string }[] | — |
Defined in packages/pdf/src/content-edit/find-replace.ts:28
ResetFormActioninterface#
interface ResetFormActionDefined in packages/pdf/src/forms/types.ts:225
ResizePagesOptionsinterface#
interface ResizePagesOptions| Property | Type | Description |
|---|---|---|
width | number | — |
height | number | — |
anchoroptional | PageAnchor | — |
scaleContent | boolean | — |
fitoptional | 'fit' | 'fill' | — |
marginoptional | number | — |
Defined in packages/pdf/src/document/session-types.ts:53
RestyleResultinterface#
interface RestyleResult extends TextEditResult| Property | Type | Description |
|---|---|---|
rectoptional | PdfRect | — |
isSyntheticoptional | boolean | — |
ok | boolean | Inherited from TextEditResult. |
reasonoptional | ContentEditFailure | undefined | Inherited from TextEditResult. |
messageoptional | string | undefined | Inherited from TextEditResult. |
usedFontoptional | "original" | "embedded" | "standard" | undefined | Inherited from TextEditResult. |
fontNamesoptional | string[] | undefined | Inherited from TextEditResult. |
missingoptional | string | undefined | Inherited from TextEditResult. |
widthChangeoptional | number | undefined | Inherited from TextEditResult. |
Defined in packages/pdf/src/content-edit/text-style.ts:56
RevocationAnswerinterface#
interface RevocationAnswer| Property | Type | Description |
|---|---|---|
status | 'good' | 'revoked' | 'unknown' | — |
revokedAtoptional | Date | string | — |
reasonoptional | string | — |
Defined in packages/pdf/src/signatures/verify.ts:48
RichTextDefaultsinterface#
interface RichTextDefaults| Property | Type | Description |
|---|---|---|
fontSize | number | — |
color | string | — |
fontFamily | string | — |
align | RichTextAlign | — |
Defined in packages/pdf/src/annotations/rich-text.ts:18
RichTextLineinterface#
interface RichTextLine| Property | Type | Description |
|---|---|---|
pieces | { text: string; style: ResolvedStyle; width: number }[] | — |
width | number | — |
fontSize | number | — |
align | RichTextAlign | — |
Defined in packages/pdf/src/annotations/rich-text.ts:465
RichTextParagraphinterface#
interface RichTextParagraph| Property | Type | Description |
|---|---|---|
runs | RichTextRun[] | — |
alignoptional | RichTextAlign | — |
Defined in packages/pdf/src/annotations/types.ts:81
RichTextRuninterface#
interface RichTextRun| Property | Type | Description |
|---|---|---|
text | string | — |
boldoptional | boolean | — |
italicoptional | boolean | — |
underlineoptional | boolean | — |
strikethroughoptional | boolean | — |
coloroptional | string | — |
fontSizeoptional | number | — |
fontFamilyoptional | string | — |
Defined in packages/pdf/src/annotations/types.ts:70
SanitizeOptionsinterface#
interface SanitizeOptions| Property | Type | Description |
|---|---|---|
metadataoptional | boolean | Document information, XMP packets and private application data. |
attachmentsoptional | boolean | Embedded files and file attachment annotations. |
scriptsoptional | boolean | JavaScript, open actions and additional actions. |
commentsoptional | boolean | Every annotation except links and form fields. |
Defined in packages/pdf/src/tools/sanitize.ts:11
SanitizeReportinterface#
interface SanitizeReport| Property | Type | Description |
|---|---|---|
metadata | number | — |
attachments | number | — |
scripts | number | — |
comments | number | — |
before | number | — |
after | number | — |
Defined in packages/pdf/src/tools/sanitize.ts:24
SanitizeResultinterface#
interface SanitizeResult| Property | Type | Description |
|---|---|---|
bytes | PdfBytes | — |
report | SanitizeReport | — |
Defined in packages/pdf/src/tools/sanitize.ts:34
SaveOptionsinterface#
interface SaveOptions| Property | Type | Description |
|---|---|---|
allowMissingGlyphsoptional | boolean | — |
objectStreamsoptional | boolean | — |
modeoptional | SaveMode | — |
compressoptional | boolean | — |
flattenoptional | FlattenMode | — |
linearizeoptional | boolean | — |
Defined in packages/pdf/src/document/session-types.ts:135
SaveResultinterface#
interface SaveResult| Property | Type | Description |
|---|---|---|
bytes | PdfBytes | — |
mode | 'incremental' | 'full' | — |
redactions | RedactionReport[] | — |
missingGlyphsoptional | MissingGlyphReport | Characters that were written without a glyph, and their scripts; absent when every character was drawn. |
Defined in packages/pdf/src/document/session-types.ts:144
SignatureAppearanceOptionsinterface#
interface SignatureAppearanceOptions| Property | Type | Description |
|---|---|---|
textoptional | string[] | — |
imageoptional | Uint8Array | — |
showDateoptional | boolean | — |
showReasonoptional | boolean | — |
showLocationoptional | boolean | — |
fontSizeoptional | number | — |
textColoroptional | [number, number, number] | — |
borderColoroptional | [number, number, number] | null | — |
borderWidthoptional | number | — |
backgroundColoroptional | [number, number, number] | null | — |
Defined in packages/pdf/src/signatures/appearance.ts:6
SignatureFieldInfointerface#
interface SignatureFieldInfo| Property | Type | Description |
|---|---|---|
name | string | — |
pageIndex | number | — |
rect | PdfRect | — |
isSigned | boolean | — |
isRequired | boolean | — |
isReadOnly | boolean | — |
lockoptional | SignatureFieldLock | — |
Defined in packages/pdf/src/forms/types.ts:261
SignatureFieldLockinterface#
interface SignatureFieldLockDefined in packages/pdf/src/forms/types.ts:256
SignatureFieldPlacementinterface#
interface SignatureFieldPlacementDefined in packages/pdf/src/signatures/sign.ts:33
SignatureInfointerface#
interface SignatureInfo| Property | Type | Description |
|---|---|---|
signerNameoptional | string | — |
signedAtoptional | string | — |
reasonoptional | string | — |
locationoptional | string | — |
filteroptional | string | — |
subFilteroptional | string | — |
byteRangeoptional | number[] | — |
coversWholeFile | boolean | — |
hasLaterChanges | boolean | — |
integrity | 'unchecked' | 'intact' | 'modified' | 'unsupported' | — |
Defined in packages/pdf/src/forms/types.ts:67
SignDigestInfointerface#
interface SignDigestInfo| Property | Type | Description |
|---|---|---|
algorithm | 'RSASSA-PKCS1-v1_5' | 'ECDSA' | — |
hash | HashName | — |
curveoptional | 'P-256' | 'P-384' | 'P-521' | — |
signedAttributes | Uint8Array | — |
Defined in packages/pdf/src/signatures/signer.ts:9
SignPdfOptionsinterface#
interface SignPdfOptions| Property | Type | Description |
|---|---|---|
certificateoptional | Uint8Array | string | — |
certificateChainoptional | (Uint8Array | string)[] | — |
privateKeyoptional | string | CryptoKey | — |
signDigestoptional | SignDigestCallback | — |
pkcs12optional | Uint8Array | ArrayBuffer | — |
pkcs12Passwordoptional | string | — |
timestampoptional | TimestampCallback | — |
reasonoptional | string | — |
locationoptional | string | — |
contactInfooptional | string | — |
nameoptional | string | — |
fieldoptional | string | SignatureFieldPlacement | — |
appearanceoptional | SignatureAppearanceOptions | false | — |
certificationLeveloptional | 1 | 2 | 3 | — |
certifyoptional | PdfCertificationPermission | — |
subFilteroptional | PdfSignatureSubFilter | — |
signedAtoptional | Date | — |
placeholderSizeoptional | number | — |
passwordoptional | string | — |
lockFieldsoptional | PdfFieldLock | — |
Defined in packages/pdf/src/signatures/sign.ts:48
SplitNaminginterface#
interface SplitNaming| Property | Type | Description |
|---|---|---|
baseNameoptional | string | — |
Defined in packages/pdf/src/tools/split.ts:20
SplitPartinterface#
interface SplitPart| Property | Type | Description |
|---|---|---|
bytes | PdfBytes | — |
pageIndexes | number[] | — |
name | string | — |
titleoptional | string | — |
Defined in packages/pdf/src/tools/split.ts:13
StampImageOptionsinterface#
interface StampImageOptions| Property | Type | Description |
|---|---|---|
data | Uint8Array | — |
rectoptional | PdfRect | — |
positionoptional | StampPosition | — |
widthoptional | number | — |
heightoptional | number | — |
opacityoptional | number | — |
rotationoptional | number | — |
layeroptional | 'over' | 'under' | — |
marginoptional | number | — |
Defined in packages/pdf/src/tools/stamping.ts:29
StampTextOptionsinterface#
interface StampTextOptions| Property | Type | Description |
|---|---|---|
text | string | — |
positionoptional | StampPosition | — |
fontSizeoptional | number | — |
coloroptional | string | — |
opacityoptional | number | — |
rotationoptional | number | — |
fontoptional | StandardFont | — |
layeroptional | 'over' | 'under' | — |
marginoptional | number | — |
fontsoptional | FontRegistry | — |
Defined in packages/pdf/src/tools/stamping.ts:16
SubmitFormActioninterface#
interface SubmitFormAction| Property | Type | Description |
|---|---|---|
type | 'submitForm' | — |
url | string | — |
flags | number | — |
format | SubmitFormat | — |
method | 'get' | 'post' | — |
fields | string[] | — |
isExclude | boolean | — |
includeEmpty | boolean | — |
Defined in packages/pdf/src/forms/types.ts:214
SyncableDocumentinterface#
interface SyncableDocument| Property | Type | Description |
|---|---|---|
on() | (event: DocumentSyncEvent, listener: (payload: object) => void) => () => void | — |
getFormValues() | () => Record<string, FormSyncValue> | — |
setFormValues() | (values: Record<string, FormSyncValue>) => unknown | — |
getFormField()optional | (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 | — |
Defined in packages/pdf/src/annotations/sync-hosts.ts:6
SyncAnnotationChangesinterface#
interface SyncAnnotationChanges| Property | Type | Description |
|---|---|---|
added | PdfAnnotation[] | — |
changed | { before: PdfAnnotation; after: PdfAnnotation }[] | — |
removed | PdfAnnotation[] | — |
source | string | — |
Defined in packages/pdf/src/annotations/sync.ts:31
SyncClockinterface#
interface SyncClockDefined in packages/pdf/src/annotations/sync.ts:7
SyncConflictinterface#
interface SyncConflict| Property | Type | Description |
|---|---|---|
annotationId | string | — |
reason | 'older-write' | 'removed' | — |
keys | string[] | — |
operation | SyncOperation | — |
winner | SyncClock | — |
Defined in packages/pdf/src/annotations/sync.ts:23
SyncOperationinterface#
interface SyncOperation| Property | Type | Description |
|---|---|---|
id | string | — |
kind | SyncOperationKind | — |
annotationId | string | — |
payload | { [key: string]: SyncJson } | — |
author | string | — |
clock | SyncClock | — |
Defined in packages/pdf/src/annotations/sync.ts:14
SyncSnapshotinterface#
interface SyncSnapshot| Property | Type | Description |
|---|---|---|
version | 1 | — |
counter | number | — |
entries | SyncSnapshotEntry[] | — |
formsoptional | FormSyncSnapshot | — |
pagesoptional | PageSyncSnapshot | — |
Defined in packages/pdf/src/annotations/sync.ts:73
SyncSnapshotEntryinterface#
interface SyncSnapshotEntry| Property | Type | Description |
|---|---|---|
id | string | — |
addedoptional | SyncClock | — |
removedoptional | SyncClock | — |
groups | { [group: string]: { clock: SyncClock; values: { [key: string]: SyncJson } } } | — |
replies | { [replyId: string]: { clock: SyncClock; added?: SyncClock; removed?: SyncClock; reply?: { [key: string]: SyncJson }; }; } | — |
Defined in packages/pdf/src/annotations/sync.ts:58
TextEditResultinterface#
interface TextEditResult| Property | Type | Description |
|---|---|---|
ok | boolean | — |
reasonoptional | ContentEditFailure | — |
messageoptional | string | — |
usedFontoptional | 'original' | 'embedded' | 'standard' | — |
fontNamesoptional | string[] | — |
missingoptional | string | — |
widthChangeoptional | number | — |
Defined in packages/pdf/src/content-edit/types.ts:32
TextLayerResultinterface#
interface TextLayerResult| Property | Type | Description |
|---|---|---|
words | number | — |
skippedWords | number | — |
Defined in packages/pdf/src/content-edit/text-layer.ts:38
TextLayerWordinterface#
interface TextLayerWord| Property | Type | Description |
|---|---|---|
text | string | — |
rect | PdfRect | — |
rotationoptional | 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. |
Defined in packages/pdf/src/content-edit/text-layer.ts:14
TextMatchinterface#
interface TextMatchDefined in packages/pdf/src/content/text.ts:386
TextMoveinterface#
interface TextMoveDefined in packages/pdf/src/content-edit/types.ts:109
TextMoveResultinterface#
interface TextMoveResult extends TextEditResult| Property | Type | Description |
|---|---|---|
runoptional | TextRun | — |
ok | boolean | Inherited from TextEditResult. |
reasonoptional | ContentEditFailure | undefined | Inherited from TextEditResult. |
messageoptional | string | undefined | Inherited from TextEditResult. |
usedFontoptional | "original" | "embedded" | "standard" | undefined | Inherited from TextEditResult. |
fontNamesoptional | string[] | undefined | Inherited from TextEditResult. |
missingoptional | string | undefined | Inherited from TextEditResult. |
widthChangeoptional | number | undefined | Inherited from TextEditResult. |
Defined in packages/pdf/src/content-edit/types.ts:114
TextParagraphinterface#
interface TextParagraph| Property | Type | Description |
|---|---|---|
index | number | — |
text | string | — |
lines | string[] | — |
runs | TextRun[] | — |
rect | PdfRect | — |
fontName | string | — |
baseFontoptional | string | — |
fontSize | number | — |
lineHeight | number | — |
alignment | ParagraphAlignment | How the lines sit in the block. A rewritten paragraph keeps it. |
Defined in packages/pdf/src/content-edit/paragraphs.ts:26
TextRuninterface#
interface TextRun| Property | Type | Description |
|---|---|---|
index | number | — |
operator | string | — |
text | string | — |
rect | PdfRect | — |
fontName | string | — |
fontSize | number | — |
baseFontoptional | string | — |
origin | PdfPoint | — |
matrix | Matrix | — |
advance | number | — |
isInvisibleoptional | boolean | Drawn with the invisible render mode, as a text layer over a scan is. |
Defined in packages/pdf/src/content-edit/types.ts:8
TextStyleinterface#
interface TextStyle| Property | Type | Description |
|---|---|---|
fontoptional | string | A standard font, or the name of a supplied font. |
fontSizeoptional | number | — |
coloroptional | string | — |
isBoldoptional | boolean | — |
isItalicoptional | boolean | — |
Defined in packages/pdf/src/content-edit/types.ts:98
TimestampRequestInfointerface#
interface TimestampRequestInfoDefined in packages/pdf/src/signatures/sign.ts:39
ValidationDataRequestinterface#
interface ValidationDataRequest| Property | Type | Description |
|---|---|---|
certificate | PdfCertificateInfo | — |
issuer | PdfCertificateInfo | — |
ocspUrls | string[] | — |
crlUrls | string[] | — |
Defined in packages/pdf/src/signatures/dss.ts:81
ValidationDataResponseinterface#
interface ValidationDataResponseDefined in packages/pdf/src/signatures/dss.ts:88
VerifySignaturesOptionsinterface#
interface VerifySignaturesOptions| Property | Type | Description |
|---|---|---|
trustedRootsoptional | (Uint8Array | string)[] | — |
trustListsoptional | PdfTrustList[] | Trust lists from loadTrustList. A list past its expiry date is not used and is named in the result. |
nowoptional | Date | — |
passwordoptional | string | — |
ocspsoptional | Uint8Array[] | — |
crlsoptional | Uint8Array[] | — |
checkRevocationoptional | RevocationCallback | — |
requireRevocationoptional | boolean | — |
limitsoptional | Partial<PdfLimits> | — |
Defined in packages/pdf/src/signatures/verify.ts:59
XfdfImportinterface#
interface XfdfImport| Property | Type | Description |
|---|---|---|
annotations | AnnotationInput[] | — |
fields | Record<string, FormValue> | — |
Defined in packages/pdf/src/annotations/xfdf.ts:417
ZipEntryinterface#
interface ZipEntryDefined in packages/pdf/src/tools/zip.ts:3
AccessibilityCodetype#
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';Defined in packages/pdf/src/tools/accessibility.ts:8
AnnotationFonttype#
type AnnotationFont = 'Helvetica' | 'Times' | 'Courier';Defined in packages/pdf/src/annotations/types.ts:42
AnnotationInputtype#
type AnnotationInput = Partial<Omit<PdfAnnotation, 'type' | 'pageIndex'>> &
Pick<PdfAnnotation, 'type' | 'pageIndex'>;Defined in packages/pdf/src/annotations/types.ts:186
AnnotationPatchtype#
type AnnotationPatch = Partial<Omit<PdfAnnotation, 'id'>>;Defined in packages/pdf/src/annotations/types.ts:189
AnnotationTypetype#
type AnnotationType =
| TextMarkupType
| ShapeType
| MeasurementType
| 'note'
| 'caret'
| 'freeText'
| 'ink'
| 'stamp'
| 'image'
| 'signature'
| 'redaction'
| 'link'
| MediaAnnotationType;Defined in packages/pdf/src/annotations/types.ts:18
ArchiveRuletype#
type ArchiveRule =
| 'encryption'
| 'fonts'
| 'metadata'
| 'output-intent'
| 'javascript'
| 'launch-action'
| 'embedded-files'
| 'transparency'
| 'lzw'
| 'file-id';Defined in packages/pdf/src/tools/archive-check.ts:9
ArchiveSeveritytype#
type ArchiveSeverity = 'error' | 'warning' | 'info';Defined in packages/pdf/src/tools/archive-check.ts:7
AsyncRedactionImageDecodertype#
type AsyncRedactionImageDecoder = (
image: PageRedactionImage,
) => DecodedRedactionImage | undefined | Promise<DecodedRedactionImage | undefined>;Defined in packages/pdf/src/document/session-types.ts:166
AttachmentInputtype#
type AttachmentInput = FileSpecInput;Defined in packages/pdf/src/tools/attachments.ts:30
AttachmentRelationshiptype#
type AttachmentRelationship =
'Source' | 'Data' | 'Alternative' | 'Supplement' | 'EncryptedPayload' | 'FormData' | 'Schema' | 'Unspecified';Defined in packages/pdf/src/pdf/file-spec.ts:20
BorderStyletype#
type BorderStyle = 'solid' | 'dashed' | 'dotted' | 'cloudy';Defined in packages/pdf/src/annotations/types.ts:40
BuiltInStamptype#
type BuiltInStamp =
'Approved' | 'Draft' | 'Confidential' | 'Final' | 'NotApproved' | 'ForComment' | 'Void' | 'Received';Defined in packages/pdf/src/annotations/types.ts:35
ChainProblemCodetype#
type ChainProblemCode =
'ca-not-valid-at-signing' | 'not-a-ca' | 'key-usage' | 'path-length' | 'name-constraints';Defined in packages/pdf/src/signatures/x509.ts:394
ChainStatustype#
type ChainStatus = 'trusted' | 'untrusted' | 'self-signed' | 'incomplete';Defined in packages/pdf/src/signatures/x509.ts:342
ChangeSourcetype#
type ChangeSource = 'user' | 'api' | 'history' | 'import' | 'remote';Defined in packages/pdf/src/annotations/store.ts:122
CheckResulttype#
type CheckResult = 'valid' | 'invalid' | 'unsupported';Defined in packages/pdf/src/signatures/algorithms.ts:15
CompareInputtype#
type CompareInput = Uint8Array | ArrayBuffer | ComparableDocument;Defined in packages/pdf/src/compare/types.ts:69
CompareReportFormattype#
type CompareReportFormat = 'html' | 'csv' | 'json';Defined in packages/pdf/src/compare/report.ts:3
ContentEditFailuretype#
type ContentEditFailure =
| 'stale-hit'
| 'unsupported-font'
| 'missing-glyphs'
| 'empty-text'
| 'unsupported-image'
| 'not-invertible'
| 'unsupported-object';Defined in packages/pdf/src/content-edit/types.ts:23
DocumentChangeReasontype#
type DocumentChangeReason =
| 'metadata'
| 'outline'
| 'attachments'
| 'watermark'
| 'headerFooter'
| 'bates'
| 'crop'
| 'pageLabels'
| 'pageText'
| 'pageImage'
| 'pageObject'
| 'background'
| 'flatten'
| 'history';Defined in packages/pdf/src/document/session-types.ts:37
EncodedImageMimeTypetype#
type EncodedImageMimeType = 'image/jpeg' | 'image/jp2' | 'image/x-jbig2' | 'image/g3fax';Defined in packages/pdf/src/content-edit/extract-images.ts:27
EncryptionAlgorithmtype#
type EncryptionAlgorithm = 'rc4-40' | 'rc4-128' | 'aes-128' | 'aes-256';Defined in packages/pdf/src/security/standard.ts:8
ExtractedImageStatustype#
type ExtractedImageStatus = 'decoded' | 'encoded-only' | 'unsupported';Defined in packages/pdf/src/content-edit/extract-images.ts:25
FieldActiontype#
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 };Defined in packages/pdf/src/forms/types.ts:231
FieldActionTriggertype#
type FieldActionTrigger =
| 'activate'
| 'mouseUp'
| 'mouseDown'
| 'mouseEnter'
| 'mouseExit'
| 'focus'
| 'blur'
| 'keystroke'
| 'format'
| 'validate'
| 'calculate';Defined in packages/pdf/src/forms/types.ts:199
FieldAlignmenttype#
type FieldAlignment = 'left' | 'right' | 'top' | 'bottom' | 'center' | 'middle';Defined in packages/pdf/src/forms/types.ts:288
FieldFormattype#
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 };Defined in packages/pdf/src/forms/types.ts:41
FieldScriptReporttype#
type FieldScriptReport = Record<FieldScriptTrigger, FieldScriptInfo>;Defined in packages/pdf/src/forms/types.ts:164
FieldScriptTriggertype#
type FieldScriptTrigger = keyof FieldScripts;Defined in packages/pdf/src/forms/types.ts:156
FieldSignatureInputtype#
type FieldSignatureInput =
| { kind: 'image'; image: AnnotationImage }
| { kind: 'drawn'; inkList: PdfPoint[][]; strokeWidth?: number; color?: string }
| { kind: 'typed'; text: string };Defined in packages/pdf/src/forms/form-tools.ts:311
FileAttachmentIcontype#
type FileAttachmentIcon = 'PushPin' | 'Paperclip' | 'Graph' | 'Tag';Defined in packages/pdf/src/annotations/types.ts:110
FlattenModetype#
type FlattenMode = 'forms' | 'annotations' | 'all';Defined in packages/pdf/src/forms/flatten.ts:22
FormFieldPatchtype#
type FormFieldPatch = Partial<Omit<FormFieldInput, 'name' | 'type'>> & { widgetIndex?: number };Defined in packages/pdf/src/forms/types.ts:147
FormFieldTargettype#
type FormFieldTarget = string | { name: string; widgetIndex?: number };Defined in packages/pdf/src/forms/types.ts:286
FormFieldTypetype#
type FormFieldType = 'text' | 'checkbox' | 'radio' | 'combo' | 'list' | 'signature' | 'button';Defined in packages/pdf/src/forms/types.ts:5
FormIssueCodetype#
type FormIssueCode = 'required' | 'format' | 'range' | 'script' | 'maxLength' | 'pattern';Defined in packages/pdf/src/forms/types.ts:166
FormJsontype#
type FormJson = { [name: string]: FormJsonValue };Defined in packages/pdf/src/forms/form-data.ts:13
FormJsonValuetype#
type FormJsonValue = string | boolean | null | string[] | FormJson;Defined in packages/pdf/src/forms/form-data.ts:14
FormMessageKeytype#
type FormMessageKey =
| 'required'
| 'maxLength'
| 'number'
| 'rangeMin'
| 'rangeMax'
| 'date'
| 'time'
| 'special'
| 'mask'
| 'script'
| 'option'
| 'readOnlyType';Defined in packages/pdf/src/forms/form-messages.ts:1
FormMessageParamstype#
type FormMessageParams = Record<string, string | number>;Defined in packages/pdf/src/forms/form-messages.ts:15
FormSyncValuetype#
type FormSyncValue = string | string[] | boolean | null;Defined in packages/pdf/src/annotations/sync-forms.ts:3
FormValuetype#
type FormValue = string | string[] | boolean | null;Defined in packages/pdf/src/forms/types.ts:9
HashNametype#
type HashName = 'SHA-1' | 'SHA-256' | 'SHA-384' | 'SHA-512';Defined in packages/pdf/src/signatures/algorithms.ts:14
ImageDecodertype#
type ImageDecoder = (
bytes: Uint8Array,
mimeType: string,
) => DecodedImage | undefined | Promise<DecodedImage | undefined>;Defined in packages/pdf/src/formats/image/types.ts:9
ImageFileFormattype#
type ImageFileFormat = 'png' | 'jpeg' | 'gif' | 'bmp' | 'tiff' | 'webp' | 'svg';Defined in packages/pdf/src/formats/image/types.ts:1
ImageMovetype#
type ImageMove = { dx: number; dy: number } | { rect: PdfRect } | { matrix: Matrix };Defined in packages/pdf/src/content-edit/types.ts:107
ImagePageSizetype#
type ImagePageSize = 'image' | 'a4' | 'letter' | { width: number; height: number };Defined in packages/pdf/src/tools/images.ts:27
KeyUsagetype#
type KeyUsage =
| 'digitalSignature'
| 'nonRepudiation'
| 'keyEncipherment'
| 'dataEncipherment'
| 'keyAgreement'
| 'keyCertSign'
| 'cRLSign'
| 'encipherOnly'
| 'decipherOnly';Defined in packages/pdf/src/signatures/x509.ts:81
LineEndingtype#
type LineEnding = 'none' | 'openArrow' | 'closedArrow' | 'circle' | 'square' | 'diamond' | 'butt';Defined in packages/pdf/src/annotations/types.ts:33
LinkActiontype#
type LinkAction =
| { kind: 'uri'; uri: string }
| ({ kind: 'goto' } & LinkDestination)
| { kind: 'named'; name: string }
| { kind: 'other'; actionType: string; name?: string };Defined in packages/pdf/src/annotations/types.ts:98
LinkFittype#
type LinkFit = 'page' | 'width' | 'height' | 'box' | 'boxWidth' | 'boxHeight' | 'point' | 'rect';Defined in packages/pdf/src/annotations/types.ts:86
LinkHighlightModetype#
type LinkHighlightMode = 'none' | 'invert' | 'outline' | 'push';Defined in packages/pdf/src/annotations/types.ts:104
MailFormattype#
type MailFormat = 'msg' | 'eml';Defined in packages/pdf/src/formats/mail/types.ts:8
MailPageSizetype#
type MailPageSize = 'a4' | 'letter' | { width: number; height: number };Defined in packages/pdf/src/formats/mail/mail-to-pdf.ts:25
MailPdfWarningCodetype#
type MailPdfWarningCode =
| 'substituted-characters'
| 'remote-image'
| 'missing-image'
| 'unsupported-image'
| 'unsafe-link'
| 'embedded-message-converted';Defined in packages/pdf/src/formats/mail/mail-to-pdf.ts:58
Measurabletype#
type Measurable = Pick<PdfAnnotation, 'type' | 'line' | 'vertices' | 'measureScale'> &
Partial<Pick<PdfAnnotation, 'label' | 'rect'>>;Defined in packages/pdf/src/annotations/geometry.ts:543
MeasurementTypetype#
type MeasurementType = 'distance' | 'perimeter' | 'area' | 'count' | 'arc' | 'angle';Defined in packages/pdf/src/annotations/types.ts:14
MediaAnnotationTypetype#
type MediaAnnotationType = 'fileAttachment' | 'sound' | 'movie' | 'screen' | 'richMedia' | 'media3d';Defined in packages/pdf/src/annotations/types.ts:16
NoteIcontype#
type NoteIcon = 'comment' | 'note' | 'key' | 'help' | 'paragraph' | 'insert';Defined in packages/pdf/src/annotations/types.ts:38
ObjectOrdertype#
type ObjectOrder = 'front' | 'forward' | 'backward' | 'back';Defined in packages/pdf/src/content-edit/types.ts:89
OfficeBlocktype#
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 };Defined in packages/pdf/src/tools/export-office.ts:11
PadesLeveltype#
type PadesLevel = 'B-B' | 'B-T' | 'B-LT' | 'B-LTA' | 'not-pades';Defined in packages/pdf/src/signatures/verify.ts:72
PageAnchortype#
type PageAnchor =
| 'center'
| 'top-left'
| 'top-center'
| 'top-right'
| 'center-left'
| 'center-right'
| 'bottom-left'
| 'bottom-center'
| 'bottom-right';Defined in packages/pdf/src/tools/page-boxes.ts:14
PageBoxesPatchtype#
type PageBoxesPatch = { media?: PdfRect } & Partial<Record<Exclude<PageBoxKey, 'media'>, PdfRect | null>>;Defined in packages/pdf/src/tools/page-boxes.ts:160
PageBoxKeytype#
type PageBoxKey = keyof PageBoxes;Defined in packages/pdf/src/tools/page-boxes.ts:158
PageComparisonStatustype#
type PageComparisonStatus = 'unchanged' | 'changed' | 'added' | 'removed' | 'moved';Defined in packages/pdf/src/compare/types.ts:3
PageImageFormattype#
type PageImageFormat = 'raw' | 'jpeg' | 'jpeg2000' | 'jbig2' | 'ccitt' | 'unknown';Defined in packages/pdf/src/content-edit/types.ts:42
PageLabelStyletype#
type PageLabelStyle = 'decimal' | 'roman-upper' | 'roman-lower' | 'alpha-upper' | 'alpha-lower' | 'none';Defined in packages/pdf/src/tools/page-labels.ts:6
PageLayerKindtype#
type PageLayerKind = 'watermark' | 'header' | 'footer' | 'background' | 'pageNumbers' | 'bates';Defined in packages/pdf/src/tools/page-layers.ts:9
PageMarkKindtype#
type PageMarkKind = 'tick' | 'cross' | 'dot' | 'circle';Defined in packages/pdf/src/content-edit/add-content.ts:199
PageNumberPositiontype#
type PageNumberPosition =
'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';Defined in packages/pdf/src/document/session-page-tools.ts:17
PageObjectKindtype#
type PageObjectKind = 'text' | 'image' | 'path' | 'form' | 'shading' | 'inlineImage';Defined in packages/pdf/src/content-edit/types.ts:68
PageObjectLayertype#
type PageObjectLayer = 'watermark' | 'header' | 'footer' | 'background' | 'pageNumbers' | 'bates';Defined in packages/pdf/src/content-edit/types.ts:70
PagesChangeReasontype#
type PagesChangeReason =
'move' | 'rotate' | 'delete' | 'insert' | 'merge' | 'history' | 'redaction' | 'crop' | 'content';Defined in packages/pdf/src/document/session-types.ts:34
PageSelectortype#
type PageSelector = 'all' | 'odd' | 'even' | string;Defined in packages/pdf/src/tools/split.ts:42
PageSourceKindtype#
type PageSourceKind = 'original' | 'merged' | 'blank';Defined in packages/pdf/src/document/session-types.ts:20
PageSyncOperationKindtype#
type PageSyncOperationKind = 'insert' | 'move' | 'rotate' | 'delete';Defined in packages/pdf/src/annotations/sync-pages.ts:3
PageTextDirectiontype#
type PageTextDirection = 'ltr' | 'rtl' | 'ttb';Defined in packages/pdf/src/content/structured-text.ts:13
PageTextOptionstype#
type PageTextOptions = Omit<StructuredTextOptions, 'exclude'>;Defined in packages/pdf/src/document/session-types.ts:178
PageTextOrdertype#
type PageTextOrder = 'reading' | 'content';Defined in packages/pdf/src/content/structured-text.ts:15
PdfARuletype#
type PdfARule =
| 'header'
| 'encryption'
| 'file-id'
| 'stream'
| 'output-intent'
| 'device-colour'
| 'transparency'
| 'image'
| 'content'
| 'xobject'
| 'fonts'
| 'annotations'
| 'actions'
| 'metadata'
| 'forms'
| 'embedded-files';Defined in packages/pdf/src/tools/pdfa-validate.ts:8
PdfBytestype#
type PdfBytes = Uint8Array<ArrayBuffer>;Defined in packages/pdf/src/pdf/bytes.ts:1
PdfCertificationPermissiontype#
type PdfCertificationPermission = 'no-changes' | 'form-filling' | 'annotations-and-forms';Defined in packages/pdf/src/signatures/fields.ts:79
PdfCollectionFieldTypetype#
type PdfCollectionFieldType =
'text' | 'date' | 'number' | 'fileName' | 'description' | 'modified' | 'created' | 'size' | 'compressedSize';Defined in packages/pdf/src/tools/attachments.ts:44
PdfCollectionValuetype#
type PdfCollectionValue = string | number | Date;Defined in packages/pdf/src/tools/attachments.ts:47
PdfCollectionViewtype#
type PdfCollectionView = 'details' | 'tile' | 'hidden';Defined in packages/pdf/src/tools/attachments.ts:42
PdfFieldLocktype#
type PdfFieldLock = 'all' | { include: string[] } | { exclude: string[] };Defined in packages/pdf/src/signatures/sign.ts:71
PdfFieldTypetype#
type PdfFieldType = FormFieldType | 'barcode';Defined in packages/pdf/src/forms/types.ts:7
PdfFontFallbacktype#
type PdfFontFallback = (
script: TextScript,
characters: string,
) => Uint8Array | PdfFontSource | undefined | Promise<Uint8Array | PdfFontSource | undefined>;Defined in packages/pdf/src/fonts/fallback.ts:4
PdfInitialPageLayouttype#
type PdfInitialPageLayout =
'single' | 'continuous' | 'two-column' | 'two-column-cover' | 'two-page' | 'two-page-cover';Defined in packages/pdf/src/tools/initial-view.ts:7
PdfInitialPageModetype#
type PdfInitialPageMode = 'none' | 'outlines' | 'thumbnails' | 'fullscreen' | 'layers' | 'attachments';Defined in packages/pdf/src/tools/initial-view.ts:5
PdfLimitNametype#
type PdfLimitName = keyof PdfLimits;Defined in packages/pdf/src/pdf/limits.ts:14
PdfPermissionNametype#
type PdfPermissionName = keyof PdfPermissions | 'changeSecurity';Defined in packages/pdf/src/document/permissions.ts:3
PdfQuadtype#
type PdfQuad = [bottomLeft: PdfPoint, bottomRight: PdfPoint, topRight: PdfPoint, topLeft: PdfPoint];Defined in packages/pdf/src/content/structured-text.ts:11
PdfRecttype#
type PdfRect = [x1: number, y1: number, x2: number, y2: number];Defined in packages/pdf/src/annotations/types.ts:8
PdfSegmenttype#
type PdfSegment = [x1: number, y1: number, x2: number, y2: number];Defined in packages/pdf/src/content/geometry.ts:11
PdfSignatureSubFiltertype#
type PdfSignatureSubFilter = 'adbe.pkcs7.detached' | 'ETSI.CAdES.detached';Defined in packages/pdf/src/signatures/sign.ts:46
PdfSignatureSummarytype#
type PdfSignatureSummary =
'trusted' | 'valid-untrusted' | 'changed-after-signing' | 'revoked' | 'invalid' | 'unsupported';Defined in packages/pdf/src/signatures/verify.ts:137
Pkcs12ErrorReasontype#
type Pkcs12ErrorReason = 'password-incorrect' | 'unsupported' | 'malformed';Defined in packages/pdf/src/signatures/pkcs12.ts:20
PresenceMessagetype#
type PresenceMessage =
{ type: 'presence'; state: PresenceState; sentAt: number } | { type: 'leave'; actorId: string; sentAt: number };Defined in packages/pdf/src/annotations/sync.ts:589
RecognizeTextCallbacktype#
type RecognizeTextCallback = (image: OcrPageImage) => OcrWord[] | Promise<OcrWord[]>;Defined in packages/pdf/src/content-edit/text-layer.ts:36
RedactionImageDecodertype#
type RedactionImageDecoder = (image: PageRedactionImage) => DecodedRedactionImage | undefined;Defined in packages/pdf/src/document/session-types.ts:164
RedactionImageRemovalReasontype#
type RedactionImageRemovalReason = 'covered' | 'undecodable' | 'mask-undecodable' | 'inline-image';Defined in packages/pdf/src/redaction/images.ts:30
RedactionPatterntype#
type RedactionPattern = RedactionPatternName;Defined in packages/pdf/src/content/text.ts:437
RedactionPatternNametype#
type RedactionPatternName = keyof typeof REDACTION_PATTERNS;Defined in packages/pdf/src/content/text.ts:435
RedactionQuerytype#
type RedactionQuery =
| string
| RegExp
| { text: string; matchCase?: boolean; wholeWord?: boolean }
| { pattern: RegExp }
| { preset: RedactionPatternName };Defined in packages/pdf/src/content/text.ts:441
ReplyInputtype#
type ReplyInput = string | (Partial<AnnotationReply> & { contents: string });Defined in packages/pdf/src/document/input-checks.ts:129
ReviewStatustype#
type ReviewStatus = 'none' | 'accepted' | 'rejected' | 'cancelled' | 'completed';Defined in packages/pdf/src/annotations/types.ts:44
RevisionChangeKindtype#
type RevisionChangeKind =
'form' | 'annotation' | 'signature' | 'timestamp' | 'dss' | 'appearance' | 'metadata' | 'other';Defined in packages/pdf/src/signatures/revisions.ts:18
RevocationCallbacktype#
type RevocationCallback = (
certificate: PdfCertificateInfo,
issuer: PdfCertificateInfo,
) => RevocationAnswer | Promise<RevocationAnswer>;Defined in packages/pdf/src/signatures/verify.ts:54
RevocationStatustype#
type RevocationStatus = 'good' | 'revoked' | 'unknown' | 'not-checked';Defined in packages/pdf/src/signatures/revocation.ts:23
RichTextAligntype#
type RichTextAlign = 'left' | 'center' | 'right';Defined in packages/pdf/src/annotations/types.ts:68
SaveModetype#
type SaveMode = 'auto' | 'incremental' | 'full';Defined in packages/pdf/src/document/session-types.ts:133
ShapeTypetype#
type ShapeType = 'rectangle' | 'ellipse' | 'line' | 'arrow' | 'polygon' | 'polyline';Defined in packages/pdf/src/annotations/types.ts:12
SignDigestCallbacktype#
type SignDigestCallback = (digest: PdfBytes, info: SignDigestInfo) => Promise<Uint8Array> | Uint8Array;Defined in packages/pdf/src/signatures/signer.ts:16
SimpleCalculationtype#
type SimpleCalculation =
{ op: 'sum' | 'product' | 'average' | 'min' | 'max'; fields: string[] } | { expression: string };Defined in packages/pdf/src/forms/types.ts:290
SplitOptionstype#
type SplitOptions =
| { ranges: string | readonly (readonly [number, number])[] }
| { every: number }
| { byBookmark: { level?: number } }
| { maxBytes: number }
| { byBlankPages: true };Defined in packages/pdf/src/tools/split.ts:6
StampPositiontype#
type StampPosition = PageAnchor | { x: number; y: number };Defined in packages/pdf/src/tools/stamping.ts:14
StandardFonttype#
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';Defined in packages/pdf/src/annotations/text-metrics.ts:68
StandardFontNametype#
type StandardFontName =
| 'Helvetica'
| 'Helvetica-Bold'
| 'Helvetica-Oblique'
| 'Helvetica-BoldOblique'
| 'Times-Roman'
| 'Times-Bold'
| 'Times-Italic'
| 'Times-BoldItalic'
| 'Courier'
| 'Courier-Bold'
| 'Courier-Oblique'
| 'Courier-BoldOblique';Defined in packages/pdf/src/content-edit/types.ts:128
SubmitFormattype#
type SubmitFormat = 'fdf' | 'xfdf' | 'html' | 'pdf';Defined in packages/pdf/src/forms/types.ts:212
SyncJsontype#
type SyncJson = string | number | boolean | null | SyncJson[] | { [key: string]: SyncJson };Defined in packages/pdf/src/annotations/sync.ts:12
SyncOperationKindtype#
type SyncOperationKind = 'add' | 'update' | 'remove' | 'reply-add' | 'reply-update' | 'reply-remove';Defined in packages/pdf/src/annotations/sync.ts:5
TabOrderModetype#
type TabOrderMode = 'row' | 'column' | 'structure' | 'manual' | 'unspecified';Defined in packages/pdf/src/forms/types.ts:27
TextChangeTypetype#
type TextChangeType = 'inserted' | 'deleted' | 'moved';Defined in packages/pdf/src/compare/types.ts:5
TextLayerRotationtype#
type TextLayerRotation = 0 | 90 | 180 | 270;Defined in packages/pdf/src/content-edit/text-layer.ts:12
TextMarkupTypetype#
type TextMarkupType = 'highlight' | 'underline' | 'strikeout' | 'squiggly';Defined in packages/pdf/src/annotations/types.ts:10
TimestampCallbacktype#
type TimestampCallback = (data: Uint8Array, info: TimestampRequestInfo) => Promise<Uint8Array> | Uint8Array;Defined in packages/pdf/src/signatures/sign.ts:44
ValidationDataCallbacktype#
type ValidationDataCallback = (
request: ValidationDataRequest,
) => ValidationDataResponse | undefined | Promise<ValidationDataResponse | undefined>;Defined in packages/pdf/src/signatures/dss.ts:93
@birchui/pdf/fonts#
bidiLevelsfunction#
function bidiLevels(codes: readonly number[], base: TextDirection): number[]| Parameter | Type | Description |
|---|---|---|
codes | readonly number[] | — |
base | TextDirection | — |
Defined in packages/pdf/src/fonts/bidi.ts:234
buildToUnicodefunction#
function buildToUnicode(mapping: ReadonlyMap<number, string>): string| Parameter | Type | Description |
|---|---|---|
mapping | ReadonlyMap<number, string> | — |
Defined in packages/pdf/src/fonts/embed.ts:43
buildWidthsfunction#
function buildWidths(font: TrueTypeFont, glyphs: readonly number[], aliases: ReadonlyMap<number, number> = new Map()): PdfValue[]| Parameter | Type | Description |
|---|---|---|
font | TrueTypeFont | — |
glyphs | readonly number[] | — |
aliasesoptional | ReadonlyMap<number, number> | — |
Defined in packages/pdf/src/fonts/embed.ts:66
componentGlyphsfunction#
function componentGlyphs(data: Uint8Array): number[]| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | — |
Defined in packages/pdf/src/fonts/truetype.ts:274
createFontPackfunction#
function createFontPack(options: PdfFontPackOptions): PdfFontPack| Parameter | Type | Description |
|---|---|---|
options | PdfFontPackOptions | — |
Defined in packages/pdf/src/fonts.ts:29
createFontRegistryfunction#
function createFontRegistry(fonts: readonly PdfFontSource[] = []): FontRegistry| Parameter | Type | Description |
|---|---|---|
fontsoptional | readonly PdfFontSource[] | — |
Defined in packages/pdf/src/fonts/registry.ts:429
detectScriptfunction#
function detectScript(code: number): TextScript| Parameter | Type | Description |
|---|---|---|
code | number | — |
Defined in packages/pdf/src/fonts/bidi.ts:50
embedFontSubsetfunction#
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> | — |
aliasesoptional | ReadonlyMap<number, number> | — |
Defined in packages/pdf/src/fonts/embed.ts:116
glyphAdvancefunction#
function glyphAdvance(font: TrueTypeFont, glyph: number): number| Parameter | Type | Description |
|---|---|---|
font | TrueTypeFont | — |
glyph | number | — |
Defined in packages/pdf/src/fonts/truetype.ts:257
glyphClosurefunction#
function glyphClosure(font: TrueTypeFont, glyphs: Iterable<number>): Set<number>| Parameter | Type | Description |
|---|---|---|
font | TrueTypeFont | — |
glyphs | Iterable<number> | — |
Defined in packages/pdf/src/fonts/truetype.ts:287
glyphDatafunction#
function glyphData(font: TrueTypeFont, glyph: number): Uint8Array| Parameter | Type | Description |
|---|---|---|
font | TrueTypeFont | — |
glyph | number | — |
Defined in packages/pdf/src/fonts/truetype.ts:268
glyphRangefunction#
function glyphRange(font: TrueTypeFont, glyph: number): [number, number]| Parameter | Type | Description |
|---|---|---|
font | TrueTypeFont | — |
glyph | number | — |
Defined in packages/pdf/src/fonts/truetype.ts:262
hasArabicShapingfunction#
function hasArabicShaping(font: TrueTypeFont): boolean| Parameter | Type | Description |
|---|---|---|
font | TrueTypeFont | — |
Defined in packages/pdf/src/fonts/shaping.ts:131
hasRtlfunction#
function hasRtl(text: string): boolean| Parameter | Type | Description |
|---|---|---|
text | string | — |
Defined in packages/pdf/src/fonts/bidi.ts:80
isWinAnsifunction#
function isWinAnsi(code: number): boolean| Parameter | Type | Description |
|---|---|---|
code | number | — |
Defined in packages/pdf/src/fonts/registry.ts:118
paragraphDirectionfunction#
function paragraphDirection(text: string): TextDirection| Parameter | Type | Description |
|---|---|---|
text | string | — |
Defined in packages/pdf/src/fonts/bidi.ts:71
parseCfffunction#
function parseCff(data: Uint8Array): CffFont| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | — |
Defined in packages/pdf/src/fonts/cff.ts:118
parseTrueTypefunction#
function parseTrueType(input: Uint8Array): TrueTypeFont| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | — |
Defined in packages/pdf/src/fonts/truetype.ts:212
postScriptNameOffunction#
function postScriptNameOf(font: TrueTypeFont, fallback: string): string| Parameter | Type | Description |
|---|---|---|
font | TrueTypeFont | — |
fallback | string | — |
Defined in packages/pdf/src/fonts/embed.ts:38
reorderVisualfunction#
function reorderVisual<T extends { code: number }>(items: readonly T[], base: TextDirection): T[]| Parameter | Type | Description |
|---|---|---|
items | readonly T[] | — |
base | TextDirection | — |
Defined in packages/pdf/src/fonts/bidi.ts:309
scriptsOfTextfunction#
function scriptsOfText(text: string): TextScript[]| Parameter | Type | Description |
|---|---|---|
text | string | — |
Defined in packages/pdf/src/fonts.ts:20
shapeArabicfunction#
function shapeArabic(codes: readonly number[], hasGlyph: (code: number) => boolean): VisualChar[]| Parameter | Type | Description |
|---|---|---|
codes | readonly number[] | — |
hasGlyph | (code: number) => boolean | — |
Defined in packages/pdf/src/fonts/bidi.ts:161
shapeTextfunction#
function shapeText(font: TrueTypeFont, input: readonly ShapingInput[], script: TextScript): ShapedGlyph[]| Parameter | Type | Description |
|---|---|---|
font | TrueTypeFont | — |
input | readonly ShapingInput[] | — |
script | TextScript | — |
Defined in packages/pdf/src/fonts/shaping.ts:155
showEmbeddedfunction#
function showEmbedded(run: EmbeddedText, fontSize: number, renderMode = 0): string| Parameter | Type | Description |
|---|---|---|
run | EmbeddedText | — |
fontSize | number | — |
renderModeoptional | unknown | — |
Defined in packages/pdf/src/fonts/registry.ts:49
subsetCfffunction#
function subsetCff(table: Uint8Array, glyphs: Iterable<number>, aliases: ReadonlyMap<number, number> = new Map(), keepsCids = false): Uint8Array| Parameter | Type | Description |
|---|---|---|
table | Uint8Array | — |
glyphs | Iterable<number> | — |
aliasesoptional | ReadonlyMap<number, number> | — |
keepsCidsoptional | unknown | — |
Defined in packages/pdf/src/fonts/cff.ts:306
subsetTrueTypefunction#
function subsetTrueType(font: TrueTypeFont, glyphs: Iterable<number>, symbolCodes?: ReadonlyMap<number, number>): Uint8Array| Parameter | Type | Description |
|---|---|---|
font | TrueTypeFont | — |
glyphs | Iterable<number> | — |
symbolCodesoptional | ReadonlyMap<number, number> | — |
Defined in packages/pdf/src/fonts/subset.ts:176
tableBytesfunction#
function tableBytes(font: TrueTypeFont, tag: string): Uint8Array | undefined| Parameter | Type | Description |
|---|---|---|
font | TrueTypeFont | — |
tag | string | — |
Defined in packages/pdf/src/fonts/truetype.ts:62
tableViewfunction#
function tableView(font: TrueTypeFont, tag: string): DataView | undefined| Parameter | Type | Description |
|---|---|---|
font | TrueTypeFont | — |
tag | string | — |
Defined in packages/pdf/src/fonts/truetype.ts:57
toVisualfunction#
function toVisual(text: string, hasGlyph: (code: number) => boolean = () => true): VisualChar[]| Parameter | Type | Description |
|---|---|---|
text | string | — |
hasGlyphoptional | (code: number) => boolean | — |
Defined in packages/pdf/src/fonts/bidi.ts:322
FontFormatErrorclass#
class FontFormatError extends Error
new FontFormatError(message: string)Defined in packages/pdf/src/fonts/truetype.ts:21
PdfMissingGlyphErrorclass#
class PdfMissingGlyphError extends Error
new PdfMissingGlyphError(report: MissingGlyphReport)| Member | Type | Description |
|---|---|---|
charactersreadonly | string | — |
scriptsreadonly | TextScript[] | — |
Defined in packages/pdf/src/fonts/missing-glyphs.ts:8
embedTrueTypeSubsetconst#
const embedTrueTypeSubset: (sink: FontSink, font: TrueTypeFont, fallbackName: string, mapping: ReadonlyMap<number, string>, aliases?: ReadonlyMap<number, number>) => PdfRefDefined in packages/pdf/src/fonts/embed.ts:179
isCombiningMarkconst#
const isCombiningMark: (code: number) => booleanDefined in packages/pdf/src/fonts/shaping.ts:104
parseFontconst#
const parseFont: (input: Uint8Array) => TrueTypeFontDefined in packages/pdf/src/fonts/truetype.ts:299
CffDictEntryinterface#
interface CffDictEntryDefined in packages/pdf/src/fonts/cff-reader.ts:13
CffFontinterface#
interface CffFont| Property | Type | Description |
|---|---|---|
names | Uint8Array[] | — |
topDict | CffDictEntry[] | — |
strings | Uint8Array[] | — |
globalSubrs | Uint8Array[] | — |
charStrings | Uint8Array[] | — |
isCidKeyed | boolean | — |
fontDicts | CffFontDict[] | — |
fontDictOf | Uint8Array | — |
cidsoptional | Uint16Array | — |
Defined in packages/pdf/src/fonts/cff.ts:35
CffFontDictinterface#
interface CffFontDict| Property | Type | Description |
|---|---|---|
dict | CffDictEntry[] | — |
privateDict | CffDictEntry[] | — |
subrs | Uint8Array[] | — |
Defined in packages/pdf/src/fonts/cff.ts:29
EmbeddedTextinterface#
interface EmbeddedText| Property | Type | Description |
|---|---|---|
ref | PdfRef | — |
fontName | string | — |
encoded | Uint8Array | — |
width | number | — |
ascent | number | — |
descent | number | — |
isRtl | boolean | — |
placementsoptional | (GlyphPlacement | undefined)[] | — |
Defined in packages/pdf/src/fonts/registry.ts:25
FontRegistryinterface#
interface FontRegistry| Property | Type | Description |
|---|---|---|
isEmptyreadonly | boolean | — |
fontNamesreadonly | 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 | — |
Defined in packages/pdf/src/fonts/registry.ts:74
FontSinkinterface#
interface FontSink| Property | Type | Description |
|---|---|---|
add() | (value: PdfValue) => PdfRef | — |
Defined in packages/pdf/src/fonts/embed.ts:7
FontTableinterface#
interface FontTableDefined in packages/pdf/src/fonts/truetype.ts:28
GlyphPlacementinterface#
interface GlyphPlacementDefined in packages/pdf/src/fonts/registry.ts:36
MissingGlyphReportinterface#
interface MissingGlyphReport| Property | Type | Description |
|---|---|---|
characters | string | — |
scripts | TextScript[] | — |
Defined in packages/pdf/src/fonts/missing-glyphs.ts:3
PdfFontPackinterface#
interface PdfFontPack| Property | Type | Description |
|---|---|---|
fontFallback | PdfFontFallback | — |
preload() | (scripts?: readonly TextScript[]) => Promise<PdfFontSource[]> | — |
scriptsOf() | (text: string) => TextScript[] | — |
Defined in packages/pdf/src/fonts.ts:14
PdfFontPackOptionsinterface#
interface PdfFontPackOptions| Property | Type | Description |
|---|---|---|
fonts | Partial<Record<TextScript | 'default', PdfFontPackEntry>> | — |
loadoptional | (url: string, script: TextScript) => Uint8Array | ArrayBuffer | Promise<Uint8Array | ArrayBuffer> | — |
Defined in packages/pdf/src/fonts.ts:9
PdfFontSourceinterface#
interface PdfFontSourceDefined in packages/pdf/src/fonts/registry.ts:20
PdfTextRasterizerinterface#
interface PdfTextRasterizerDraws 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 | — |
Defined in packages/pdf/src/fonts/text-rasterizer.ts:24
RasterizedTextinterface#
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. |
Defined in packages/pdf/src/fonts/text-rasterizer.ts:7
RasterTextStyleinterface#
interface RasterTextStyle| Property | Type | Description |
|---|---|---|
fontSize | number | — |
Defined in packages/pdf/src/fonts/text-rasterizer.ts:3
ShapingInputinterface#
interface ShapingInputDefined in packages/pdf/src/fonts/shaping.ts:12
TrueTypeFontinterface#
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' | — |
Defined in packages/pdf/src/fonts/truetype.ts:33
VisualCharinterface#
interface VisualCharDefined in packages/pdf/src/fonts/bidi.ts:18
PdfFontFallbacktype#
type PdfFontFallback = (
script: TextScript,
characters: string,
) => Uint8Array | PdfFontSource | undefined | Promise<Uint8Array | PdfFontSource | undefined>;Defined in packages/pdf/src/fonts/fallback.ts:4
PdfFontPackEntrytype#
type PdfFontPackEntry =
string | Uint8Array | ArrayBuffer | (() => Uint8Array | ArrayBuffer | Promise<Uint8Array | ArrayBuffer>);Defined in packages/pdf/src/fonts.ts:6
ShapedGlyphtype#
type ShapedGlyph = LayoutGlyph;Defined in packages/pdf/src/fonts/shaping.ts:18
TextDirectiontype#
type TextDirection = 'ltr' | 'rtl';Defined in packages/pdf/src/fonts/bidi.ts:1
TextScripttype#
type TextScript =
| 'latin'
| 'greek'
| 'cyrillic'
| 'armenian'
| 'hebrew'
| 'arabic'
| 'devanagari'
| 'thai'
| 'hangul'
| 'kana'
| 'han'
| 'common'
| 'other';Defined in packages/pdf/src/fonts/bidi.ts:3
@birchui/pdf/ocr#
createOcrEnginefunction#
function createOcrEngine(options: OcrEngineOptions = {}): OcrEngine| Parameter | Type | Description |
|---|---|---|
optionsoptional | OcrEngineOptions | — |
Defined in packages/pdf/src/ocr/engine.ts:137
decodeBeamfunction#
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 | — |
optionsoptional | BeamOptions | — |
Defined in packages/pdf/src/ocr/ctc.ts:68
decodeGreedyfunction#
function decodeGreedy(scores: FrameScores): DecodedCharacter[]Best class per frame, with repeats collapsed and blanks dropped.
| Parameter | Type | Description |
|---|---|---|
scores | FrameScores | — |
Defined in packages/pdf/src/ocr/ctc.ts:13
kernelOffunction#
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 | — |
choiceoptional | KernelChoice | — |
Defined in packages/pdf/src/ocr/network.ts:306
ocrModelUrlfunction#
function ocrModelUrl(): stringWhere the bundler put the model shipped in the package. The host fetches it; the package never does.
Defined in packages/pdf/src/ocr/engine.ts:94
parseModelfunction#
function parseModel(bytes: Uint8Array): OcrModelReads a model file: magic, version, JSON header, then the tensor region. 8-bit tensors are widened here.
| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
Defined in packages/pdf/src/ocr/model.ts:79
recognizePageImagefunction#
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 | — |
optionsoptional | PageOptions | — |
hooksoptional | PageHooks | — |
Defined in packages/pdf/src/ocr/page.ts:342
serializeModelfunction#
function serializeModel(header: Omit<ModelHeader, 'tensors'>, inputs: readonly TensorInput[]): Uint8ArrayWrites 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[] | — |
Defined in packages/pdf/src/ocr/model.ts:140
toHocrJsonfunction#
function toHocrJson(page: OcrPageResult): HocrNodeThe 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 | — |
Defined in packages/pdf/src/ocr/output.ts:30
toInvisibleTextLayerfunction#
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 | — |
Defined in packages/pdf/src/ocr/output.ts:5
toPlainTextfunction#
function toPlainText(page: OcrPageResult): string| Parameter | Type | Description |
|---|---|---|
page | OcrPageResult | — |
Defined in packages/pdf/src/ocr/output.ts:9
OcrErrorclass#
class OcrError extends Error
new OcrError(code: OcrError['code'], message: string)| Member | Type | Description |
|---|---|---|
codereadonly | 'aborted' | 'model' | 'input' | 'worker' | — |
Defined in packages/pdf/src/ocr/types.ts:100
MODEL_MAGICconst#
const MODEL_MAGIC: "LQOM" = 'LQOM'Defined in packages/pdf/src/ocr/model.ts:3
MODEL_VERSIONconst#
const MODEL_VERSION: 1 = 1Defined in packages/pdf/src/ocr/model.ts:4
BeamOptionsinterface#
interface BeamOptions| Property | Type | Description |
|---|---|---|
widthoptional | number | Hypotheses kept after every frame. |
pruneoptional | number | Classes considered at a frame: those within this log-probability of the best. |
prioroptional | (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. |
priorWeightoptional | number | — |
Defined in packages/pdf/src/ocr/ctc.ts:40
DecodedCharacterinterface#
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 | — |
Defined in packages/pdf/src/ocr/ctc.ts:3
HocrNodeinterface#
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. |
textoptional | string | — |
x_wconfoptional | number | Word confidence, 0 to 100, as hOCR's x_wconf. |
baselineoptional | [number, number] | Baseline as hOCR writes it: slope, then offset from the bottom of the line box. |
textangleoptional | number | Page only: clockwise turn that was undone, as hOCR's textangle. |
childrenoptional | HocrNode[] | — |
Defined in packages/pdf/src/ocr/output.ts:13
ModelHeaderinterface#
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[] | — |
Defined in packages/pdf/src/ocr/model.ts:54
OcrBlockResultinterface#
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[] | — |
Defined in packages/pdf/src/ocr/types.ts:60
OcrCharacterinterface#
interface OcrCharacter| Property | Type | Description |
|---|---|---|
text | string | — |
confidence | number | — |
x1 | number | Horizontal extent in pixels of the source image. |
x2 | number | — |
Defined in packages/pdf/src/ocr/types.ts:25
OcrDocumentinterface#
interface OcrDocumentThe part of a document session (openPdfDocument) the engine drives.
| Property | Type | Description |
|---|---|---|
getPages()optional | () => 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()optional | () => Promise<{ bytes: Uint8Array }> | — |
Defined in packages/pdf/src/ocr/engine.ts:37
OcrDocumentRunOptionsinterface#
interface OcrDocumentRunOptions extends OcrPageRunOptions| Property | Type | Description |
|---|---|---|
pagesoptional | number[] | Pages to work on, from 0. All pages by default. |
onPageoptional | (page: OcrPageStatus) => void | — |
includePagesWithTextoptional | boolean | undefined | Recognise the page even when it already has text. Inherited from OcrPageRunOptions. |
renderPageoptional | ((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. |
onProgressoptional | ((progress: OcrProgress) => void) | undefined | Inherited from OcrRunOptions. |
signaloptional | AbortSignal | undefined | Inherited from OcrRunOptions. |
dpioptional | number | undefined | Resolution of the image when it is known; otherwise it is estimated from the text size. Inherited from PageOptions. |
detectOrientationoptional | boolean | undefined | Look for pages turned by 90, 180 or 270 degrees. On by default. Inherited from PageOptions. |
deskewoptional | boolean | undefined | Straighten skewed pages. On by default. Inherited from PageOptions. |
minConfidenceoptional | number | undefined | Words below this confidence are left out. Default 0.3. Inherited from PageOptions. |
minLineConfidenceoptional | 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. |
maxPixelsoptional | number | undefined | Upper bound on the pixels worked on; larger images are scaled down first. Inherited from PageOptions. |
maxLinesoptional | number | undefined | Upper bound on the line segments read on one page, in reading order. Default 4000. Inherited from PageOptions. |
decoderoptional | "greedy" | "beam" | undefined | Inherited from DecodeOptions. |
beamoptional | BeamOptions | undefined | Inherited from DecodeOptions. |
kerneloptional | KernelChoice | undefined | js keeps the arithmetic on plain typed arrays; auto uses the WebAssembly SIMD kernel where it starts. Inherited from DecodeOptions. |
Defined in packages/pdf/src/ocr/engine.ts:55
OcrEngineinterface#
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. |
modereadonly | 'main' | 'worker' | — |
destroy() | () => void | — |
Defined in packages/pdf/src/ocr/engine.ts:71
OcrEngineOptionsinterface#
interface OcrEngineOptions extends PageOptions| Property | Type | Description |
|---|---|---|
modeloptional | 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. |
languagesoptional | string[] | Languages expected on the page, as BCP 47 tags. One the model does not cover is reported once. |
workeroptional | boolean | OcrWorkerLike | true starts the worker shipped as @birchui/pdf/ocr-worker; a worker running that entry is used as is. |
onProgressoptional | (progress: OcrProgress) => void | — |
signaloptional | AbortSignal | — |
dpioptional | number | undefined | Resolution of the image when it is known; otherwise it is estimated from the text size. Inherited from PageOptions. |
detectOrientationoptional | boolean | undefined | Look for pages turned by 90, 180 or 270 degrees. On by default. Inherited from PageOptions. |
deskewoptional | boolean | undefined | Straighten skewed pages. On by default. Inherited from PageOptions. |
minConfidenceoptional | number | undefined | Words below this confidence are left out. Default 0.3. Inherited from PageOptions. |
minLineConfidenceoptional | 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. |
maxPixelsoptional | number | undefined | Upper bound on the pixels worked on; larger images are scaled down first. Inherited from PageOptions. |
maxLinesoptional | number | undefined | Upper bound on the line segments read on one page, in reading order. Default 4000. Inherited from PageOptions. |
decoderoptional | "greedy" | "beam" | undefined | Inherited from DecodeOptions. |
beamoptional | BeamOptions | undefined | Inherited from DecodeOptions. |
kerneloptional | KernelChoice | undefined | js keeps the arithmetic on plain typed arrays; auto uses the WebAssembly SIMD kernel where it starts. Inherited from DecodeOptions. |
Defined in packages/pdf/src/ocr/engine.ts:10
OcrImageInputinterface#
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. |
Defined in packages/pdf/src/ocr/types.ts:5
OcrLineResultinterface#
interface OcrLineResult| Property | Type | Description |
|---|---|---|
text | string | — |
rect | OcrRect | — |
baseline | [number, number] | — |
confidence | number | — |
words | OcrWordResult[] | — |
Defined in packages/pdf/src/ocr/types.ts:46
OcrModelinterface#
interface OcrModel| Property | Type | Description |
|---|---|---|
header | ModelHeader | — |
characters | string[] | — |
tensors | Map<string, Float32Array> | — |
Defined in packages/pdf/src/ocr/model.ts:68
OcrPageResultinterface#
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[] | — |
Defined in packages/pdf/src/ocr/types.ts:73
OcrPageRunOptionsinterface#
interface OcrPageRunOptions extends OcrRunOptions| Property | Type | Description |
|---|---|---|
includePagesWithTextoptional | boolean | Recognise the page even when it already has text. |
renderPageoptional | (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. |
onProgressoptional | ((progress: OcrProgress) => void) | undefined | Inherited from OcrRunOptions. |
signaloptional | AbortSignal | undefined | Inherited from OcrRunOptions. |
dpioptional | number | undefined | Resolution of the image when it is known; otherwise it is estimated from the text size. Inherited from PageOptions. |
detectOrientationoptional | boolean | undefined | Look for pages turned by 90, 180 or 270 degrees. On by default. Inherited from PageOptions. |
deskewoptional | boolean | undefined | Straighten skewed pages. On by default. Inherited from PageOptions. |
minConfidenceoptional | number | undefined | Words below this confidence are left out. Default 0.3. Inherited from PageOptions. |
minLineConfidenceoptional | 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. |
maxPixelsoptional | number | undefined | Upper bound on the pixels worked on; larger images are scaled down first. Inherited from PageOptions. |
maxLinesoptional | number | undefined | Upper bound on the line segments read on one page, in reading order. Default 4000. Inherited from PageOptions. |
decoderoptional | "greedy" | "beam" | undefined | Inherited from DecodeOptions. |
beamoptional | BeamOptions | undefined | Inherited from DecodeOptions. |
kerneloptional | KernelChoice | undefined | js keeps the arithmetic on plain typed arrays; auto uses the WebAssembly SIMD kernel where it starts. Inherited from DecodeOptions. |
Defined in packages/pdf/src/ocr/engine.ts:48
OcrPageStatusinterface#
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. |
resultoptional | OcrPageResult | — |
Defined in packages/pdf/src/ocr/engine.ts:61
OcrParagraphResultinterface#
interface OcrParagraphResult| Property | Type | Description |
|---|---|---|
text | string | — |
rect | OcrRect | — |
lines | OcrLineResult[] | — |
Defined in packages/pdf/src/ocr/types.ts:54
OcrProgressinterface#
interface OcrProgress| Property | Type | Description |
|---|---|---|
stage | 'load' | 'prepare' | 'layout' | 'recognize' | 'done' | — |
progress | number | 0 to 1 within the page. |
pageIndexoptional | number | — |
pageCountoptional | number | — |
pageNumberoptional | number | Position of the page in the run, from 0. |
Defined in packages/pdf/src/ocr/types.ts:90
OcrRegioninterface#
interface OcrRegionDefined in packages/pdf/src/ocr/types.ts:68
OcrRenderedPageinterface#
interface OcrRenderedPage| Property | Type | Description |
|---|---|---|
width | number | — |
height | number | — |
data | Uint8Array | — |
matrix | [number, number, number, number, number, number] | — |
Defined in packages/pdf/src/ocr/engine.ts:29
OcrRunOptionsinterface#
interface OcrRunOptions extends PageOptions| Property | Type | Description |
|---|---|---|
onProgressoptional | (progress: OcrProgress) => void | — |
signaloptional | AbortSignal | — |
dpioptional | number | undefined | Resolution of the image when it is known; otherwise it is estimated from the text size. Inherited from PageOptions. |
detectOrientationoptional | boolean | undefined | Look for pages turned by 90, 180 or 270 degrees. On by default. Inherited from PageOptions. |
deskewoptional | boolean | undefined | Straighten skewed pages. On by default. Inherited from PageOptions. |
minConfidenceoptional | number | undefined | Words below this confidence are left out. Default 0.3. Inherited from PageOptions. |
minLineConfidenceoptional | 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. |
maxPixelsoptional | number | undefined | Upper bound on the pixels worked on; larger images are scaled down first. Inherited from PageOptions. |
maxLinesoptional | number | undefined | Upper bound on the line segments read on one page, in reading order. Default 4000. Inherited from PageOptions. |
decoderoptional | "greedy" | "beam" | undefined | Inherited from DecodeOptions. |
beamoptional | BeamOptions | undefined | Inherited from DecodeOptions. |
kerneloptional | KernelChoice | undefined | js keeps the arithmetic on plain typed arrays; auto uses the WebAssembly SIMD kernel where it starts. Inherited from DecodeOptions. |
Defined in packages/pdf/src/ocr/engine.ts:24
OcrWordResultinterface#
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 | — |
Defined in packages/pdf/src/ocr/types.ts:33
OcrWorkerLikeinterface#
interface OcrWorkerLikeWhat 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()optional | (type: 'message' | 'error', listener: (event: { data?: unknown; message?: string }) => void) => void | — |
removeEventListener()optional | (type: 'message' | 'error', listener: (event: { data?: unknown; message?: string }) => void) => void | — |
on()optional | (type: 'message' | 'error', listener: (value: unknown) => void) => unknown | — |
off()optional | (type: 'message' | 'error', listener: (value: unknown) => void) => unknown | — |
Defined in packages/pdf/src/ocr/protocol.ts:16
PageHooksinterface#
interface PageHooks| Property | Type | Description |
|---|---|---|
onProgressoptional | (progress: OcrProgress) => void | — |
signaloptional | AbortSignal | — |
Defined in packages/pdf/src/ocr/page.ts:54
PageOptionsinterface#
interface PageOptions extends DecodeOptions| Property | Type | Description |
|---|---|---|
dpioptional | number | Resolution of the image when it is known; otherwise it is estimated from the text size. |
detectOrientationoptional | boolean | Look for pages turned by 90, 180 or 270 degrees. On by default. |
deskewoptional | boolean | Straighten skewed pages. On by default. |
minConfidenceoptional | number | Words below this confidence are left out. Default 0.3. |
minLineConfidenceoptional | 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. |
maxPixelsoptional | number | Upper bound on the pixels worked on; larger images are scaled down first. |
maxLinesoptional | number | Upper bound on the line segments read on one page, in reading order. Default 4000. |
decoderoptional | "greedy" | "beam" | undefined | Inherited from DecodeOptions. |
beamoptional | BeamOptions | undefined | Inherited from DecodeOptions. |
kerneloptional | KernelChoice | undefined | js keeps the arithmetic on plain typed arrays; auto uses the WebAssembly SIMD kernel where it starts. Inherited from DecodeOptions. |
Defined in packages/pdf/src/ocr/page.ts:34
TensorEntryinterface#
interface TensorEntry| Property | Type | Description |
|---|---|---|
name | string | — |
dtype | 'f32' | 'i8' | — |
shape | number[] | — |
offset | number | Byte offset inside the tensor region. |
scalesoptional | string | For i8: name of the f32 tensor with one factor per row. |
Defined in packages/pdf/src/ocr/model.ts:6
TensorInputinterface#
interface TensorInput| Property | Type | Description |
|---|---|---|
name | string | — |
shape | number[] | — |
values | Float32Array | — |
quantizeoptional | boolean | Store as 8-bit with one scale per row. |
Defined in packages/pdf/src/ocr/model.ts:131
KernelChoicetype#
type KernelChoice = 'auto' | 'js';Defined in packages/pdf/src/ocr/network.ts:20
ModelLayertype#
type ModelLayer = ConvLayer | GruLayer | LinearLayer | { op: 'save' } | { op: 'add' } | { op: 'sequence' };Defined in packages/pdf/src/ocr/model.ts:52
OcrModelSourcetype#
type OcrModelSource = Uint8Array | (() => Uint8Array | Promise<Uint8Array>);Defined in packages/pdf/src/ocr/engine.ts:8
OcrOrientationtype#
type OcrOrientation = 0 | 90 | 180 | 270;Defined in packages/pdf/src/ocr/types.ts:3
OcrRecttype#
type OcrRect = [number, number, number, number];Defined in packages/pdf/src/ocr/types.ts:1
OcrWorkerRequesttype#
type OcrWorkerRequest =
| { type: 'init'; model: Uint8Array }
| { type: 'recognize'; id: number; image: OcrImageInput; options: PageOptions }
| { type: 'cancel'; id: number };Defined in packages/pdf/src/ocr/protocol.ts:4
OcrWorkerResponsetype#
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 };Defined in packages/pdf/src/ocr/protocol.ts:9
@birchui/pdf/render#
cmapCollectionOffunction#
function cmapCollectionOf(name: string): CMapCollection | undefinedThe collection a predefined CMap name of ISO 32000-1 table 118 (or a sibling of one) belongs to.
| Parameter | Type | Description |
|---|---|---|
name | string | — |
Defined in packages/pdf/src/render/fonts/predefined-cmaps.ts:98
comparePdfVisualfunction#
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 | — |
optionsoptional | ComparePdfVisualOptions | — |
Defined in packages/pdf/src/compare/visual.ts:54
createCanvasTargetfunction#
function createCanvasTarget(context: Canvas2D, factory: CanvasFactory = defaultCanvasFactory): RenderTarget| Parameter | Type | Description |
|---|---|---|
context | Canvas2D | — |
factoryoptional | CanvasFactory | — |
Defined in packages/pdf/src/render/document/canvas-target.ts:313
createRenderEnginefunction#
function createRenderEngine(defaults: RenderEngineOptions = {}): RenderEngineThe 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 |
|---|---|---|
defaultsoptional | RenderEngineOptions | — |
Defined in packages/pdf/src/render/compat.ts:178
createRenderWorkerfunction#
function createRenderWorker(options: RenderWorkerOptions = {}): RenderWorkerClient| Parameter | Type | Description |
|---|---|---|
optionsoptional | RenderWorkerOptions | — |
Defined in packages/pdf/src/render/worker/client.ts:94
createViewportfunction#
function createViewport(viewBox: readonly number[], userUnit: number, pageRotation: number, parameters: ViewportParameters): PageViewport| Parameter | Type | Description |
|---|---|---|
viewBox | readonly number[] | — |
userUnit | number | — |
pageRotation | number | — |
parameters | ViewportParameters | — |
Defined in packages/pdf/src/render/document/viewport.ts:31
openProgressiveDocumentfunction#
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 | — |
optionsoptional | ProgressiveOptions | — |
Defined in packages/pdf/src/render/document/progressive.ts:136
openRenderDocumentfunction#
function openRenderDocument(data: Uint8Array | ArrayBuffer, options: OpenDocumentOptions = {}): Promise<PdfRenderDocument>| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
optionsoptional | OpenDocumentOptions | — |
Defined in packages/pdf/src/render/document/document.ts:656
registerPredefinedCMapsfunction#
function registerPredefinedCMaps(...data: (PredefinedCMapData | undefined)[]): voidMakes 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)[] | — |
Defined in packages/pdf/src/render/fonts/predefined-cmaps.ts:117
unregisterPredefinedCMapsfunction#
function unregisterPredefinedCMaps(...collections: CMapCollection[]): voidForgets registered data: every collection, or the ones named.
| Parameter | Type | Description |
|---|---|---|
...collections | CMapCollection[] | — |
Defined in packages/pdf/src/render/fonts/predefined-cmaps.ts:132
PathDataclass#
class PathData
new PathData()| Member | Type | Description |
|---|---|---|
commandsreadonly | number[] | — |
coordsreadonly | 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 | — |
Defined in packages/pdf/src/render/path.ts:11
PdfRenderErrorclass#
class PdfRenderError extends Error
new PdfRenderError(readonly code: PdfRenderErrorCode, message: string, readonly detail?: unknown)| Member | Type | Description |
|---|---|---|
codereadonly | PdfRenderErrorCode | — |
detailoptionalreadonly | unknown | — |
Defined in packages/pdf/src/render/errors.ts:13
RangeTransportclass#
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.
| Member | Type | Description |
|---|---|---|
lengthreadonly | number | — |
initialDatareadonly | Uint8Array | null | — |
requestDataRange() | (_begin: number, _end: number) => void | — |
onDataRange() | (begin: number, chunk: Uint8Array) => void | — |
abort() | () => void | — |
read() | (begin: number, end: number) => Promise<Uint8Array> | — |
Defined in packages/pdf/src/render/compat.ts:51
ANNOTATION_MODEconst#
const ANNOTATION_MODE: { readonly DISABLE: 0; readonly ENABLE: 1; readonly ENABLE_FORMS: 2; readonly ENABLE_STORAGE: 3; }Defined in packages/pdf/src/render/document/document.ts:69
DEFAULT_RENDER_LIMITSconst#
const DEFAULT_RENDER_LIMITS: Readonly<RenderLimits>Defined in packages/pdf/src/render/limits.ts:26
AlphaMaskinterface#
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. |
Defined in packages/pdf/src/render/target.ts:59
AnnotationDatainterface#
interface AnnotationData| Property | Type | Description |
|---|---|---|
id | string | — |
subtype | string | — |
annotationType | string | — |
rect | number[] | — |
annotationFlags | number | — |
hasAppearance | boolean | — |
contents | string | — |
urloptional | string | — |
destoptional | string | ExplicitDestination | null | — |
actionoptional | string | — |
newWindowoptional | boolean | — |
fieldTypeoptional | string | — |
fieldNameoptional | string | — |
coloroptional | number[] | null | — |
quadPointsoptional | number[] | — |
Defined in packages/pdf/src/render/document/annotations.ts:19
ColorPaintinterface#
interface ColorPaintDefined in packages/pdf/src/render/target.ts:33
ComparePdfVisualOptionsinterface#
interface ComparePdfVisualOptions extends ComparePdfAsyncOptions, VisualCompareOptions| Property | Type | Description |
|---|---|---|
passwordoptional | string | undefined | Inherited from ComparePdfAsyncOptions. |
otherPasswordoptional | string | undefined | Inherited from ComparePdfAsyncOptions. |
ignoreCaseoptional | boolean | undefined | Inherited from ComparePdfOptions. |
ignoreWhitespaceoptional | boolean | undefined | Inherited from ComparePdfOptions. |
annotationsoptional | boolean | undefined | Inherited from ComparePdfOptions. |
minMoveWordsoptional | number | undefined | Inherited from ComparePdfOptions. |
pageSimilarityThresholdoptional | number | undefined | Inherited from ComparePdfOptions. |
colorsoptional | { inserted?: string; deleted?: string; moved?: string; } | undefined | Inherited from ComparePdfOptions. |
authoroptional | string | undefined | Inherited from ComparePdfOptions. |
scaleoptional | number | undefined | Pixels per point of the pages that are compared. Default 1.5. Inherited from VisualCompareOptions. |
toleranceoptional | number | undefined | Largest difference of a colour channel that still counts as equal, 0 to 255. Default 16. Inherited from VisualCompareOptions. |
mergeDistanceoptional | number | undefined | Changed areas closer than this many pixels are reported as one. Default 12. Inherited from VisualCompareOptions. |
maxPixelsoptional | number | undefined | Upper bound of the pixels of one rendered page; larger pages are compared at a lower scale. Inherited from VisualCompareOptions. |
standardFontsoptional | (() => Promise<SubstituteFontProvider | undefined>) | undefined | Supplies the substitute faces for fonts that are not embedded, as for openRenderDocument. Inherited from VisualCompareOptions. |
Defined in packages/pdf/src/compare/visual.ts:43
CompositeOptionsinterface#
interface CompositeOptionsDefined in packages/pdf/src/render/target.ts:77
DestinationRefinterface#
interface DestinationRefDefined in packages/pdf/src/render/document/catalog.ts:17
DocumentEventsinterface#
interface DocumentEvents| Property | Type | Description |
|---|---|---|
renderWarning | RenderWarningEvent | — |
Defined in packages/pdf/src/render/document/document.ts:106
DocumentInfointerface#
interface DocumentInfoDefined in packages/pdf/src/render/document/catalog.ts:156
DocumentSourceinterface#
interface DocumentSource| Property | Type | Description |
|---|---|---|
dataoptional | Uint8Array | ArrayBuffer | — |
urloptional | string | — |
httpHeadersoptional | Record<string, string> | — |
withCredentialsoptional | boolean | — |
rangeoptional | Pick<RangeTransport, 'requestDataRange' | 'onDataRange' | 'abort'> | An instance of the engine's RangeTransport. |
lengthoptional | number | — |
passwordoptional | string | — |
rangeChunkSizeoptional | number | — |
allowFetchoptional | boolean | — |
fetchDocumentoptional | FetchDocument | — |
Defined in packages/pdf/src/render/compat.ts:36
FetchDocumentReplyinterface#
interface FetchDocumentReply| Property | Type | Description |
|---|---|---|
bytes | Uint8Array | ArrayBuffer | — |
totaloptional | number | Size of the whole file. A value above the bytes returned switches to range loading. |
Defined in packages/pdf/src/render/compat.ts:28
FetchDocumentRequestinterface#
interface FetchDocumentRequest| Property | Type | Description |
|---|---|---|
url | string | — |
rangeoptional | { begin: number; end: number } | Bytes begin (inclusive) to end (exclusive); absent when the whole file is wanted. |
headersoptional | Record<string, string> | — |
withCredentials | boolean | — |
signal | AbortSignal | — |
Defined in packages/pdf/src/render/compat.ts:19
LoadingTaskinterface#
interface LoadingTask| Property | Type | Description |
|---|---|---|
promise | Promise<PdfRenderDocument> | — |
destroy() | () => Promise<void> | — |
onPasswordoptional | (update: (password: string) => void, reason: number) => void | Called when a password is needed: reason 1 the first time, 2 after a wrong password. |
onProgressoptional | (progress: { loaded: number; total: number }) => void | — |
Defined in packages/pdf/src/render/compat.ts:11
MarkedContentIteminterface#
interface MarkedContentItem| Property | Type | Description |
|---|---|---|
type | 'beginMarkedContent' | 'beginMarkedContentProps' | 'endMarkedContent' | — |
idoptional | string | — |
tagoptional | string | — |
Defined in packages/pdf/src/render/document/text-content.ts:14
OpenDocumentOptionsinterface#
interface OpenDocumentOptions| Property | Type | Description |
|---|---|---|
passwordoptional | string | — |
onPasswordoptional | (reason: PasswordReason) => string | undefined | Promise<string | undefined> | Asked for a password when the document needs one; resolve with undefined to give up. |
limitsoptional | Partial<PdfLimits> | — |
renderLimitsoptional | Partial<RenderLimits> | — |
substituteFontoptional | SubstituteFontProvider | Font bytes for fonts the document does not embed. Without it such text goes through canvas fonts. |
standardFontsoptional | () => 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. |
predefinedCMapsoptional | (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. |
canvasFactoryoptional | CanvasFactory | — |
Defined in packages/pdf/src/render/document/document.ts:46
OptionalContentConfiginterface#
interface OptionalContentConfig| Property | Type | Description |
|---|---|---|
namereadonly | string | null | — |
creatorreadonly | 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 | — |
Defined in packages/pdf/src/render/document/optional-content.ts:14
OptionalContentGroupinterface#
interface OptionalContentGroup| Property | Type | Description |
|---|---|---|
name | string | null | — |
visible | boolean | — |
intent | string | string[] | — |
usage | Record<string, unknown> | — |
rbGroups | Set<string>[] | — |
Defined in packages/pdf/src/render/document/optional-content.ts:4
OutlineNodeinterface#
interface OutlineNode| Property | Type | Description |
|---|---|---|
title | string | — |
dest | string | ExplicitDestination | null | — |
url | string | null | — |
newWindowoptional | boolean | — |
bold | boolean | — |
italic | boolean | — |
color | [number, number, number] | — |
count | number | undefined | — |
items | OutlineNode[] | — |
Defined in packages/pdf/src/render/document/catalog.ts:25
PageViewportinterface#
interface PageViewport| Property | Type | Description |
|---|---|---|
viewBoxreadonly | [number, number, number, number] | — |
widthreadonly | number | — |
heightreadonly | number | — |
scalereadonly | number | — |
rotationreadonly | number | — |
offsetXreadonly | number | — |
offsetYreadonly | number | — |
transformreadonly | 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] | — |
Defined in packages/pdf/src/render/document/viewport.ts:11
PatternPaintinterface#
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. |
Defined in packages/pdf/src/render/target.ts:40
PdfRenderDocumentinterface#
interface PdfRenderDocument| Property | Type | Description |
|---|---|---|
numPagesreadonly | number | — |
pageCountreadonly | number | — |
isEncryptedreadonly | boolean | — |
fingerprintsreadonly | [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> | — |
Defined in packages/pdf/src/render/document/document.ts:139
PdfRenderPageinterface#
interface PdfRenderPage| Property | Type | Description |
|---|---|---|
pageNumberreadonly | number | — |
pageIndexreadonly | number | — |
refreadonly | DestinationRef | — |
viewreadonly | number[] | The visible box (CropBox clipped to MediaBox) in default user space. |
rotatereadonly | number | — |
userUnitreadonly | 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 | — |
Defined in packages/pdf/src/render/document/document.ts:110
PdfVisualComparisoninterface#
interface PdfVisualComparison extends PdfComparison| Property | Type | Description |
|---|---|---|
visual | VisualPageComparison[] | — |
pages | PdfPageComparison[] | Inherited from PdfComparison. |
changes | PdfTextChange[] | Inherited from PdfComparison. |
summary | PdfComparisonSummary | Inherited from PdfComparison. |
annotationsoptional | { a: AnnotationInput[]; b: AnnotationInput[]; } | undefined | Inherited from PdfComparison. |
Defined in packages/pdf/src/compare/visual.ts:39
PredefinedCMapDatainterface#
interface PredefinedCMapDataThe 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. |
Defined in packages/pdf/src/render/fonts/predefined-cmaps.ts:7
ProgressiveOptionsinterface#
interface ProgressiveOptions extends OpenDocumentOptions| Property | Type | Description |
|---|---|---|
chunkSizeoptional | number | Bytes per request while the rest of the file is fetched. |
onProgressoptional | (progress: { loaded: number; total: number }) => void | — |
signaloptional | AbortSignal | — |
openCompleteoptional | (bytes: Uint8Array, options: OpenDocumentOptions) => Promise<PdfRenderDocument> | Opens the complete file once every byte has arrived. Defaults to opening it on the calling thread. |
passwordoptional | string | undefined | Inherited from OpenDocumentOptions. |
onPasswordoptional | ((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. |
limitsoptional | Partial<PdfLimits> | undefined | Inherited from OpenDocumentOptions. |
renderLimitsoptional | Partial<RenderLimits> | undefined | Inherited from OpenDocumentOptions. |
substituteFontoptional | SubstituteFontProvider | undefined | Font bytes for fonts the document does not embed. Without it such text goes through canvas fonts. Inherited from OpenDocumentOptions. |
standardFontsoptional | (() => 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. |
predefinedCMapsoptional | ((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. |
canvasFactoryoptional | CanvasFactory | undefined | Inherited from OpenDocumentOptions. |
Defined in packages/pdf/src/render/document/progressive.ts:19
RangeLoaderinterface#
interface RangeLoader| Property | Type | Description |
|---|---|---|
length | number | — |
read() | (begin: number, end: number) => Promise<Uint8Array> | — |
initialDataoptional | Uint8Array | null | — |
Defined in packages/pdf/src/render/document/progressive.ts:13
RasterImageinterface#
interface RasterImage| Property | Type | Description |
|---|---|---|
width | number | — |
height | number | — |
data | Uint8ClampedArray | RGBA, 8 bits per channel, not premultiplied, row 0 at the top. |
bitmapoptional | unknown | Set by a target that decoded the image natively (ImageBitmap in a browser). |
Defined in packages/pdf/src/render/target.ts:24
RenderEngineinterface#
interface RenderEngine| Property | Type | Description |
|---|---|---|
getDocument() | (source: DocumentSource) => LoadingTask | — |
AnnotationMode | typeof ANNOTATION_MODE | — |
RangeTransport | typeof RangeTransport | — |
modereadonly | 'worker' | 'main' | Where documents opened from now on are parsed and rasterised. |
destroy() | () => void | — |
Defined in packages/pdf/src/render/compat.ts:108
RenderEngineOptionsinterface#
interface RenderEngineOptions extends Omit<OpenDocumentOptions, 'standardFonts' | 'predefinedCMaps'>| Property | Type | Description |
|---|---|---|
standardFontsoptional | 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). |
predefinedCMapsoptional | 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. |
workeroptional | 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. |
onWorkerFallbackoptional | (error: unknown) => void | Called once when the worker cannot be constructed or started and the engine continues on the calling thread. |
allowFetchoptional | boolean | Lets the engine load url sources with the global fetch. Off by default: the engine makes no network calls of its own. |
fetchDocumentoptional | FetchDocument | Loads url sources on behalf of the engine; takes precedence over allowFetch. |
limitsoptional | Partial<PdfLimits> | undefined | Inherited from OpenDocumentOptions. |
passwordoptional | string | undefined | Inherited from OpenDocumentOptions. |
onPasswordoptional | ((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. |
renderLimitsoptional | Partial<RenderLimits> | undefined | Inherited from OpenDocumentOptions. |
substituteFontoptional | SubstituteFontProvider | undefined | Font bytes for fonts the document does not embed. Without it such text goes through canvas fonts. Inherited from OpenDocumentOptions. |
canvasFactoryoptional | CanvasFactory | undefined | Inherited from OpenDocumentOptions. |
Defined in packages/pdf/src/render/compat.ts:82
RenderLimitsinterface#
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. |
Defined in packages/pdf/src/render/limits.ts:1
RenderParametersinterface#
interface RenderParameters| Property | Type | Description |
|---|---|---|
viewport | PageViewport | — |
canvasContextoptional | Canvas2D | — |
canvasoptional | HTMLCanvasElement | OffscreenCanvas | null | — |
targetoptional | RenderTarget | Any surface implementing RenderTarget; takes precedence over the canvas. |
transformoptional | number[] | Extra device-space transform applied after the viewport, for example a HiDPI scale. |
backgroundoptional | string | null | CSS colour painted first; 'transparent' paints nothing. Targets other than a canvas accept white only. |
intentoptional | 'display' | 'print' | — |
annotationModeoptional | number | — |
optionalContentConfigPromiseoptional | Promise<OptionalContentConfig | null | undefined> | — |
signaloptional | AbortSignal | — |
timeSliceoptional | number | Milliseconds of uninterrupted work before yielding to the event loop; 0 renders in one go. |
pixelAlignmentoptional | 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. |
Defined in packages/pdf/src/render/document/document.ts:71
RenderTargetinterface#
interface RenderTargetThe 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 |
|---|---|---|
widthreadonly | number | — |
heightreadonly | 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()optional | (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()optional | (text: string, font: SystemFont) => number | — |
setKnockout()optional | (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. |
acceptsBitmapsoptionalreadonly | boolean | True when drawImage takes images that carry a natively decoded bitmap and no pixel data. |
dispose()optional | () => void | Releases backing memory of an offscreen surface. |
Defined in packages/pdf/src/render/target.ts:88
RenderTaskinterface#
interface RenderTask| Property | Type | Description |
|---|---|---|
promise | Promise<void> | — |
cancel() | () => void | — |
warningsreadonly | RenderWarning[] | Unsupported features met while rendering; complete once the promise settles. |
Defined in packages/pdf/src/render/document/document.ts:94
RenderWarninginterface#
interface RenderWarning| Property | Type | Description |
|---|---|---|
code | RenderWarningCode | — |
feature | string | — |
message | string | — |
count | number | — |
Defined in packages/pdf/src/render/errors.ts:37
RenderWarningEventinterface#
interface RenderWarningEvent| Property | Type | Description |
|---|---|---|
pageIndex | number | — |
warnings | RenderWarning[] | — |
Defined in packages/pdf/src/render/document/document.ts:101
RenderWorkerClientinterface#
interface RenderWorkerClient| Property | Type | Description |
|---|---|---|
modereadonly | 'worker' | 'main' | — |
open() | (data: Uint8Array | ArrayBuffer, options?: OpenDocumentOptions) => Promise<PdfRenderDocument> | — |
destroy() | () => void | — |
Defined in packages/pdf/src/render/worker/client.ts:45
RenderWorkerOptionsinterface#
interface RenderWorkerOptions| Property | Type | Description |
|---|---|---|
workeroptional | Worker | A worker running the @birchui/pdf/render-worker entry. Without one, or without OffscreenCanvas, work runs on the calling thread. |
terminateOnDestroyoptional | boolean | Terminate the worker when the client is destroyed. Default true. |
standardFontsoptional | () => 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. |
predefinedCMapsoptional | (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. |
Defined in packages/pdf/src/render/worker/client.ts:28
StrokeStyleinterface#
interface StrokeStyle| Property | Type | Description |
|---|---|---|
lineWidth | number | — |
cap | 0 | 1 | 2 | — |
join | 0 | 1 | 2 | — |
miterLimit | number | — |
dash | number[] | — |
dashPhase | number | — |
Defined in packages/pdf/src/render/target.ts:50
StructElementinterface#
interface StructElement| Property | Type | Description |
|---|---|---|
role | string | — |
children | (StructElement | { type: 'content' | 'object' | 'annotation'; id: string })[] | — |
altoptional | string | — |
langoptional | string | — |
Defined in packages/pdf/src/render/document/catalog.ts:200
SubstituteFontRequestinterface#
interface SubstituteFontRequest| Property | Type | Description |
|---|---|---|
name | string | — |
family | 'serif' | 'sans-serif' | 'monospace' | 'symbol' | 'dingbats' | — |
isBold | boolean | — |
isItalic | boolean | — |
orderingoptional | string | Character collection of a composite font, for example Japan1, GB1, CNS1 or Korea1. |
Defined in packages/pdf/src/render/pdf-font/loader.ts:17
SystemFontinterface#
interface SystemFontDefined in packages/pdf/src/render/target.ts:70
TextContentinterface#
interface TextContent| Property | Type | Description |
|---|---|---|
items | (TextItem | MarkedContentItem)[] | — |
styles | Record<string, TextStyle> | — |
lang | string | null | — |
Defined in packages/pdf/src/render/document/text-content.ts:27
TextIteminterface#
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 | — |
Defined in packages/pdf/src/render/document/text-content.ts:3
TextStyleinterface#
interface TextStyle| Property | Type | Description |
|---|---|---|
fontFamily | string | — |
ascent | number | — |
descent | number | — |
vertical | boolean | — |
Defined in packages/pdf/src/render/document/text-content.ts:20
ViewportParametersinterface#
interface ViewportParameters| Property | Type | Description |
|---|---|---|
scale | number | — |
rotationoptional | number | — |
offsetXoptional | number | — |
offsetYoptional | number | — |
dontFlipoptional | boolean | — |
Defined in packages/pdf/src/render/document/viewport.ts:3
VisualCompareOptionsinterface#
interface VisualCompareOptions| Property | Type | Description |
|---|---|---|
scaleoptional | number | Pixels per point of the pages that are compared. Default 1.5. |
toleranceoptional | number | Largest difference of a colour channel that still counts as equal, 0 to 255. Default 16. |
mergeDistanceoptional | number | Changed areas closer than this many pixels are reported as one. Default 12. |
maxPixelsoptional | number | Upper bound of the pixels of one rendered page; larger pages are compared at a lower scale. |
standardFontsoptional | OpenDocumentOptions['standardFonts'] | Supplies the substitute faces for fonts that are not embedded, as for openRenderDocument. |
Defined in packages/pdf/src/compare/visual.ts:8
VisualPageComparisoninterface#
interface VisualPageComparison| Property | Type | Description |
|---|---|---|
pageIndexAoptional | number | — |
pageIndexBoptional | 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[] | — |
Defined in packages/pdf/src/compare/visual.ts:26
VisualRegioninterface#
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. |
Defined in packages/pdf/src/compare/visual.ts:21
BlendModetype#
type BlendMode =
| 'normal'
| 'multiply'
| 'screen'
| 'overlay'
| 'darken'
| 'lighten'
| 'color-dodge'
| 'color-burn'
| 'hard-light'
| 'soft-light'
| 'difference'
| 'exclusion'
| 'hue'
| 'saturation'
| 'color'
| 'luminosity';Defined in packages/pdf/src/render/target.ts:6
Canvas2Dtype#
type Canvas2D = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;Defined in packages/pdf/src/render/document/canvas-target.ts:16
CanvasFactorytype#
type CanvasFactory = (width: number, height: number) => AnyCanvas;Defined in packages/pdf/src/render/document/canvas-target.ts:19
CMapCollectiontype#
type CMapCollection = 'Japan1' | 'GB1' | 'CNS1' | 'Korea1' | 'Japan2' | 'KR';A character collection of the Adobe registry whose predefined CMaps can be loaded.
Defined in packages/pdf/src/render/fonts/predefined-cmaps.ts:4
ExplicitDestinationtype#
type ExplicitDestination = (DestinationRef | { name: string } | number | null)[];Explicit destination in the shape viewers expect: [page reference or index, { name: fit mode }, ...numbers].
Defined in packages/pdf/src/render/document/catalog.ts:23
FetchDocumenttype#
type FetchDocument = (request: FetchDocumentRequest) => Promise<FetchDocumentReply>;Defined in packages/pdf/src/render/compat.ts:34
FillRuletype#
type FillRule = 'nonzero' | 'evenodd';Defined in packages/pdf/src/render/target.ts:4
Matrixtype#
type Matrix = [a: number, b: number, c: number, d: number, e: number, f: number];Defined in packages/pdf/src/render/matrix.ts:1
OptionalContentOrdertype#
type OptionalContentOrder = (string | { name: string | null; order: OptionalContentOrder })[];Defined in packages/pdf/src/render/document/optional-content.ts:12
Painttype#
type Paint = ColorPaint | PatternPaint;Defined in packages/pdf/src/render/target.ts:48
PasswordReasontype#
type PasswordReason = 'password-required' | 'password-incorrect';Defined in packages/pdf/src/render/document/document.ts:44
PdfRenderErrorCodetype#
type PdfRenderErrorCode =
| 'cancelled'
| 'invalid-document'
| 'invalid-page'
| 'password-required'
| 'password-incorrect'
| 'limit-exceeded'
| 'unsupported'
| 'fetch-not-allowed'
| 'destroyed'
| 'internal';Defined in packages/pdf/src/render/errors.ts:1
RenderWarningCodetype#
type RenderWarningCode =
| 'unsupported-operator'
| 'unsupported-colorspace'
| 'unsupported-shading'
| 'unsupported-pattern'
| 'unsupported-font'
| 'unsupported-image'
| 'unsupported-transparency'
| 'unsupported-function'
| 'substituted-font'
| 'malformed-content'
| 'limit-reached';Defined in packages/pdf/src/render/errors.ts:24
SubstituteFontProvidertype#
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.
Defined in packages/pdf/src/render/pdf-font/loader.ts:27
@birchui/pdf/render-cmaps#
cmapCollectionOffunction#
function cmapCollectionOf(name: string): CMapCollection | undefinedThe collection a predefined CMap name of ISO 32000-1 table 118 (or a sibling of one) belongs to.
| Parameter | Type | Description |
|---|---|---|
name | string | — |
Defined in packages/pdf/src/render/fonts/predefined-cmaps.ts:98
loadPredefinedCMapsfunction#
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 | — |
Defined in packages/pdf/src/render-cmaps.ts:50
registerAllPredefinedCMapsfunction#
function registerAllPredefinedCMaps(): Promise<void>Loads and registers every collection, for code that reads text synchronously afterwards.
Defined in packages/pdf/src/render-cmaps.ts:69
registerPredefinedCMapsfunction#
function registerPredefinedCMaps(...data: (PredefinedCMapData | undefined)[]): voidMakes 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)[] | — |
Defined in packages/pdf/src/render/fonts/predefined-cmaps.ts:117
unregisterPredefinedCMapsfunction#
function unregisterPredefinedCMaps(...collections: CMapCollection[]): voidForgets registered data: every collection, or the ones named.
| Parameter | Type | Description |
|---|---|---|
...collections | CMapCollection[] | — |
Defined in packages/pdf/src/render/fonts/predefined-cmaps.ts:132
CMAP_COLLECTIONSconst#
const CMAP_COLLECTIONS: readonly CMapCollection[]Defined in packages/pdf/src/render-cmaps.ts:12
loadCns1CMapsconst#
const loadCns1CMaps: () => Promise<PredefinedCMapData | undefined>Defined in packages/pdf/src/render-cmaps.ts:63
loadGb1CMapsconst#
const loadGb1CMaps: () => Promise<PredefinedCMapData | undefined>Defined in packages/pdf/src/render-cmaps.ts:62
loadJapan1CMapsconst#
const loadJapan1CMaps: () => Promise<PredefinedCMapData | undefined>Defined in packages/pdf/src/render-cmaps.ts:61
loadJapan2CMapsconst#
const loadJapan2CMaps: () => Promise<PredefinedCMapData | undefined>Defined in packages/pdf/src/render-cmaps.ts:65
loadKorea1CMapsconst#
const loadKorea1CMaps: () => Promise<PredefinedCMapData | undefined>Defined in packages/pdf/src/render-cmaps.ts:64
loadKrCMapsconst#
const loadKrCMaps: () => Promise<PredefinedCMapData | undefined>Defined in packages/pdf/src/render-cmaps.ts:66
PREDEFINED_CMAP_SOURCESconst#
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.
Defined in packages/pdf/src/render-cmaps.ts:15
PredefinedCMapDatainterface#
interface PredefinedCMapDataThe 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. |
Defined in packages/pdf/src/render/fonts/predefined-cmaps.ts:7
CMapCollectiontype#
type CMapCollection = 'Japan1' | 'GB1' | 'CNS1' | 'Korea1' | 'Japan2' | 'KR';A character collection of the Adobe registry whose predefined CMaps can be loaded.
Defined in packages/pdf/src/render/fonts/predefined-cmaps.ts:4
@birchui/pdf/render-fonts#
createStandardFontProviderfunction#
function createStandardFontProvider(fallback?: SubstituteFontProvider): SubstituteFontProviderOutlines 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 |
|---|---|---|
fallbackoptional | SubstituteFontProvider | — |
Defined in packages/pdf/src/render-fonts.ts:52
standardFontDatafunction#
function standardFontData(face: StandardFontFace): Uint8Array | undefinedThe TrueType data of one face: Windows-1252 and common punctuation, or the Symbol or Dingbats repertoire.
| Parameter | Type | Description |
|---|---|---|
face | StandardFontFace | — |
Defined in packages/pdf/src/render-fonts.ts:27
standardFontFaceForfunction#
function standardFontFaceFor(request: SubstituteFontRequest): StandardFontFace | undefined| Parameter | Type | Description |
|---|---|---|
request | SubstituteFontRequest | — |
Defined in packages/pdf/src/render/pdf-font/standard-faces.ts:21
standardFontFacesfunction#
function standardFontFaces(): StandardFontFacesEvery face of the pack, decoded; this is what a render worker is sent.
Defined in packages/pdf/src/render-fonts.ts:39
STANDARD_FONT_FACESconst#
const STANDARD_FONT_FACES: readonly StandardFontFace[]Defined in packages/pdf/src/render-fonts.ts:9
STANDARD_FONT_SOURCESconst#
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.
Defined in packages/pdf/src/render-fonts.ts:12
StandardFontFacetype#
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';Defined in packages/pdf/src/render/pdf-font/standard-faces.ts:3
StandardFontFacestype#
type StandardFontFaces = Partial<Record<StandardFontFace, Uint8Array>>;Defined in packages/pdf/src/render/pdf-font/standard-faces.ts:19