modern-pdf-lib 0.12.1 → 0.14.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.mts CHANGED
@@ -1062,18 +1062,6 @@ interface SvgElement {
1062
1062
  transform?: [number, number, number, number, number, number] | undefined;
1063
1063
  opacity?: number | undefined;
1064
1064
  }
1065
- /**
1066
- * Parse an SVG colour string into an RGB object.
1067
- *
1068
- * Supported formats:
1069
- * - `#rgb`
1070
- * - `#rrggbb`
1071
- * - `rgb(r, g, b)` (0-255)
1072
- * - `rgba(r, g, b, a)` (a: 0-1)
1073
- * - Named colours (basic set)
1074
- *
1075
- * @returns RGB values (0-255) or `undefined` if not parseable.
1076
- */
1077
1065
  declare function parseSvgColor(colorStr: string): {
1078
1066
  r: number;
1079
1067
  g: number;
@@ -1264,7 +1252,7 @@ interface RedactionOptions {
1264
1252
  b: number;
1265
1253
  } | undefined;
1266
1254
  }
1267
- /** Internal redaction mark stored on a page. */
1255
+ /** Redaction mark stored on a page. */
1268
1256
  interface RedactionMark {
1269
1257
  rect: [number, number, number, number];
1270
1258
  overlayText?: string | undefined;
@@ -1407,6 +1395,182 @@ interface EmbedPageOptions {
1407
1395
  */
1408
1396
  declare function embedPageAsFormXObject(page: PdfPage, sourceRegistry: PdfObjectRegistry, targetRegistry: PdfObjectRegistry, xObjectName: string, options?: EmbedPageOptions): EmbeddedPdfPage;
1409
1397
  //#endregion
1398
+ //#region src/core/patterns.d.ts
1399
+ /**
1400
+ * A colour stop in a gradient, specifying the position (0..1) and colour.
1401
+ */
1402
+ interface ColorStop {
1403
+ readonly offset: number;
1404
+ readonly color: Color;
1405
+ }
1406
+ /**
1407
+ * Options for creating a linear gradient (axial shading, ShadingType 2).
1408
+ */
1409
+ interface LinearGradientOptions {
1410
+ /** Start X coordinate. */
1411
+ readonly x1: number;
1412
+ /** Start Y coordinate. */
1413
+ readonly y1: number;
1414
+ /** End X coordinate. */
1415
+ readonly x2: number;
1416
+ /** End Y coordinate. */
1417
+ readonly y2: number;
1418
+ /**
1419
+ * Colour stops. Each element is either a bare {@link Color} (positions
1420
+ * are distributed evenly) or a {@link ColorStop} with an explicit offset.
1421
+ */
1422
+ readonly stops: readonly (Color | ColorStop)[];
1423
+ /**
1424
+ * Whether to extend the gradient beyond the start and end points.
1425
+ * Default: `true`.
1426
+ */
1427
+ readonly extend?: boolean;
1428
+ }
1429
+ /**
1430
+ * Options for creating a radial gradient (radial shading, ShadingType 3).
1431
+ */
1432
+ interface RadialGradientOptions {
1433
+ /** Centre X of the start circle. */
1434
+ readonly x0: number;
1435
+ /** Centre Y of the start circle. */
1436
+ readonly y0: number;
1437
+ /** Radius of the start circle. */
1438
+ readonly r0: number;
1439
+ /** Centre X of the end circle. */
1440
+ readonly x1: number;
1441
+ /** Centre Y of the end circle. */
1442
+ readonly y1: number;
1443
+ /** Radius of the end circle. */
1444
+ readonly r1: number;
1445
+ /**
1446
+ * Colour stops (same semantics as {@link LinearGradientOptions.stops}).
1447
+ */
1448
+ readonly stops: readonly (Color | ColorStop)[];
1449
+ /**
1450
+ * Whether to extend the gradient beyond the start and end circles.
1451
+ * Default: `true`.
1452
+ */
1453
+ readonly extend?: boolean;
1454
+ }
1455
+ /**
1456
+ * Options for creating a tiling pattern (PatternType 1).
1457
+ */
1458
+ interface TilingPatternOptions {
1459
+ /** Width of one tile in user-space units. */
1460
+ readonly width: number;
1461
+ /** Height of one tile in user-space units. */
1462
+ readonly height: number;
1463
+ /**
1464
+ * Paint type.
1465
+ * - `1` (default) — coloured: the pattern's content stream specifies
1466
+ * its own colours.
1467
+ * - `2` — uncoloured: colours are supplied when the pattern is painted.
1468
+ */
1469
+ readonly paintType?: 1 | 2;
1470
+ /**
1471
+ * Tiling type.
1472
+ * - `1` (default) — constant spacing.
1473
+ * - `2` — no distortion.
1474
+ * - `3` — constant spacing and faster tiling.
1475
+ */
1476
+ readonly tilingType?: 1 | 2 | 3;
1477
+ /** Raw PDF content-stream operators that paint one tile. */
1478
+ readonly ops: string;
1479
+ }
1480
+ /**
1481
+ * Descriptor for a gradient fill (linear or radial).
1482
+ * This is a lightweight value object — actual PDF objects are created
1483
+ * when {@link buildGradientObjects} is called.
1484
+ */
1485
+ interface GradientFill {
1486
+ readonly kind: 'gradient';
1487
+ readonly shadingType: 2 | 3;
1488
+ readonly coords: readonly number[];
1489
+ readonly normalizedStops: readonly NormalizedStop[];
1490
+ readonly extend: boolean;
1491
+ }
1492
+ /**
1493
+ * Descriptor for a radial gradient fill.
1494
+ * Structurally identical to {@link GradientFill} but with `shadingType: 3`.
1495
+ */
1496
+ type RadialGradientFill = GradientFill & {
1497
+ readonly shadingType: 3;
1498
+ };
1499
+ /**
1500
+ * Descriptor for a tiling pattern fill.
1501
+ * This is a lightweight value object — actual PDF objects are created
1502
+ * when {@link buildPatternObjects} is called.
1503
+ */
1504
+ interface PatternFill {
1505
+ readonly kind: 'pattern';
1506
+ readonly width: number;
1507
+ readonly height: number;
1508
+ readonly paintType: 1 | 2;
1509
+ readonly tilingType: 1 | 2 | 3;
1510
+ readonly ops: string;
1511
+ }
1512
+ /** A normalised colour stop with explicit offset and RGB values. */
1513
+ interface NormalizedStop {
1514
+ readonly offset: number;
1515
+ readonly r: number;
1516
+ readonly g: number;
1517
+ readonly b: number;
1518
+ }
1519
+ /**
1520
+ * Create a linear (axial) gradient descriptor.
1521
+ *
1522
+ * The gradient runs from `(x1, y1)` to `(x2, y2)` through the given
1523
+ * colour stops. By default the gradient extends beyond its endpoints.
1524
+ *
1525
+ * @param options Gradient parameters.
1526
+ * @returns A {@link GradientFill} descriptor.
1527
+ */
1528
+ declare function linearGradient(options: LinearGradientOptions): GradientFill;
1529
+ /**
1530
+ * Create a radial gradient descriptor.
1531
+ *
1532
+ * The gradient interpolates between two circles: the start circle at
1533
+ * `(x0, y0)` with radius `r0` and the end circle at `(x1, y1)` with
1534
+ * radius `r1`.
1535
+ *
1536
+ * @param options Gradient parameters.
1537
+ * @returns A {@link GradientFill} descriptor (with `shadingType: 3`).
1538
+ */
1539
+ declare function radialGradient(options: RadialGradientOptions): GradientFill;
1540
+ /**
1541
+ * Create a tiling pattern descriptor.
1542
+ *
1543
+ * @param options Pattern parameters including the tile content stream.
1544
+ * @returns A {@link PatternFill} descriptor.
1545
+ */
1546
+ declare function tilingPattern(options: TilingPatternOptions): PatternFill;
1547
+ /**
1548
+ * Materialise a {@link GradientFill} descriptor into actual PDF objects
1549
+ * in the given registry.
1550
+ *
1551
+ * @param gradient The gradient descriptor.
1552
+ * @param registry The document's object registry.
1553
+ * @returns An object with the pattern's indirect reference and a unique
1554
+ * resource name.
1555
+ */
1556
+ declare function buildGradientObjects(gradient: GradientFill, registry: PdfObjectRegistry): {
1557
+ patternRef: PdfRef;
1558
+ patternName: string;
1559
+ };
1560
+ /**
1561
+ * Materialise a {@link PatternFill} descriptor into actual PDF objects
1562
+ * in the given registry.
1563
+ *
1564
+ * @param pattern The tiling pattern descriptor.
1565
+ * @param registry The document's object registry.
1566
+ * @returns An object with the pattern's indirect reference and a unique
1567
+ * resource name.
1568
+ */
1569
+ declare function buildPatternObjects(pattern: PatternFill, registry: PdfObjectRegistry): {
1570
+ patternRef: PdfRef;
1571
+ patternName: string;
1572
+ };
1573
+ //#endregion
1410
1574
  //#region src/core/pdfPage.d.ts
1411
1575
  /** Pre-defined page sizes as `[width, height]` tuples in PDF points. */
1412
1576
  declare const PageSizes: {
@@ -1803,6 +1967,59 @@ interface ImageRef {
1803
1967
  height: number;
1804
1968
  };
1805
1969
  }
1970
+ /**
1971
+ * Options for transparency groups.
1972
+ *
1973
+ * Transparency groups allow a set of drawing operations to be composited
1974
+ * as a single unit before being blended with the page content.
1975
+ */
1976
+ interface TransparencyGroupOptions {
1977
+ /**
1978
+ * When `true`, the group is composited against a fully transparent
1979
+ * backdrop rather than the existing page content. Default: `true`.
1980
+ */
1981
+ isolated?: boolean;
1982
+ /**
1983
+ * When `true`, earlier objects in the group are knocked out (replaced)
1984
+ * by later objects, rather than composited on top. Default: `false`.
1985
+ */
1986
+ knockout?: boolean;
1987
+ /**
1988
+ * Color space for the transparency group. Default: `'DeviceRGB'`.
1989
+ */
1990
+ colorSpace?: 'DeviceRGB' | 'DeviceCMYK' | 'DeviceGray';
1991
+ }
1992
+ /**
1993
+ * Builder interface for constructing soft mask content.
1994
+ *
1995
+ * All drawing is in grayscale: `1` = fully opaque, `0` = fully transparent.
1996
+ */
1997
+ interface SoftMaskBuilder {
1998
+ /**
1999
+ * Draw a filled rectangle at the given position with the specified
2000
+ * grayscale value (`0` = black/transparent, `1` = white/opaque).
2001
+ */
2002
+ drawRectangle(x: number, y: number, width: number, height: number, gray: number): void;
2003
+ /**
2004
+ * Draw a filled circle at the given center with the specified radius
2005
+ * and grayscale value.
2006
+ */
2007
+ drawCircle(cx: number, cy: number, radius: number, gray: number): void;
2008
+ /**
2009
+ * Append raw PDF content-stream operators to the mask.
2010
+ */
2011
+ pushRawOperators(ops: string): void;
2012
+ }
2013
+ /**
2014
+ * Opaque reference to a soft mask Form XObject.
2015
+ *
2016
+ * Created by {@link PdfDocument.createSoftMask} and consumed by
2017
+ * {@link PdfPage.applySoftMask}.
2018
+ */
2019
+ interface SoftMaskRef {
2020
+ readonly _tag: 'softMask';
2021
+ readonly ref: PdfRef;
2022
+ }
1806
2023
  /**
1807
2024
  * A single page in a PDF document.
1808
2025
  *
@@ -1831,10 +2048,25 @@ declare class PdfPage {
1831
2048
  * Used for opacity and other graphics state parameters.
1832
2049
  */
1833
2050
  private readonly extGStates;
2051
+ /**
2052
+ * Pattern resources referenced by this page.
2053
+ * Maps a resource name (e.g. `Pat5`) to its indirect reference.
2054
+ * Used for gradient fills and tiling patterns.
2055
+ */
2056
+ private readonly patterns;
1834
2057
  /**
1835
2058
  * Counter for ExtGState resource names (`GS1`, `GS2`, ...).
1836
2059
  */
1837
2060
  private extGStateCounter;
2061
+ /**
2062
+ * Counter for transparency group XObject resource names (`TG1`, `TG2`, ...).
2063
+ */
2064
+ private transparencyGroupCounter;
2065
+ /**
2066
+ * Stack of transparency group state. Each entry records the ops length
2067
+ * at the time `beginTransparencyGroup()` was called, plus the options.
2068
+ */
2069
+ private readonly transparencyGroupStack;
1838
2070
  /**
1839
2071
  * Cache mapping composite keys (opacity + blend mode) to their ExtGState
1840
2072
  * resource names, so the same combination reuses the same graphics state
@@ -1957,6 +2189,8 @@ declare class PdfPage {
1957
2189
  registerXObject(name: string, ref: PdfRef): void;
1958
2190
  /** @internal Register an ExtGState resource on this page. */
1959
2191
  registerExtGState(name: string, ref: PdfRef): void;
2192
+ /** @internal Register a Pattern resource on this page. */
2193
+ registerPattern(name: string, ref: PdfRef): void;
1960
2194
  /**
1961
2195
  * Set the default font used by {@link drawText} when the `font` option
1962
2196
  * is not provided.
@@ -2360,6 +2594,37 @@ declare class PdfPage {
2360
2594
  * @param options Drawing options (position, scale, colours).
2361
2595
  */
2362
2596
  drawSvgPath(pathData: string, options?: DrawSvgPathOptions): void;
2597
+ /**
2598
+ * Draw a gradient fill (linear or radial) clipped to a rectangle.
2599
+ *
2600
+ * The gradient is registered as a `/Pattern` resource on this page
2601
+ * and painted within the specified rectangular region.
2602
+ *
2603
+ * @param gradient A gradient descriptor from {@link linearGradient}
2604
+ * or {@link radialGradient}.
2605
+ * @param rect The rectangle to fill.
2606
+ */
2607
+ drawGradient(gradient: GradientFill, rect: {
2608
+ x: number;
2609
+ y: number;
2610
+ width: number;
2611
+ height: number;
2612
+ }): void;
2613
+ /**
2614
+ * Draw a tiling pattern fill clipped to a rectangle.
2615
+ *
2616
+ * The pattern is registered as a `/Pattern` resource on this page
2617
+ * and painted within the specified rectangular region.
2618
+ *
2619
+ * @param pattern A pattern descriptor from {@link tilingPattern}.
2620
+ * @param rect The rectangle to fill.
2621
+ */
2622
+ drawPattern(pattern: PatternFill, rect: {
2623
+ x: number;
2624
+ y: number;
2625
+ width: number;
2626
+ height: number;
2627
+ }): void;
2363
2628
  /**
2364
2629
  * Begin layer-specific content.
2365
2630
  *
@@ -2376,6 +2641,64 @@ declare class PdfPage {
2376
2641
  * Must be preceded by a call to {@link beginLayer}.
2377
2642
  */
2378
2643
  endLayer(): void;
2644
+ /**
2645
+ * Begin a transparency group. All drawing operations until
2646
+ * {@link endTransparencyGroup} will be captured and composited as a
2647
+ * single Form XObject with a `/Group` transparency dictionary.
2648
+ *
2649
+ * Transparency groups enable isolated and knockout compositing effects
2650
+ * that are not possible with simple opacity settings.
2651
+ *
2652
+ * Groups can be nested — each call must be paired with a matching
2653
+ * {@link endTransparencyGroup}.
2654
+ *
2655
+ * @param options Isolation, knockout, and color-space settings.
2656
+ *
2657
+ * @example
2658
+ * ```ts
2659
+ * page.beginTransparencyGroup({ isolated: true });
2660
+ * page.drawRectangle({ x: 50, y: 50, width: 100, height: 100, opacity: 0.5 });
2661
+ * page.drawCircle({ x: 100, y: 100, size: 60, opacity: 0.5 });
2662
+ * page.endTransparencyGroup();
2663
+ * ```
2664
+ */
2665
+ beginTransparencyGroup(options?: TransparencyGroupOptions): void;
2666
+ /**
2667
+ * End the current transparency group and composite it onto the page
2668
+ * as a Form XObject.
2669
+ *
2670
+ * @throws {Error} If there is no matching {@link beginTransparencyGroup}.
2671
+ */
2672
+ endTransparencyGroup(): void;
2673
+ /**
2674
+ * Apply a soft mask (luminosity-based) for subsequent drawing operations.
2675
+ *
2676
+ * White regions in the mask are fully opaque; black regions are fully
2677
+ * transparent. The mask stays active until {@link clearSoftMask} is
2678
+ * called or the graphics state is restored.
2679
+ *
2680
+ * @param mask A soft mask reference created by
2681
+ * {@link PdfDocument.createSoftMask}.
2682
+ *
2683
+ * @example
2684
+ * ```ts
2685
+ * const mask = doc.createSoftMask(200, 200, (b) => {
2686
+ * b.drawRectangle(0, 0, 200, 200, 1); // white = opaque
2687
+ * b.drawCircle(100, 100, 80, 0); // black = transparent
2688
+ * });
2689
+ * page.applySoftMask(mask);
2690
+ * page.drawImage(image, { x: 50, y: 50, width: 200, height: 200 });
2691
+ * page.clearSoftMask();
2692
+ * ```
2693
+ */
2694
+ applySoftMask(mask: SoftMaskRef): void;
2695
+ /**
2696
+ * Clear the current soft mask, resetting to no masking.
2697
+ *
2698
+ * This emits an ExtGState with `/SMask /None`, which removes any
2699
+ * previously applied soft mask for subsequent drawing operations.
2700
+ */
2701
+ clearSoftMask(): void;
2379
2702
  /**
2380
2703
  * Mark a rectangular region on this page for redaction.
2381
2704
  *
@@ -2693,7 +3016,7 @@ interface LoadPdfOptions {
2693
3016
  * string.
2694
3017
  *
2695
3018
  * This is the primary entry point for parsing existing PDFs. It creates
2696
- * a {@link PdfDocumentParser}, runs the full parse pipeline, and returns
3019
+ * a `PdfDocumentParser`, runs the full parse pipeline, and returns
2697
3020
  * a populated {@link PdfDocument}.
2698
3021
  *
2699
3022
  * @param data The PDF data as a `Uint8Array`, `ArrayBuffer`, or a
@@ -4393,12 +4716,6 @@ declare class PdfDocument {
4393
4716
  * @internal
4394
4717
  */
4395
4718
  private embedCffFont;
4396
- /**
4397
- * Build a /ToUnicode CMap from the font's cmap table.
4398
- * Maps glyph IDs (used as CIDs with Identity-H) to Unicode codepoints.
4399
- * @internal
4400
- */
4401
- private buildToUnicodeCmap;
4402
4719
  /**
4403
4720
  * Embed a PNG image.
4404
4721
  *
@@ -4460,7 +4777,7 @@ declare class PdfDocument {
4460
4777
  * @param pages Array of PdfPage instances to embed.
4461
4778
  * @returns Array of {@link EmbeddedPdfPage} handles, one per input page.
4462
4779
  */
4463
- embedPages(pages: PdfPage[]): Promise<EmbeddedPdfPage[]>;
4780
+ embedPages(pages: PdfPage[]): EmbeddedPdfPage[];
4464
4781
  /** Set the document title. */
4465
4782
  setTitle(title: string, options?: SetTitleOptions): void;
4466
4783
  /** Set the document author. */
@@ -4809,6 +5126,37 @@ declare class PdfDocument {
4809
5126
  * @param options Watermark appearance options.
4810
5127
  */
4811
5128
  addWatermark(options: WatermarkOptions): void;
5129
+ /**
5130
+ * Create a soft mask Form XObject that can be used with
5131
+ * {@link PdfPage.applySoftMask}.
5132
+ *
5133
+ * The builder callback receives a {@link SoftMaskBuilder} with methods
5134
+ * for generating grayscale content where white (`1`) represents fully
5135
+ * opaque regions and black (`0`) represents fully transparent regions.
5136
+ *
5137
+ * The returned {@link SoftMaskRef} is passed to
5138
+ * {@link PdfPage.applySoftMask} to activate the mask for subsequent
5139
+ * drawing operations on that page.
5140
+ *
5141
+ * @param width Width of the mask in points.
5142
+ * @param height Height of the mask in points.
5143
+ * @param builder Callback that draws the mask content.
5144
+ * @returns A reference to the soft mask Form XObject.
5145
+ *
5146
+ * @example
5147
+ * ```ts
5148
+ * const mask = doc.createSoftMask(200, 200, (b) => {
5149
+ * // White background = fully opaque
5150
+ * b.drawRectangle(0, 0, 200, 200, 1);
5151
+ * // Black circle = fully transparent hole
5152
+ * b.drawCircle(100, 100, 80, 0);
5153
+ * });
5154
+ * page.applySoftMask(mask);
5155
+ * page.drawRectangle({ x: 50, y: 50, width: 200, height: 200, color: rgb(1, 0, 0) });
5156
+ * page.clearSoftMask();
5157
+ * ```
5158
+ */
5159
+ createSoftMask(width: number, height: number, builder: (ops: SoftMaskBuilder) => void): SoftMaskRef;
4812
5160
  /**
4813
5161
  * Apply all pending redactions across all pages.
4814
5162
  *
@@ -5466,7 +5814,7 @@ interface SubsetCmap {
5466
5814
  * Tracks which glyphs have been used so that subsetting can be
5467
5815
  * performed at save time, and provides text measurement methods.
5468
5816
  *
5469
- * Create via {@link embedFont}.
5817
+ * Create via `PdfDocument.embedFont()`.
5470
5818
  */
5471
5819
  declare class EmbeddedFont {
5472
5820
  /** The raw font file bytes. */
@@ -7254,6 +7602,29 @@ declare function extractTextWithPositions(operators: ContentStreamOperator[], re
7254
7602
  */
7255
7603
  declare function decodeStream(data: Uint8Array, filters: string | string[], decodeParms?: PdfDict | PdfDict[] | null): Uint8Array;
7256
7604
  //#endregion
7605
+ //#region src/parser/parseError.d.ts
7606
+ /**
7607
+ * @module parser/parseError
7608
+ * Structured error class for PDF parsing failures.
7609
+ * @packageDocumentation
7610
+ */
7611
+ declare class PdfParseError extends Error {
7612
+ readonly name = "PdfParseError";
7613
+ readonly offset: number;
7614
+ readonly expected: string;
7615
+ readonly actual: string;
7616
+ readonly hexContext: string;
7617
+ constructor(options: {
7618
+ message: string;
7619
+ offset: number;
7620
+ expected?: string | undefined;
7621
+ actual?: string | undefined;
7622
+ data?: Uint8Array | undefined;
7623
+ cause?: Error | undefined;
7624
+ });
7625
+ }
7626
+ declare function formatHexContext(data: Uint8Array, offset: number, windowSize?: number): string;
7627
+ //#endregion
7257
7628
  //#region src/signature/byteRange.d.ts
7258
7629
  /**
7259
7630
  * @module signature/byteRange
@@ -7900,5 +8271,5 @@ interface InitWasmOptions {
7900
8271
  */
7901
8272
  declare function initWasm(options?: string | URL | InitWasmOptions): Promise<void>;
7902
8273
  //#endregion
7903
- export { type AccessibilityIssue, type Angle, AnnotationFlags, type AnnotationOptions, type AnnotationType, type AppearanceProviderFor, BlendMode, type ButtonAppearanceOptions, type ByteRangeResult, type ByteWriter, type CatalogOptions, ChangeTracker, type CheckboxAppearanceOptions, type CmykColor, type Color, CombedTextLayoutError, type ComputeFontSizeOptions, type ContentStreamOperator, type CropBox, type Degrees, type DocumentMetadata, type DocumentStructure, type DrawCircleOptions, type DrawEllipseOptions, type DrawImageOptions, type DrawLineOptions, type DrawPageOptions, type DrawRectangleOptions, type DrawSquareOptions, type DrawSvgPathOptions, type DrawTextOptions, type DropdownAppearanceOptions, type EmbedFontOptions, type EmbedPageOptions, type EmbeddedFile, EmbeddedFont, type EmbeddedPdfPage, type EncryptAlgorithm, type EncryptDictValues, type EncryptOptions, EncryptedPdfError, ExceededMaxLengthError, FieldAlreadyExistsError, FieldExistsAsNonTerminalError, FieldFlags, type FieldType, type FontMetrics, FontNotEmbeddedError, type FontRef, ForeignPageError, type FreeTextAlignment, type GrayscaleColor, ImageAlignment, type ImageRef, type IncrementalSaveResult, InitWasmOptions, InvalidFieldNamePartError, type LayoutCombedOptions, type LayoutMultilineOptions, type LayoutMultilineResult, type LayoutSinglelineOptions, type LayoutSinglelineResult, LineCapStyle, type LineEndingStyle, LineJoinStyle, type LinearizationOptions, type LinkHighlightMode, type ListboxAppearanceOptions, type LoadPdfOptions, type MarkedContentScope, MissingOnValueCheckError, NoSuchFieldError, type Operand, type OutlineDestination, type OutlineItemOptions, PDFOperator, type PageEntry, type PageRange, type PageSize, PageSizes, ParseSpeeds, type PdfAIssue, type PdfALevel, type PdfAValidationResult, PdfAnnotation, PdfArray, PdfBool, PdfButtonField, PdfCheckboxField, PdfCircleAnnotation, PdfDict, PdfDocument, PdfDropdownField, PdfEncryptionHandler, PdfField, PdfForm, PdfFreeTextAnnotation, PdfHighlightAnnotation, PdfInkAnnotation, PdfLayer, PdfLayerManager, PdfLineAnnotation, PdfLinkAnnotation, PdfListboxField, PdfName, PdfNull, PdfNumber, type PdfObject, PdfObjectRegistry, PdfOutlineItem, PdfOutlineTree, PdfPage, type PdfPermissionFlags, PdfPolyLineAnnotation, PdfPolygonAnnotation, PdfRadioGroup, PdfRedactAnnotation, PdfRef, type PdfSaveOptions, PdfSignatureField, type PdfSignatureInfo, PdfSquareAnnotation, PdfSquigglyAnnotation, PdfStampAnnotation, PdfStream, PdfStreamWriter, PdfStrikeOutAnnotation, PdfString, PdfStructureElement, PdfStructureTree, PdfTextAnnotation, PdfTextField, PdfUnderlineAnnotation, PdfViewerPreferences, PdfWriter, type Radians, type RadioAppearanceOptions, type RedactionOptions, type RefResolver, type RegistryEntry, RemovePageFromEmptyDocumentError, type RgbColor, RichTextFieldReadError, type SetTitleOptions, type SignOptions, type SignatureAppearanceOptions, type SignatureOptions, type SignatureVerificationResult, type SignerInfo, type StandardFontName, StandardFonts, type StandardStampName, type StructureElementOptions, type StructureType, type SvgDrawCommand, type SvgElement, type SvgRenderOptions, TextAlignment, type TextAnnotationIcon, type TextAppearanceOptions, type TextItem, TextRenderingMode, type TimestampResult, UnexpectedFieldTypeError, type ViewerPreferences, type WatermarkOptions, type WidgetAnnotationHost, addWatermark, addWatermarkToPage, aesDecryptCBC, aesEncryptCBC, annotationFromDict, applyFillColor, applyRedactions, applyStrokeColor, asNumber, asPDFName, asPDFNumber, attachFile, base64Decode, base64Encode, beginArtifact, beginArtifactWithType, beginLayerContent, beginMarkedContent, beginMarkedContentSequence, beginMarkedContentWithProperties, beginText, buildAnnotationDict, buildCatalog, buildDocumentStructure, buildEmbeddedFilesNameTree, buildInfoDict, buildPageTree, buildPkcs7Signature, buildTimestampRequest, buildViewerPreferencesDict, buildXmpMetadata, checkAccessibility, circlePath, clipEvenOdd, clip as clipOp, closeAndStroke, closeFillAndStroke, closeFillEvenOddAndStroke, closePath as closePathOp, cmyk, colorToComponents, componentsToColor, computeFileEncryptionKey, computeFontSize, computeSignatureHash, concatMatrix, concatMatrix as concatTransformationMatrix, copyPages, createAnnotation, createMarkedContentScope, createPdf, createXmpStream, cropPage, curveToFinal, curveToInitial, curveTo as curveToOp, decodePermissions, decodeStream, degrees, degreesToRadians, drawImageWithMatrix, drawImageXObject, drawXObject as drawObject, drawXObject, drawSvgOnPage, ellipsePath, embedPageAsFormXObject, embedSignature, encodeContextTag, encodeInteger, encodeLength, encodeOID, encodeOctetString, encodePermissions, encodePrintableString, encodeSequence, encodeSet, encodeUTCTime, encodeUtf8String, endArtifact, endLayerContent, endMarkedContent, endPath as endPathOp, endText, enforcePdfA, extractMetrics, extractText, extractTextWithPositions, fillAndStroke as fillAndStrokeOp, fillEvenOdd, fillEvenOddAndStroke, fill as fillOp, findSignatures, formatPdfDate, generateButtonAppearance, generateCheckboxAppearance, generateCircleAppearance, generateDropdownAppearance, generateFreeTextAppearance, generateHighlightAppearance, generateInkAppearance, generateLineAppearance, generateListboxAppearance, generateRadioAppearance, generateSignatureAppearance, generateSquareAppearance, generateSquigglyAppearance, generateStrikeOutAppearance, generateTextAppearance, generateUnderlineAppearance, getAttachments, getPageSize, getRedactionMarks, getSignatures, grayscale, initWasm, insertPage, isAccessible, isLinearized, isOpenTypeCFF, isTrueType, layoutCombedText, layoutMultilineText, layoutSinglelineText, lineTo as lineToOp, linearizePdf, loadPdf, markForRedaction, md5, mergePdfs, movePage, moveText as moveTextOp, moveTextSetLeading, moveTo as moveToOp, nextLine as nextLineOp, parseContentStream, parseSvg, parseSvgColor, parseSvgPath, parseSvgTransform, parseTimestampResponse, parseViewerPreferences, parseXmpMetadata, restoreState as popGraphicsState, restoreState, prepareForSigning, saveState as pushGraphicsState, saveState, radians, radiansToDegrees, rc4, rectangle as rectangleOp, removePage, removePages, requestTimestamp, resizePage, reversePages, rgb, rotateAllPages, rotate as rotateOp, rotatePage, rotationMatrix, saveDocumentIncremental, saveIncremental, scale as scaleOp, serializePdf, setCharacterSpacing as setCharacterSpacingOp, setCharacterSpacing as setCharacterSqueeze, setColorSpace, setDashPattern as setDashPatternOp, setFillColor, setFillColorCmyk, setFillColorGray, setFillColorRgb, setFillingColor, setFlatness, setFont as setFontAndSize, setFont as setFontOp, setFontSize as setFontSizeOp, setGraphicsState as setGraphicsStateOp, setLeading as setLeadingOp, setLeading as setLineHeight, setLineCap as setLineCapOp, setLineJoin as setLineJoinOp, setLineWidth as setLineWidthOp, setMiterLimit, setStrokeColor, setStrokeColorCmyk, setStrokeColorGray, setStrokeColorRgb, setStrokeColorSpace, setStrokingColor, setTextMatrix as setTextMatrixOp, setTextRenderingMode as setTextRenderingModeOp, setTextRise as setTextRiseOp, setWordSpacing as setWordSpacingOp, sha256, sha384, sha512, showTextArray, showTextHex, showTextNextLine, showText as showTextOp, showTextWithSpacing, signPdf, skew as skewOp, splitPdf, stroke as strokeOp, summarizeIssues, svgToPdfOperators, translate as translateOp, validatePdfA, verifyOwnerPassword, verifySignature, verifySignatures, verifyUserPassword, wrapInMarkedContent };
8274
+ export { type AccessibilityIssue, type Angle, AnnotationFlags, type AnnotationOptions, type AnnotationType, type AppearanceProviderFor, BlendMode, type ButtonAppearanceOptions, type ByteRangeResult, type ByteWriter, type CIDFontData, type CIDSystemInfoData, type CatalogOptions, ChangeTracker, type CheckboxAppearanceOptions, type CmykColor, type Color, type ColorStop, CombedTextLayoutError, type ComputeFontSizeOptions, type ContentStreamOperator, type CropBox, type Degrees, type DocumentMetadata, type DocumentStructure, type DrawCircleOptions, type DrawEllipseOptions, type DrawImageOptions, type DrawLineOptions, type DrawPageOptions, type DrawRectangleOptions, type DrawSquareOptions, type DrawSvgPathOptions, type DrawTextOptions, type DropdownAppearanceOptions, type EmbedFontOptions, type EmbedPageOptions, type EmbeddedFile, EmbeddedFont, type EmbeddedPdfPage, type EncryptAlgorithm, type EncryptDictValues, type EncryptOptions, EncryptedPdfError, ExceededMaxLengthError, FieldAlreadyExistsError, FieldExistsAsNonTerminalError, FieldFlags, type FieldType, type FontDescriptorData, type FontEmbeddingResult, type FontMetrics, FontNotEmbeddedError, type FontRef, ForeignPageError, type FreeTextAlignment, type GradientFill, type GrayscaleColor, ImageAlignment, type ImageRef, type IncrementalSaveResult, InitWasmOptions, InvalidFieldNamePartError, type LayoutCombedOptions, type LayoutMultilineOptions, type LayoutMultilineResult, type LayoutSinglelineOptions, type LayoutSinglelineResult, LineCapStyle, type LineEndingStyle, LineJoinStyle, type LinearGradientOptions, type LinearizationOptions, type LinkHighlightMode, type ListboxAppearanceOptions, type LoadPdfOptions, type MarkedContentScope, MissingOnValueCheckError, NoSuchFieldError, type NormalizedStop, type Operand, type OutlineDestination, type OutlineItemOptions, PDFOperator, type PageEntry, type PageRange, type PageSize, PageSizes, ParseSpeeds, type PatternFill, type PdfAIssue, type PdfALevel, type PdfAValidationResult, PdfAnnotation, PdfArray, PdfBool, PdfButtonField, PdfCheckboxField, PdfCircleAnnotation, PdfDict, PdfDocument, PdfDropdownField, PdfEncryptionHandler, PdfField, PdfForm, PdfFreeTextAnnotation, PdfHighlightAnnotation, PdfInkAnnotation, PdfLayer, PdfLayerManager, PdfLineAnnotation, PdfLinkAnnotation, PdfListboxField, PdfName, PdfNull, PdfNumber, type PdfObject, PdfObjectRegistry, PdfOutlineItem, PdfOutlineTree, PdfPage, PdfParseError, type PdfPermissionFlags, PdfPolyLineAnnotation, PdfPolygonAnnotation, PdfRadioGroup, PdfRedactAnnotation, PdfRef, type PdfSaveOptions, PdfSignatureField, type PdfSignatureInfo, PdfSquareAnnotation, PdfSquigglyAnnotation, PdfStampAnnotation, PdfStream, PdfStreamWriter, PdfStrikeOutAnnotation, PdfString, PdfStructureElement, PdfStructureTree, PdfTextAnnotation, PdfTextField, PdfUnderlineAnnotation, PdfViewerPreferences, PdfWriter, type RadialGradientFill, type RadialGradientOptions, type Radians, type RadioAppearanceOptions, type RedactionMark, type RedactionOptions, type RefResolver, type RegistryEntry, RemovePageFromEmptyDocumentError, type RgbColor, RichTextFieldReadError, type SetTitleOptions, type SignOptions, type SignatureAppearanceOptions, type SignatureOptions, type SignatureVerificationResult, type SignerInfo, type SoftMaskBuilder, type SoftMaskRef, type StandardFontName, StandardFonts, type StandardStampName, type StructureElementOptions, type StructureType, type SubsetCmap, type SubsetResult, type SvgDrawCommand, type SvgElement, type SvgRenderOptions, TextAlignment, type TextAnnotationIcon, type TextAppearanceOptions, type TextExtractionOptions, type TextItem, TextRenderingMode, type TilingPatternOptions, type TimestampResult, type TransparencyGroupOptions, type Type0FontData, UnexpectedFieldTypeError, type ViewerPreferences, type WatermarkOptions, type WidgetAnnotationHost, type WidthEntry, addWatermark, addWatermarkToPage, aesDecryptCBC, aesEncryptCBC, annotationFromDict, applyFillColor, applyRedactions, applyStrokeColor, asNumber, asPDFName, asPDFNumber, attachFile, base64Decode, base64Encode, beginArtifact, beginArtifactWithType, beginLayerContent, beginMarkedContent, beginMarkedContentSequence, beginMarkedContentWithProperties, beginText, buildAnnotationDict, buildCatalog, buildDocumentStructure, buildEmbeddedFilesNameTree, buildGradientObjects, buildInfoDict, buildPageTree, buildPatternObjects, buildPkcs7Signature, buildTimestampRequest, buildViewerPreferencesDict, buildXmpMetadata, checkAccessibility, circlePath, clipEvenOdd, clip as clipOp, closeAndStroke, closeFillAndStroke, closeFillEvenOddAndStroke, closePath as closePathOp, cmyk, colorToComponents, componentsToColor, computeFileEncryptionKey, computeFontSize, computeSignatureHash, concatMatrix, concatMatrix as concatTransformationMatrix, copyPages, createAnnotation, createMarkedContentScope, createPdf, createXmpStream, cropPage, curveToFinal, curveToInitial, curveTo as curveToOp, decodePermissions, decodeStream, degrees, degreesToRadians, drawImageWithMatrix, drawImageXObject, drawXObject as drawObject, drawXObject, drawSvgOnPage, ellipsePath, embedPageAsFormXObject, embedSignature, encodeContextTag, encodeInteger, encodeLength, encodeOID, encodeOctetString, encodePermissions, encodePrintableString, encodeSequence, encodeSet, encodeUTCTime, encodeUtf8String, endArtifact, endLayerContent, endMarkedContent, endPath as endPathOp, endText, enforcePdfA, extractMetrics, extractText, extractTextWithPositions, fillAndStroke as fillAndStrokeOp, fillEvenOdd, fillEvenOddAndStroke, fill as fillOp, findSignatures, formatHexContext, formatPdfDate, generateButtonAppearance, generateCheckboxAppearance, generateCircleAppearance, generateDropdownAppearance, generateFreeTextAppearance, generateHighlightAppearance, generateInkAppearance, generateLineAppearance, generateListboxAppearance, generateRadioAppearance, generateSignatureAppearance, generateSquareAppearance, generateSquigglyAppearance, generateStrikeOutAppearance, generateTextAppearance, generateUnderlineAppearance, getAttachments, getPageSize, getRedactionMarks, getSignatures, grayscale, initWasm, insertPage, isAccessible, isLinearized, isOpenTypeCFF, isTrueType, layoutCombedText, layoutMultilineText, layoutSinglelineText, lineTo as lineToOp, linearGradient, linearizePdf, loadPdf, markForRedaction, md5, mergePdfs, movePage, moveText as moveTextOp, moveTextSetLeading, moveTo as moveToOp, nextLine as nextLineOp, parseContentStream, parseSvg, parseSvgColor, parseSvgPath, parseSvgTransform, parseTimestampResponse, parseViewerPreferences, parseXmpMetadata, restoreState as popGraphicsState, restoreState, prepareForSigning, saveState as pushGraphicsState, saveState, radialGradient, radians, radiansToDegrees, rc4, rectangle as rectangleOp, removePage, removePages, requestTimestamp, resizePage, reversePages, rgb, rotateAllPages, rotate as rotateOp, rotatePage, rotationMatrix, saveDocumentIncremental, saveIncremental, scale as scaleOp, serializePdf, setCharacterSpacing as setCharacterSpacingOp, setCharacterSpacing as setCharacterSqueeze, setColorSpace, setDashPattern as setDashPatternOp, setFillColor, setFillColorCmyk, setFillColorGray, setFillColorRgb, setFillingColor, setFlatness, setFont as setFontAndSize, setFont as setFontOp, setFontSize as setFontSizeOp, setGraphicsState as setGraphicsStateOp, setLeading as setLeadingOp, setLeading as setLineHeight, setLineCap as setLineCapOp, setLineJoin as setLineJoinOp, setLineWidth as setLineWidthOp, setMiterLimit, setStrokeColor, setStrokeColorCmyk, setStrokeColorGray, setStrokeColorRgb, setStrokeColorSpace, setStrokingColor, setTextMatrix as setTextMatrixOp, setTextRenderingMode as setTextRenderingModeOp, setTextRise as setTextRiseOp, setWordSpacing as setWordSpacingOp, sha256, sha384, sha512, showTextArray, showTextHex, showTextNextLine, showText as showTextOp, showTextWithSpacing, signPdf, skew as skewOp, splitPdf, stroke as strokeOp, summarizeIssues, svgToPdfOperators, tilingPattern, translate as translateOp, validatePdfA, verifyOwnerPassword, verifySignature, verifySignatures, verifyUserPassword, wrapInMarkedContent };
7904
8275
  //# sourceMappingURL=index.d.mts.map