pdfnative 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -492,9 +492,42 @@ interface PdfLayoutOptions {
492
492
  * @since 1.4.0
493
493
  */
494
494
  readonly viewerPreferences?: ViewerPreferences;
495
+ /**
496
+ * Draw a diagnostic layout overlay on every page to visualise how the
497
+ * document builder placed content. Purely a development aid — leave it
498
+ * off (the default) for production output.
499
+ *
500
+ * - `false` / omitted: no overlay (default — output is byte-identical).
501
+ * - `true`: draw all overlay layers (margin box, block content bounds,
502
+ * and table cell outlines).
503
+ * - object: enable individual layers selectively.
504
+ *
505
+ * The overlay is drawn with thin, semi-transparent-free stroked rectangles
506
+ * in distinct colours and never alters text placement, so a document built
507
+ * with `debug` on has identical content geometry to one built with it off —
508
+ * only extra guide rectangles are added.
509
+ *
510
+ * @since 1.5.0
511
+ */
512
+ readonly debug?: boolean | LayoutDebugOptions;
513
+ }
514
+ /**
515
+ * Fine-grained control over the {@link PdfLayoutOptions.debug} overlay layers.
516
+ * Every layer defaults to `false`; pass `debug: true` to enable them all.
517
+ *
518
+ * @since 1.5.0
519
+ */
520
+ interface LayoutDebugOptions {
521
+ /** Draw the page content box (page rect inset by the margins). */
522
+ readonly showMargins?: boolean;
523
+ /** Draw a rectangle around each block's laid-out content bounds. */
524
+ readonly showContentBounds?: boolean;
525
+ /** Draw cell outlines for every table cell. */
526
+ readonly showCells?: boolean;
495
527
  }
496
528
  /**
497
529
  * Viewer presentation preferences (ISO 32000-1 §12.2, Table 150 + §7.7.2).
530
+ *
498
531
  * Every field is optional; omitted fields leave the viewer's default behaviour
499
532
  * unchanged. Purely presentational and PDF/A-safe.
500
533
  *
@@ -538,6 +571,63 @@ interface ViewerPreferences {
538
571
  /** Page-scaling default for the Print dialog (`/PrintScaling`). */
539
572
  readonly printScaling?: 'none' | 'appDefault';
540
573
  }
574
+ /**
575
+ * One block's laid-out footprint, as reported by {@link inspectDocumentLayout}.
576
+ * Coordinates are in PDF user space (origin bottom-left, points), matching the
577
+ * document builder: `top` is the y-coordinate of the block's upper edge and
578
+ * `height` extends downward from it.
579
+ *
580
+ * @since 1.5.0
581
+ */
582
+ interface InspectedBlock {
583
+ /** The originating block's `type` (e.g. `'heading'`, `'paragraph'`, `'table'`). */
584
+ readonly type: string;
585
+ /** 0-based index of the page this block was placed on. */
586
+ readonly page: number;
587
+ /** X-coordinate of the block's left edge (points). */
588
+ readonly x: number;
589
+ /** Y-coordinate of the block's top edge (points, y increases upward). */
590
+ readonly top: number;
591
+ /** Content width available to the block (points). */
592
+ readonly width: number;
593
+ /** Estimated block height (points). */
594
+ readonly height: number;
595
+ }
596
+ /** One page's worth of {@link InspectedBlock}s. @since 1.5.0 */
597
+ interface InspectedPage {
598
+ /** 0-based page index. */
599
+ readonly index: number;
600
+ /** Blocks placed on this page, in render order. */
601
+ readonly blocks: readonly InspectedBlock[];
602
+ }
603
+ /**
604
+ * Deterministic, read-only description of how {@link inspectDocumentLayout}
605
+ * expects the document builder to paginate and place a set of blocks. Useful
606
+ * for debugging layout, writing layout assertions in tests, or building
607
+ * higher-level tooling — it never renders a PDF.
608
+ *
609
+ * The result mirrors the builder's pagination using the same measurement
610
+ * primitives; treat the per-block geometry as a faithful estimate.
611
+ *
612
+ * @since 1.5.0
613
+ */
614
+ interface LayoutInspection {
615
+ /** Page width in points. */
616
+ readonly pageWidth: number;
617
+ /** Page height in points. */
618
+ readonly pageHeight: number;
619
+ /** Page margins `{ t, r, b, l }` in points. */
620
+ readonly margins: {
621
+ readonly t: number;
622
+ readonly r: number;
623
+ readonly b: number;
624
+ readonly l: number;
625
+ };
626
+ /** Total number of pages the blocks paginate into. */
627
+ readonly totalPages: number;
628
+ /** Per-page block placement. */
629
+ readonly pages: readonly InspectedPage[];
630
+ }
541
631
  /**
542
632
  * Relationship of an embedded file to the PDF document (ISO 19005-3 §6.8).
543
633
  * - `'Source'`: the embedded file is the source of the document
@@ -904,7 +994,7 @@ declare function parseSvgPath(d: string): SvgSegment[];
904
994
  * @param options - Fill, stroke, viewBox options
905
995
  * @returns PDF content stream operators string
906
996
  */
907
- declare function renderSvg(data: string, x: number, y: number, w: number, h: number, options?: SvgRenderOptions): string;
997
+ declare function renderSvg(data: string, x: number, y: number, w: number, h: number, options?: SvgRenderOptions, enc?: EncodingContext): string;
908
998
 
909
999
  /**
910
1000
  * pdfnative — AcroForm Interactive Fields (ISO 32000-1 §12.7)
@@ -1725,6 +1815,133 @@ declare function buildDocumentPDF(params: DocumentParams, layoutOptions?: Partia
1725
1815
  */
1726
1816
  declare function buildDocumentPDFBytes(params: DocumentParams, layoutOptions?: Partial<PdfLayoutOptions>): Uint8Array;
1727
1817
 
1818
+ /**
1819
+ * pdfnative — Layout Inspection (development / tooling aid)
1820
+ * ========================================================
1821
+ * `inspectDocumentLayout()` reports, without rendering a PDF, how the document
1822
+ * builder is expected to paginate a set of blocks and where each block lands.
1823
+ * It reuses the exact same measurement primitives as the builder
1824
+ * (`estimateBlockHeight`, `planTable`, the layout constants), so the reported
1825
+ * geometry is a faithful estimate of the real output.
1826
+ *
1827
+ * This is read-only and deterministic — ideal for debugging layout issues,
1828
+ * writing layout assertions in tests, or driving higher-level tooling.
1829
+ *
1830
+ * @since 1.5.0
1831
+ */
1832
+
1833
+ /**
1834
+ * Inspect how {@link DocumentParams.blocks} will paginate and where each block
1835
+ * is placed, without building a PDF.
1836
+ *
1837
+ * @param params The same document params passed to `buildDocumentPDF`.
1838
+ * @param layoutOptions Optional layout overrides (page size, margins, tagged
1839
+ * mode, header template…). `params.layout` is used when
1840
+ * omitted, matching the builder.
1841
+ * @returns A deterministic {@link LayoutInspection}.
1842
+ */
1843
+ declare function inspectDocumentLayout(params: DocumentParams, layoutOptions?: Partial<PdfLayoutOptions>): LayoutInspection;
1844
+
1845
+ /**
1846
+ * pdfnative — Markup & Drawing Annotations (ISO 32000-1 §12.5)
1847
+ * ============================================================
1848
+ * Typed builders for the common non-link annotation types: text (sticky
1849
+ * note), the text-markup family (highlight / underline / strike-out /
1850
+ * squiggly), the drawing family (square / circle / line), and free text.
1851
+ *
1852
+ * Each builder emits a single self-contained indirect object. Annotations
1853
+ * are referenced from a page's `/Annots` array — use the parser's
1854
+ * `PdfModifier.addAnnotation()` to attach one to an existing document, or
1855
+ * emit the object directly when assembling a PDF.
1856
+ *
1857
+ * Security: `/Contents` and `/T` are encoded via `encodePdfTextString`
1858
+ * (PDFDocEncoding literal or UTF-16BE hex), so arbitrary user text — including
1859
+ * newlines and non-Latin scripts — is safely escaped.
1860
+ *
1861
+ * @since 1.5.0
1862
+ */
1863
+
1864
+ /** Rectangle `[x1, y1, x2, y2]` in PDF user space (points). */
1865
+ type AnnotationRect = readonly [number, number, number, number];
1866
+ /** Fields shared by every markup / drawing annotation. */
1867
+ interface AnnotationBase {
1868
+ /** Annotation rectangle `[x1, y1, x2, y2]`. */
1869
+ readonly rect: AnnotationRect;
1870
+ /** Text content / note body (`/Contents`). Safely encoded. */
1871
+ readonly contents?: string;
1872
+ /** Annotation colour (`/C`) — border/line/icon colour. */
1873
+ readonly color?: PdfColor;
1874
+ /** Constant opacity `/CA` in `[0, 1]`. */
1875
+ readonly opacity?: number;
1876
+ /** Author / title (`/T`). */
1877
+ readonly title?: string;
1878
+ /** Modification date string, e.g. `D:20260705120000Z` (`/M`). */
1879
+ readonly modified?: string;
1880
+ /** Annotation flags bitfield (`/F`). Default `4` (Print). */
1881
+ readonly flags?: number;
1882
+ }
1883
+ /** Sticky-note text annotation (`/Subtype /Text`). */
1884
+ interface TextAnnotation extends AnnotationBase {
1885
+ readonly type: 'text';
1886
+ /** Whether the note pop-up is initially open (`/Open`). */
1887
+ readonly open?: boolean;
1888
+ /** Icon name (`/Name`): `Note`, `Comment`, `Key`, `Help`, `Insert`, … */
1889
+ readonly icon?: string;
1890
+ }
1891
+ /** Text-markup annotation (highlight / underline / strike-out / squiggly). */
1892
+ interface TextMarkupAnnotation extends AnnotationBase {
1893
+ readonly type: 'highlight' | 'underline' | 'strikeout' | 'squiggly';
1894
+ /**
1895
+ * Quadrilateral points (`/QuadPoints`), 8 numbers per marked region:
1896
+ * `x1 y1 x2 y2 x3 y3 x4 y4` (upper-left, upper-right, lower-left,
1897
+ * lower-right). When omitted, the `rect` corners are used.
1898
+ */
1899
+ readonly quadPoints?: readonly number[];
1900
+ }
1901
+ /** Rectangle / ellipse drawing annotation. */
1902
+ interface ShapeAnnotation extends AnnotationBase {
1903
+ readonly type: 'square' | 'circle';
1904
+ /** Interior fill colour (`/IC`). */
1905
+ readonly interiorColor?: PdfColor;
1906
+ /** Border width in points (`/BS /W`). Default `1`. */
1907
+ readonly borderWidth?: number;
1908
+ }
1909
+ /** Straight-line annotation (`/Subtype /Line`). */
1910
+ interface LineAnnotation extends AnnotationBase {
1911
+ readonly type: 'line';
1912
+ /** Line start point `[x, y]`. */
1913
+ readonly start: readonly [number, number];
1914
+ /** Line end point `[x, y]`. */
1915
+ readonly end: readonly [number, number];
1916
+ /** Line width in points (`/BS /W`). Default `1`. */
1917
+ readonly borderWidth?: number;
1918
+ }
1919
+ /** Free-text (typewriter) annotation (`/Subtype /FreeText`). */
1920
+ interface FreeTextAnnotation extends AnnotationBase {
1921
+ readonly type: 'freetext';
1922
+ /** Font size in points for the default appearance (`/DA`). Default `12`. */
1923
+ readonly fontSize?: number;
1924
+ }
1925
+ /** Any builder-supported annotation. */
1926
+ type MarkupAnnotation = TextAnnotation | TextMarkupAnnotation | ShapeAnnotation | LineAnnotation | FreeTextAnnotation;
1927
+ /**
1928
+ * Build a markup / drawing annotation as a PDF indirect object.
1929
+ *
1930
+ * @param annot The typed annotation description.
1931
+ * @param objNum Object number to assign.
1932
+ * @returns `"<objNum> 0 obj … endobj"` string.
1933
+ */
1934
+ declare function buildAnnotation(annot: MarkupAnnotation, objNum: number): string;
1935
+ /**
1936
+ * Build just the annotation dictionary (`<< … >>`), without the
1937
+ * `obj`/`endobj` wrapper. Use this with the parser's
1938
+ * `PdfModifier.addAnnotation()` to attach an annotation to an existing page.
1939
+ *
1940
+ * @param annot The typed annotation description.
1941
+ * @returns The annotation dictionary string.
1942
+ */
1943
+ declare function buildAnnotationBody(annot: MarkupAnnotation): string;
1944
+
1728
1945
  /**
1729
1946
  * pdfnative — Color Parsing, Validation & Normalization
1730
1947
  * =======================================================
@@ -2952,6 +3169,16 @@ declare function isKhmerCodepoint(cp: number): boolean;
2952
3169
  declare function isMyanmarCodepoint(cp: number): boolean;
2953
3170
  /** Check if a codepoint falls in any Devanagari Unicode block. */
2954
3171
  declare function isDevanagariCodepoint(cp: number): boolean;
3172
+ /**
3173
+ * Check if a codepoint should be routed to a mathematical font (e.g. Noto
3174
+ * Sans Math). Covers the Mathematical Operators, Supplemental Mathematical
3175
+ * Operators, Geometric Shapes, and Miscellaneous Mathematical Symbols-A/B
3176
+ * blocks. Deliberately excludes Letterlike Symbols (™ ® ℗ …) and the emoji
3177
+ * Miscellaneous-Symbols/Dingbats ranges so those keep their existing routing.
3178
+ *
3179
+ * @since 1.5.0
3180
+ */
3181
+ declare function isMathCodepoint(cp: number): boolean;
2955
3182
  /** Check if text contains Arabic characters requiring shaping. */
2956
3183
  declare function containsArabic(text: string): boolean;
2957
3184
  /** Check if text contains Hebrew characters. */
@@ -2976,6 +3203,8 @@ declare function containsKhmer(str: string): boolean;
2976
3203
  declare function containsMyanmar(str: string): boolean;
2977
3204
  /** Check whether a string contains any Devanagari characters. */
2978
3205
  declare function containsDevanagari(str: string): boolean;
3206
+ /** Check whether a string contains any mathematical symbols. */
3207
+ declare function containsMath(str: string): boolean;
2979
3208
 
2980
3209
  /**
2981
3210
  * pdfnative — Bengali Mini-Shaper
@@ -3864,6 +4093,29 @@ declare function getTrailerRef(trailer: PdfDict, key: string): PdfRef | undefine
3864
4093
  * const info = reader.info;
3865
4094
  */
3866
4095
 
4096
+ /**
4097
+ * A page annotation parsed by {@link PdfReader.getAnnotations}. Covers the
4098
+ * common fields across link, text-markup and drawing annotations; the raw
4099
+ * dictionary is available for anything not surfaced here.
4100
+ *
4101
+ * @since 1.5.0
4102
+ */
4103
+ interface ParsedAnnotation {
4104
+ /** Annotation subtype (`/Subtype`), e.g. `'Link'`, `'Highlight'`, `'Text'`. */
4105
+ readonly subtype: string;
4106
+ /** Annotation rectangle `[x1, y1, x2, y2]`, or `null` when malformed. */
4107
+ readonly rect: readonly [number, number, number, number] | null;
4108
+ /** Decoded `/Contents` text (UTF-16BE or PDFDocEncoding), when present. */
4109
+ readonly contents?: string;
4110
+ /** Decoded author / title (`/T`), when present. */
4111
+ readonly title?: string;
4112
+ /** Colour components (`/C`), 0–1, when present. */
4113
+ readonly color?: readonly number[];
4114
+ /** Text-markup quadrilateral points (`/QuadPoints`), when present. */
4115
+ readonly quadPoints?: readonly number[];
4116
+ /** Target URL for URI-action link annotations, when present. */
4117
+ readonly url?: string;
4118
+ }
3867
4119
  interface PdfReader {
3868
4120
  /** Total number of pages in the document. */
3869
4121
  readonly pageCount: number;
@@ -3899,6 +4151,27 @@ interface PdfReader {
3899
4151
  * Get the document info dictionary, if present.
3900
4152
  */
3901
4153
  getInfo(): PdfDict | null;
4154
+ /**
4155
+ * Read the document's `/PageLabels` number tree (ISO 32000-1 §12.4.2)
4156
+ * back into an ordered list of {@link PageLabelRange}s.
4157
+ *
4158
+ * Returns `null` when the catalog has no `/PageLabels` entry.
4159
+ * The result is the round-trip complement of `buildPageLabelsDict`.
4160
+ */
4161
+ getPageLabels(): PageLabelRange[] | null;
4162
+ /**
4163
+ * Read the `/Annots` array of the given page (0-based) and return the
4164
+ * parsed annotations (ISO 32000-1 §12.5). Link, text-markup and drawing
4165
+ * annotations are surfaced with their common fields; use
4166
+ * {@link ParsedAnnotation} for the shape.
4167
+ */
4168
+ getAnnotations(pageIndex: number): ParsedAnnotation[];
4169
+ /**
4170
+ * Get the indirect reference of the page at the given index (0-based),
4171
+ * or `null` when out of range. Useful for incremental modification
4172
+ * (e.g. attaching an annotation via `PdfModifier.addAnnotation`).
4173
+ */
4174
+ getPageRef(pageIndex: number): PdfRef | null;
3902
4175
  /**
3903
4176
  * Get decoded stream data for a stream object.
3904
4177
  * Handles /FlateDecode and /Filter chains.
@@ -3953,6 +4226,20 @@ interface PdfModifier {
3953
4226
  * Returns the new object number.
3954
4227
  */
3955
4228
  addRawObject(body: string): number;
4229
+ /**
4230
+ * Attach an annotation to a page's `/Annots` array via incremental update.
4231
+ *
4232
+ * The annotation dictionary body (`<< /Type /Annot … >>`, without the
4233
+ * `obj`/`endobj` wrapper — as produced by `buildAnnotationBody`) is added
4234
+ * as a new object, and the target page dictionary is rewritten with the
4235
+ * new reference appended to its `/Annots` array (created if absent).
4236
+ *
4237
+ * @param pageIndex 0-based page index.
4238
+ * @param annotationBody The annotation dictionary string.
4239
+ * @returns The new annotation object number.
4240
+ * @throws Error when `pageIndex` is out of range.
4241
+ */
4242
+ addAnnotation(pageIndex: number, annotationBody: string): number;
3956
4243
  /**
3957
4244
  * Get the current value of an object (modified or original).
3958
4245
  */
@@ -4253,4 +4540,4 @@ declare function createPDF(pdfParams: PdfParams, options?: {
4253
4540
  layoutOptions?: Partial<PdfLayoutOptions>;
4254
4541
  }): Promise<Uint8Array>;
4255
4542
 
4256
- export { type AddSignaturePlaceholderOptions, type Annotation, type Asn1Node, BAL_H, type BarcodeBlock, type BarcodeFormat, type BidiRun, type CellBorders, type CmsSignOptions, type ColorGlyph, type ColorGlyphForm, type ColorLayer, type ColorPaint, type ColorStop, type ColumnDef, type Contour, type CpalColor, type CryptoProvider, DEFAULT_COLORS, DEFAULT_COLUMNS, DEFAULT_CW, DEFAULT_FONT_SIZES, DEFAULT_MARGINS, DEFAULT_MAX_BLOCKS, DEFAULT_MAX_INFLATE_OUTPUT, type DocumentBlock, type DocumentMetadata, type DocumentParams, type EcPrivateKey, type EcPublicKey, type EmbeddedFilesResult, type EncodingContext, type EncryptionOptions, FT_H, type FontData, type FontEntry, type FontLoader, type FontMetrics, type FontRun, type FontValidationResult, type FormField, type FormFieldBlock, type FormFieldType, type FormWidgetResult, type GlyfFont, type GradientExtend, HEADER_H, type HeadingBlock, INFO_LN, type ImageBlock, type InternalLink, KNOWN_DECODE_FILTERS, type LinearGradientPaint, type LinkAnnotation, type LinkBlock, type ListBlock, type ListItem, MAX_PARSE_DEPTH, MAX_XREF_CHAIN, type MergeOptions, type OutlineItem, type OutlinePoint, type OutlineProvider, PAGE_SIZES, PDF_A_CONFORMANCE_TARGETS, PG_H, PG_W, type PageBreakBlock, type PageLabelRange, type PageLabelStyle, type PageRange, type PageTemplate, type ParagraphBlock, type PdfArray as ParsedArray, type PdfDict as ParsedDict, type ParsedImage, type PdfAConfig, type PdfAConformanceTarget, type PdfAttachment, type PdfAttachmentRelationship, type PdfColor, type PdfColors, type PdfIndirectObject, type PdfInfoItem, type PdfLayoutOptions, type PdfModifier, type PdfName, type PdfParams, type PdfReader, type PdfRef, type PdfRgbString, type PdfRgbTuple, type PdfRow, type PdfSignOptions, type PdfStream, type PdfToken, type PdfTokenizer, type PdfUAValidationResult, type PdfValue, type QRErrorLevel, ROW_H, type RadialGradientPaint, type RadioGroupContext, type RsaPrivateKey, type RsaPublicKey, type ShapedGlyph, type SigDictMetadata, type SignatureAlgorithm, type SolidPaint, type SpacerBlock, type StreamOptions, type StreamToFileResult, type SvgBlock, type SvgRenderOptions, type SvgSegment, TH_H, TITLE_LN, type TableBlock, type TextRun, type TocBlock, type TokenType, type UseCategory, type UseClassifiedCp, type UseCluster, type ViewerPreferences, WORKER_THRESHOLD, WORKER_TIMEOUT_MS, type WatermarkImage, type WatermarkOptions, type WatermarkState, type WatermarkText, type WorkerGenerationOptions, type WorkerInputMessage, type WorkerOutputMessage, type X509Certificate, type X509Name, type XrefEntry, type XrefTable, addSignaturePlaceholder, applyDecodeFilter, buildAcroFormDict, buildAppearanceStreamDict, buildCmsSignedData, buildDocumentPDF, buildDocumentPDFBytes, buildDocumentPDFStream, buildDocumentPDFStreamPageByPage, buildDocumentPDFStreamTrue, buildEmbeddedFiles, buildFormWidget, buildImageOperators, buildImageXObject, buildInternalLinkAnnotation, buildLinkAnnotation, buildPDF, buildPDFBytes, buildPDFStream, buildPDFStreamPageByPage, buildPDFStreamTrue, buildRadioGroupParent, buildSMaskXObject, buildSigDict, buildWatermarkState, chunkBinaryString, classifyClusters, classifyUseCategory, clearFontCache, computeColumnPositions, concatChunks, containsArabic, containsBengali, containsDevanagari, containsEthiopic, containsHebrew, containsKhmer, containsMyanmar, containsRTL, containsSinhala, containsTamil, containsTelugu, containsThai, containsTibetan, contoursToPath, createEncodingContext, createModifier, createPDF, createTokenizer, decodeASCII85, decodeASCIIHex, decodeEcPublicKey, decodeLZW, decodeRunLength, defaultFieldHeight, derBitString, derDecode, derInteger, derOctetString, derOid, derSequence, detectCharLang, detectFallbackLangs, detectImageFormat, dictGet, dictGetArray, dictGetDict, dictGetName, dictGetNum, dictGetRef, downloadBlob, ean13CheckDigit, ecPublicKeyFromPrivate, ecdsaSign, ecdsaVerify, encodeCode128, encodeEcPublicKey, encodePDF417, encodePdfTextString, estimateCmsSize, estimateContentsSize, extractGlyphContours, extractPages, findStartxref, generateDataMatrix, generatePDFInWorker, generatePDFMainThread, generateQR, getCryptoProvider, getMaxInflateOutputSize, getRegisteredLangs, getTrailerRef, getTrailerValue, hasFontLoader, helveticaBoldWidth, helveticaWidth, hmacSha256, inflateSync, initCrypto, initNodeCompression, initNodeDecompression as initNodeDecompression_parser, isArmenianCodepoint, isArray, isBengaliCodepoint, isCyrillicCodepoint, isDevanagariCodepoint, isDict, isEthiopicCodepoint, isGeorgianCodepoint, isKhmerCodepoint, isLinkAnnotation, isMyanmarCodepoint, isName, isRef, isSelfSigned, isSinhalaCodepoint, isStream, isTamilCodepoint, isTeluguCodepoint, isTibetanCodepoint, isValidPdfRgb, loadFontData, mergePdfs, nameValue, needsUnicodeFont, normalizeBidiEmbeddings, normalizeColors, openPdf, parseCertificate, parseColor, parseColrCpal, parseCpal, parseGlyfFont, parseImage, parseIndirectObject, parseJPEG, parsePNG, parseRsaPrivateKey, parseRsaPublicKey, parseSvgPath, parseValue, parseXrefTable, pdfString, registerFont, registerFonts, renderBarcode, renderCode128, renderColorGlyph, renderDataMatrix, renderEAN13, renderPDF417, renderQR, renderSvg, resetFontRegistry, resolveBidiRuns, resolveLayout, resolvePdfAConfig, resolveTemplate, rsaSign, rsaSignHash, rsaVerify, rsaVerifyHash, setCryptoProvider, setDeflateImpl, setInflateImpl, setMaxInflateOutputSize, sha384, sha512, shapeArabicText, shapeBengaliText, shapeDevanagariText, shapeKhmerText, shapeMyanmarText, shapeSinhalaText, shapeTamilText, shapeTeluguText, shapeThaiText, shapeTibetanText, signPdfBytes, slugify, splitPdf, splitTextByFont, streamByteLength, streamToFile, stripBidiControls, toBytes, toWinAnsi, truncate, truncateToWidth, validateAttachments, validateDocumentStreamable, validateFontData, validatePdfUA, validateTableStreamable, validateURL, validateWatermark, verifyCertSignature, wrapText };
4543
+ export { type AddSignaturePlaceholderOptions, type Annotation, type AnnotationBase, type AnnotationRect, type Asn1Node, BAL_H, type BarcodeBlock, type BarcodeFormat, type BidiRun, type CellBorders, type CmsSignOptions, type ColorGlyph, type ColorGlyphForm, type ColorLayer, type ColorPaint, type ColorStop, type ColumnDef, type Contour, type CpalColor, type CryptoProvider, DEFAULT_COLORS, DEFAULT_COLUMNS, DEFAULT_CW, DEFAULT_FONT_SIZES, DEFAULT_MARGINS, DEFAULT_MAX_BLOCKS, DEFAULT_MAX_INFLATE_OUTPUT, type DocumentBlock, type DocumentMetadata, type DocumentParams, type EcPrivateKey, type EcPublicKey, type EmbeddedFilesResult, type EncodingContext, type EncryptionOptions, FT_H, type FontData, type FontEntry, type FontLoader, type FontMetrics, type FontRun, type FontValidationResult, type FormField, type FormFieldBlock, type FormFieldType, type FormWidgetResult, type FreeTextAnnotation, type GlyfFont, type GradientExtend, HEADER_H, type HeadingBlock, INFO_LN, type ImageBlock, type InspectedBlock, type InspectedPage, type InternalLink, KNOWN_DECODE_FILTERS, type LayoutDebugOptions, type LayoutInspection, type LineAnnotation, type LinearGradientPaint, type LinkAnnotation, type LinkBlock, type ListBlock, type ListItem, MAX_PARSE_DEPTH, MAX_XREF_CHAIN, type MarkupAnnotation, type MergeOptions, type OutlineItem, type OutlinePoint, type OutlineProvider, PAGE_SIZES, PDF_A_CONFORMANCE_TARGETS, PG_H, PG_W, type PageBreakBlock, type PageLabelRange, type PageLabelStyle, type PageRange, type PageTemplate, type ParagraphBlock, type ParsedAnnotation, type PdfArray as ParsedArray, type PdfDict as ParsedDict, type ParsedImage, type PdfAConfig, type PdfAConformanceTarget, type PdfAttachment, type PdfAttachmentRelationship, type PdfColor, type PdfColors, type PdfIndirectObject, type PdfInfoItem, type PdfLayoutOptions, type PdfModifier, type PdfName, type PdfParams, type PdfReader, type PdfRef, type PdfRgbString, type PdfRgbTuple, type PdfRow, type PdfSignOptions, type PdfStream, type PdfToken, type PdfTokenizer, type PdfUAValidationResult, type PdfValue, type QRErrorLevel, ROW_H, type RadialGradientPaint, type RadioGroupContext, type RsaPrivateKey, type RsaPublicKey, type ShapeAnnotation, type ShapedGlyph, type SigDictMetadata, type SignatureAlgorithm, type SolidPaint, type SpacerBlock, type StreamOptions, type StreamToFileResult, type SvgBlock, type SvgRenderOptions, type SvgSegment, TH_H, TITLE_LN, type TableBlock, type TextAnnotation, type TextMarkupAnnotation, type TextRun, type TocBlock, type TokenType, type UseCategory, type UseClassifiedCp, type UseCluster, type ViewerPreferences, WORKER_THRESHOLD, WORKER_TIMEOUT_MS, type WatermarkImage, type WatermarkOptions, type WatermarkState, type WatermarkText, type WorkerGenerationOptions, type WorkerInputMessage, type WorkerOutputMessage, type X509Certificate, type X509Name, type XrefEntry, type XrefTable, addSignaturePlaceholder, applyDecodeFilter, buildAcroFormDict, buildAnnotation, buildAnnotationBody, buildAppearanceStreamDict, buildCmsSignedData, buildDocumentPDF, buildDocumentPDFBytes, buildDocumentPDFStream, buildDocumentPDFStreamPageByPage, buildDocumentPDFStreamTrue, buildEmbeddedFiles, buildFormWidget, buildImageOperators, buildImageXObject, buildInternalLinkAnnotation, buildLinkAnnotation, buildPDF, buildPDFBytes, buildPDFStream, buildPDFStreamPageByPage, buildPDFStreamTrue, buildRadioGroupParent, buildSMaskXObject, buildSigDict, buildWatermarkState, chunkBinaryString, classifyClusters, classifyUseCategory, clearFontCache, computeColumnPositions, concatChunks, containsArabic, containsBengali, containsDevanagari, containsEthiopic, containsHebrew, containsKhmer, containsMath, containsMyanmar, containsRTL, containsSinhala, containsTamil, containsTelugu, containsThai, containsTibetan, contoursToPath, createEncodingContext, createModifier, createPDF, createTokenizer, decodeASCII85, decodeASCIIHex, decodeEcPublicKey, decodeLZW, decodeRunLength, defaultFieldHeight, derBitString, derDecode, derInteger, derOctetString, derOid, derSequence, detectCharLang, detectFallbackLangs, detectImageFormat, dictGet, dictGetArray, dictGetDict, dictGetName, dictGetNum, dictGetRef, downloadBlob, ean13CheckDigit, ecPublicKeyFromPrivate, ecdsaSign, ecdsaVerify, encodeCode128, encodeEcPublicKey, encodePDF417, encodePdfTextString, estimateCmsSize, estimateContentsSize, extractGlyphContours, extractPages, findStartxref, generateDataMatrix, generatePDFInWorker, generatePDFMainThread, generateQR, getCryptoProvider, getMaxInflateOutputSize, getRegisteredLangs, getTrailerRef, getTrailerValue, hasFontLoader, helveticaBoldWidth, helveticaWidth, hmacSha256, inflateSync, initCrypto, initNodeCompression, initNodeDecompression as initNodeDecompression_parser, inspectDocumentLayout, isArmenianCodepoint, isArray, isBengaliCodepoint, isCyrillicCodepoint, isDevanagariCodepoint, isDict, isEthiopicCodepoint, isGeorgianCodepoint, isKhmerCodepoint, isLinkAnnotation, isMathCodepoint, isMyanmarCodepoint, isName, isRef, isSelfSigned, isSinhalaCodepoint, isStream, isTamilCodepoint, isTeluguCodepoint, isTibetanCodepoint, isValidPdfRgb, loadFontData, mergePdfs, nameValue, needsUnicodeFont, normalizeBidiEmbeddings, normalizeColors, openPdf, parseCertificate, parseColor, parseColrCpal, parseCpal, parseGlyfFont, parseImage, parseIndirectObject, parseJPEG, parsePNG, parseRsaPrivateKey, parseRsaPublicKey, parseSvgPath, parseValue, parseXrefTable, pdfString, registerFont, registerFonts, renderBarcode, renderCode128, renderColorGlyph, renderDataMatrix, renderEAN13, renderPDF417, renderQR, renderSvg, resetFontRegistry, resolveBidiRuns, resolveLayout, resolvePdfAConfig, resolveTemplate, rsaSign, rsaSignHash, rsaVerify, rsaVerifyHash, setCryptoProvider, setDeflateImpl, setInflateImpl, setMaxInflateOutputSize, sha384, sha512, shapeArabicText, shapeBengaliText, shapeDevanagariText, shapeKhmerText, shapeMyanmarText, shapeSinhalaText, shapeTamilText, shapeTeluguText, shapeThaiText, shapeTibetanText, signPdfBytes, slugify, splitPdf, splitTextByFont, streamByteLength, streamToFile, stripBidiControls, toBytes, toWinAnsi, truncate, truncateToWidth, validateAttachments, validateDocumentStreamable, validateFontData, validatePdfUA, validateTableStreamable, validateURL, validateWatermark, verifyCertSignature, wrapText };