modern-pdf-lib 0.25.0 → 0.28.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.
Files changed (110) hide show
  1. package/README.md +16 -3
  2. package/dist/{batchOptimize-Ba_pWw71.cjs → batchOptimize-CXC9gNqD.cjs} +55 -55
  3. package/dist/{batchOptimize-DtRwBOqR.mjs → batchOptimize-CjLGD5ie.mjs} +25 -25
  4. package/dist/{bridge-DYCQzxF7.cjs → bridge-ByvzPu5h.cjs} +29 -31
  5. package/dist/{bridge-CcivG_Sm.mjs → bridge-ZD6O6QQa.mjs} +4 -5
  6. package/dist/browser.cjs +263 -151
  7. package/dist/browser.d.cts +166 -166
  8. package/dist/browser.d.cts.map +1 -1
  9. package/dist/browser.d.mts +166 -166
  10. package/dist/browser.d.mts.map +1 -1
  11. package/dist/browser.mjs +15 -19
  12. package/dist/cli/index.cjs +7 -7
  13. package/dist/cli/index.mjs +8 -8
  14. package/dist/{compressionAnalysis-odbHC7Uk.mjs → compressionAnalysis-BgKy45pA.mjs} +60 -74
  15. package/dist/{compressionAnalysis-DGs-MqTe.d.mts → compressionAnalysis-CDOp_vPr.d.mts} +136 -136
  16. package/dist/compressionAnalysis-CDOp_vPr.d.mts.map +1 -0
  17. package/dist/{compressionAnalysis-B84FPXaQ.cjs → compressionAnalysis-Djv-Zvcd.cjs} +90 -104
  18. package/dist/{compressionAnalysis-VtYV9Zmq.d.cts → compressionAnalysis-UfmonqbM.d.cts} +136 -136
  19. package/dist/compressionAnalysis-UfmonqbM.d.cts.map +1 -0
  20. package/dist/create.cjs +21 -23
  21. package/dist/create.d.cts +2 -2
  22. package/dist/create.d.mts +2 -2
  23. package/dist/create.mjs +3 -5
  24. package/dist/{deduplicateImages-MfUDPxQz.mjs → deduplicateImages-BTCyAPfJ.mjs} +4 -5
  25. package/dist/{deduplicateImages-cKsnD6Ep.cjs → deduplicateImages-CaGgaqyS.cjs} +14 -15
  26. package/dist/{fieldAppearance-C8PoLFSc.d.mts → fieldAppearance-Df1262CT.d.cts} +44 -44
  27. package/dist/fieldAppearance-Df1262CT.d.cts.map +1 -0
  28. package/dist/{fieldAppearance-CdiGFG5e.d.cts → fieldAppearance-_CZdoUCD.d.mts} +44 -44
  29. package/dist/fieldAppearance-_CZdoUCD.d.mts.map +1 -0
  30. package/dist/fontEmbed-DGiZS0h2.d.cts +677 -0
  31. package/dist/fontEmbed-DGiZS0h2.d.cts.map +1 -0
  32. package/dist/fontEmbed-DtA_riGC.d.mts +677 -0
  33. package/dist/fontEmbed-DtA_riGC.d.mts.map +1 -0
  34. package/dist/forms.cjs +3 -4
  35. package/dist/forms.d.cts +2 -2
  36. package/dist/forms.d.mts +2 -2
  37. package/dist/forms.mjs +2 -3
  38. package/dist/{grayscaleDetect-C6kFF3dk.mjs → grayscaleDetect-6GJrgBRT.mjs} +3 -3
  39. package/dist/{grayscaleDetect-C2m-eEXR.cjs → grayscaleDetect-DAUqxjgR.cjs} +13 -14
  40. package/dist/{imageExtract-zEb1gnkb.cjs → imageExtract-DT50Hp_g.cjs} +13 -14
  41. package/dist/{imageExtract-Dnk_Ssv7.mjs → imageExtract-Dapir-ux.mjs} +3 -4
  42. package/dist/index-C1lZe66f.d.mts +8682 -0
  43. package/dist/index-C1lZe66f.d.mts.map +1 -0
  44. package/dist/index-D1SvXWSI.d.cts +8682 -0
  45. package/dist/index-D1SvXWSI.d.cts.map +1 -0
  46. package/dist/index.cjs +263 -150
  47. package/dist/index.d.cts +7 -7
  48. package/dist/index.d.mts +7 -7
  49. package/dist/index.mjs +14 -17
  50. package/dist/{layout-DH61a1iR.cjs → layout-C4vbTlBW.cjs} +184 -134
  51. package/dist/{layout-D6EUKSP8.mjs → layout-lO4x64kY.mjs} +50 -12
  52. package/dist/{loader-C7B5dVCI.mjs → loader-B1Ix7ozU.mjs} +259 -13
  53. package/dist/{loader-I4zdkoWc.cjs → loader-DR7H0XOf.cjs} +343 -67
  54. package/dist/parse.cjs +7 -8
  55. package/dist/parse.d.cts +3 -3
  56. package/dist/parse.d.mts +3 -3
  57. package/dist/parse.mjs +6 -7
  58. package/dist/pdfDocument-CH2E4UCc.d.mts +5160 -0
  59. package/dist/pdfDocument-CH2E4UCc.d.mts.map +1 -0
  60. package/dist/{pdfDocument-CEbbUP9i.cjs → pdfDocument-C_7mrBCL.cjs} +20493 -9511
  61. package/dist/pdfDocument-CzOipXnw.d.cts +5160 -0
  62. package/dist/pdfDocument-CzOipXnw.d.cts.map +1 -0
  63. package/dist/{pdfDocument-B0_XwS4X.mjs → pdfDocument-DRbT6HZw.mjs} +11017 -863
  64. package/dist/{pdfForm-9gd40uz9.cjs → pdfForm-BVS_do95.cjs} +113 -102
  65. package/dist/pdfForm-Ca86NDWn.d.cts +897 -0
  66. package/dist/pdfForm-Ca86NDWn.d.cts.map +1 -0
  67. package/dist/pdfForm-Ca86NDWn.d.mts +897 -0
  68. package/dist/pdfForm-Ca86NDWn.d.mts.map +1 -0
  69. package/dist/{pdfForm-Cn-cVicP.mjs → pdfForm-CfLnlsj-.mjs} +23 -18
  70. package/dist/{pdfObjects-1veop1_d.cjs → pdfObjects-BcPlSI0a.cjs} +62 -53
  71. package/dist/{pdfObjects-uEsWlfzU.mjs → pdfObjects-CB7TEdbW.mjs} +12 -2
  72. package/dist/rolldown-runtime-ak5kbic3.cjs +18 -0
  73. package/dist/{src-B1iDGLCL.cjs → src-C-IDXuvi.cjs} +9886 -1421
  74. package/dist/{src-Db6Qknoz.mjs → src-DJaD-bJ2.mjs} +8392 -515
  75. package/dist/{streamDecode-Bj568Nc9.mjs → streamDecode-BamENT3k.mjs} +129 -150
  76. package/dist/{streamDecode-CvgErkFu.cjs → streamDecode-DcaZz309.cjs} +139 -160
  77. package/package.json +26 -22
  78. package/dist/compressionAnalysis-DGs-MqTe.d.mts.map +0 -1
  79. package/dist/compressionAnalysis-VtYV9Zmq.d.cts.map +0 -1
  80. package/dist/fflateAdapter-LTAeAhaD.cjs +0 -207
  81. package/dist/fflateAdapter-PSiW_ML7.mjs +0 -196
  82. package/dist/fieldAppearance-C8PoLFSc.d.mts.map +0 -1
  83. package/dist/fieldAppearance-CdiGFG5e.d.cts.map +0 -1
  84. package/dist/fontEmbed-BN842wlb.d.cts +0 -659
  85. package/dist/fontEmbed-BN842wlb.d.cts.map +0 -1
  86. package/dist/fontEmbed-Dgq5K89o.d.mts +0 -659
  87. package/dist/fontEmbed-Dgq5K89o.d.mts.map +0 -1
  88. package/dist/fontSubset-5SLWMmEw.cjs +0 -518
  89. package/dist/fontSubset-D-vQQems.mjs +0 -495
  90. package/dist/index-DCSbmXWh.d.mts +0 -5939
  91. package/dist/index-DCSbmXWh.d.mts.map +0 -1
  92. package/dist/index-J1W3FdL8.d.cts +0 -5939
  93. package/dist/index-J1W3FdL8.d.cts.map +0 -1
  94. package/dist/libdeflateWasm-8b91Vmia.mjs +0 -220
  95. package/dist/libdeflateWasm-BdiDEJOj.cjs +0 -237
  96. package/dist/pdfCatalog-3yMIhJtt.mjs +0 -138
  97. package/dist/pdfCatalog-CYy4NXEY.cjs +0 -173
  98. package/dist/pdfDocument-BgvEP5Po.d.mts +0 -4673
  99. package/dist/pdfDocument-BgvEP5Po.d.mts.map +0 -1
  100. package/dist/pdfDocument-CbU-2TjT.d.cts +0 -4673
  101. package/dist/pdfDocument-CbU-2TjT.d.cts.map +0 -1
  102. package/dist/pdfForm-BiyNtYem.d.mts +0 -905
  103. package/dist/pdfForm-BiyNtYem.d.mts.map +0 -1
  104. package/dist/pdfForm-SOXJ72LW.d.cts +0 -905
  105. package/dist/pdfForm-SOXJ72LW.d.cts.map +0 -1
  106. package/dist/pdfPage-B_d9HmkG.mjs +0 -8015
  107. package/dist/pdfPage-Cd8jOJp6.cjs +0 -8728
  108. package/dist/pngEmbed-BWAbEUKF.mjs +0 -552
  109. package/dist/pngEmbed-D4X4ZN-3.cjs +0 -563
  110. package/dist/rolldown-runtime-CKhH4XqG.cjs +0 -24
@@ -1,21 +1,21 @@
1
- import { n as PdfDocument } from "./pdfDocument-CbU-2TjT.cjs";
2
- import { C as PdfRef, _ as PdfDict, v as PdfName, w as PdfStream } from "./pdfForm-SOXJ72LW.cjs";
1
+ import { n as PdfDocument } from "./pdfDocument-CzOipXnw.cjs";
2
+ import { C as PdfRef, _ as PdfDict, v as PdfName, w as PdfStream } from "./pdfForm-Ca86NDWn.cjs";
3
3
 
4
4
  //#region src/parser/contentStreamParser.d.ts
5
5
  /**
6
- * A single operand value in a content stream.
7
- *
8
- * - `number` — integer or real
9
- * - `string` — literal `(…)` or hex `<…>` string (decoded to a JS string)
10
- * - `boolean` — `true` / `false`
11
- * - `null` — the PDF `null` keyword
12
- * - `PdfName` — a `/Name`
13
- * - `Operand[]` — a PDF array `[…]`
14
- */
6
+ * A single operand value in a content stream.
7
+ *
8
+ * - `number` — integer or real
9
+ * - `string` — literal `(…)` or hex `<…>` string (decoded to a JS string)
10
+ * - `boolean` — `true` / `false`
11
+ * - `null` — the PDF `null` keyword
12
+ * - `PdfName` — a `/Name`
13
+ * - `Operand[]` — a PDF array `[…]`
14
+ */
15
15
  type Operand = number | string | boolean | null | PdfName | Operand[];
16
16
  /**
17
- * A parsed content-stream operator with its preceding operands.
18
- */
17
+ * A parsed content-stream operator with its preceding operands.
18
+ */
19
19
  interface ContentStreamOperator {
20
20
  /** The operator keyword, e.g. `"BT"`, `"Tf"`, `"Tj"`, `"re"`, `"cm"`. */
21
21
  operator: string;
@@ -23,17 +23,17 @@ interface ContentStreamOperator {
23
23
  operands: Operand[];
24
24
  }
25
25
  /**
26
- * Parse a PDF content stream into an ordered list of operators.
27
- *
28
- * @param data - The raw content-stream bytes (already decompressed).
29
- * @returns An array of operators in document order.
30
- */
26
+ * Parse a PDF content stream into an ordered list of operators.
27
+ *
28
+ * @param data - The raw content-stream bytes (already decompressed).
29
+ * @returns An array of operators in document order.
30
+ */
31
31
  declare function parseContentStream(data: Uint8Array): ContentStreamOperator[];
32
32
  //#endregion
33
33
  //#region src/parser/textExtractor.d.ts
34
34
  /**
35
- * A single extracted text item with position and font information.
36
- */
35
+ * A single extracted text item with position and font information.
36
+ */
37
37
  interface TextItem {
38
38
  /** The extracted text string. */
39
39
  text: string;
@@ -51,65 +51,65 @@ interface TextItem {
51
51
  fontName: string;
52
52
  }
53
53
  /**
54
- * Options for text extraction.
55
- */
54
+ * Options for text extraction.
55
+ */
56
56
  interface TextExtractionOptions {
57
57
  /**
58
- * Include position information.
59
- * Default: `false` for performance.
60
- */
58
+ * Include position information.
59
+ * Default: `false` for performance.
60
+ */
61
61
  withPositions?: boolean | undefined;
62
62
  }
63
63
  /**
64
- * Extract plain text from a sequence of parsed content-stream operators.
65
- *
66
- * This function concatenates all text-showing operator strings, inserting
67
- * spaces between text objects (BT/ET blocks) and newlines at line breaks
68
- * (`T*`, `Td`, `TD`).
69
- *
70
- * @param operators - Parsed content-stream operators.
71
- * @param resources - Optional page `/Resources` dictionary (used to look
72
- * up font encodings and ToUnicode CMaps).
73
- * @param options - Extraction options.
74
- * @returns The extracted text as a single string.
75
- */
64
+ * Extract plain text from a sequence of parsed content-stream operators.
65
+ *
66
+ * This function concatenates all text-showing operator strings, inserting
67
+ * spaces between text objects (BT/ET blocks) and newlines at line breaks
68
+ * (`T*`, `Td`, `TD`).
69
+ *
70
+ * @param operators - Parsed content-stream operators.
71
+ * @param resources - Optional page `/Resources` dictionary (used to look
72
+ * up font encodings and ToUnicode CMaps).
73
+ * @param options - Extraction options.
74
+ * @returns The extracted text as a single string.
75
+ */
76
76
  declare function extractText(operators: ContentStreamOperator[], resources?: PdfDict, options?: TextExtractionOptions): string;
77
77
  /**
78
- * Extract text with position information from a parsed content stream.
79
- *
80
- * Each returned {@link TextItem} includes the text string, its position
81
- * (x, y), dimensions (width, height), font size, and font name.
82
- *
83
- * @param operators - Parsed content-stream operators.
84
- * @param resources - Optional page `/Resources` dictionary.
85
- * @returns An array of positioned text items.
86
- */
78
+ * Extract text with position information from a parsed content stream.
79
+ *
80
+ * Each returned {@link TextItem} includes the text string, its position
81
+ * (x, y), dimensions (width, height), font size, and font name.
82
+ *
83
+ * @param operators - Parsed content-stream operators.
84
+ * @param resources - Optional page `/Resources` dictionary.
85
+ * @returns An array of positioned text items.
86
+ */
87
87
  declare function extractTextWithPositions(operators: ContentStreamOperator[], resources?: PdfDict): TextItem[];
88
88
  //#endregion
89
89
  //#region src/parser/streamDecode.d.ts
90
90
  /**
91
- * Decode (decompress) PDF stream data that may have one or more filters
92
- * applied. Filters are applied in the order they appear in the array
93
- * (first entry is the outermost encoding, decoded first).
94
- *
95
- * @param data - The raw (encoded) stream bytes.
96
- * @param filters - A single filter name or an ordered array of filter
97
- * names (e.g. `"FlateDecode"` or
98
- * `["ASCIIHexDecode", "FlateDecode"]`).
99
- * @param decodeParms - Optional decode parameters — a single `PdfDict` or
100
- * an array of `PdfDict | null` parallel to `filters`.
101
- * @returns The fully decoded bytes.
102
- */
91
+ * Decode (decompress) PDF stream data that may have one or more filters
92
+ * applied. Filters are applied in the order they appear in the array
93
+ * (first entry is the outermost encoding, decoded first).
94
+ *
95
+ * @param data - The raw (encoded) stream bytes.
96
+ * @param filters - A single filter name or an ordered array of filter
97
+ * names (e.g. `"FlateDecode"` or
98
+ * `["ASCIIHexDecode", "FlateDecode"]`).
99
+ * @param decodeParms - Optional decode parameters — a single `PdfDict` or
100
+ * an array of `PdfDict | null` parallel to `filters`.
101
+ * @returns The fully decoded bytes.
102
+ */
103
103
  declare function decodeStream(data: Uint8Array, filters: string | string[], decodeParms?: PdfDict | PdfDict[] | null): Uint8Array;
104
104
  //#endregion
105
105
  //#region src/parser/parseError.d.ts
106
106
  /**
107
- * @module parser/parseError
108
- * Structured error class for PDF parsing failures.
109
- * @packageDocumentation
110
- */
107
+ * @module parser/parseError
108
+ * Structured error class for PDF parsing failures.
109
+ * @packageDocumentation
110
+ */
111
111
  declare class PdfParseError extends Error {
112
- readonly name = "PdfParseError";
112
+ override readonly name = "PdfParseError";
113
113
  readonly offset: number;
114
114
  readonly expected: string;
115
115
  readonly actual: string;
@@ -127,8 +127,8 @@ declare function formatHexContext(data: Uint8Array, offset: number, windowSize?:
127
127
  //#endregion
128
128
  //#region src/assets/image/imageExtract.d.ts
129
129
  /**
130
- * Information about a single image XObject in a PDF document.
131
- */
130
+ * Information about a single image XObject in a PDF document.
131
+ */
132
132
  interface ImageInfo {
133
133
  /** The PdfStream object for this image (can be mutated for in-place optimization). */
134
134
  readonly stream: PdfStream;
@@ -154,44 +154,44 @@ interface ImageInfo {
154
154
  readonly compressedSize: number;
155
155
  }
156
156
  /**
157
- * Extract all image XObjects from a PDF document.
158
- *
159
- * Walks every page's `/Resources /XObject` dictionary and collects
160
- * metadata for each image XObject found.
161
- *
162
- * @param doc - A parsed `PdfDocument`.
163
- * @returns An array of `ImageInfo` objects, one per image XObject.
164
- *
165
- * @example
166
- * ```ts
167
- * import { loadPdf, extractImages } from 'modern-pdf-lib';
168
- *
169
- * const doc = await loadPdf(pdfBytes);
170
- * const images = extractImages(doc);
171
- *
172
- * for (const img of images) {
173
- * console.log(`${img.name}: ${img.width}x${img.height} ${img.colorSpace} (${img.compressedSize} bytes)`);
174
- * }
175
- * ```
176
- */
157
+ * Extract all image XObjects from a PDF document.
158
+ *
159
+ * Walks every page's `/Resources /XObject` dictionary and collects
160
+ * metadata for each image XObject found.
161
+ *
162
+ * @param doc - A parsed `PdfDocument`.
163
+ * @returns An array of `ImageInfo` objects, one per image XObject.
164
+ *
165
+ * @example
166
+ * ```ts
167
+ * import { loadPdf, extractImages } from 'modern-pdf-lib';
168
+ *
169
+ * const doc = await loadPdf(pdfBytes);
170
+ * const images = extractImages(doc);
171
+ *
172
+ * for (const img of images) {
173
+ * console.log(`${img.name}: ${img.width}x${img.height} ${img.colorSpace} (${img.compressedSize} bytes)`);
174
+ * }
175
+ * ```
176
+ */
177
177
  declare function extractImages(doc: PdfDocument): ImageInfo[];
178
178
  /**
179
- * Decode image stream data into raw pixels.
180
- *
181
- * For DCTDecode (JPEG) streams, returns the raw JPEG bytes (not decoded
182
- * to pixels) since JPEG decoding requires the WASM module.
183
- *
184
- * For FlateDecode and other filters, fully decodes the stream.
185
- *
186
- * @param imageInfo - An `ImageInfo` from `extractImages()`.
187
- * @returns The decoded stream data.
188
- */
179
+ * Decode image stream data into raw pixels.
180
+ *
181
+ * For DCTDecode (JPEG) streams, returns the raw JPEG bytes (not decoded
182
+ * to pixels) since JPEG decoding requires the WASM module.
183
+ *
184
+ * For FlateDecode and other filters, fully decodes the stream.
185
+ *
186
+ * @param imageInfo - An `ImageInfo` from `extractImages()`.
187
+ * @returns The decoded stream data.
188
+ */
189
189
  declare function decodeImageStream(imageInfo: ImageInfo): Uint8Array;
190
190
  //#endregion
191
191
  //#region src/assets/image/compressionAnalysis.d.ts
192
192
  /**
193
- * Per-image analysis result.
194
- */
193
+ * Per-image analysis result.
194
+ */
195
195
  interface ImageAnalysis {
196
196
  /** Resource name on the page (e.g. '/Im1'). */
197
197
  readonly name: string;
@@ -218,11 +218,11 @@ interface ImageAnalysis {
218
218
  /** Effective DPI of the image at its display size, or `undefined` if unknown. */
219
219
  readonly effectiveDpi: number | undefined;
220
220
  /** Recommended action for this image. */
221
- readonly recommendation: 'recompress' | 'keep' | 'downscale' | 'grayscale';
221
+ readonly recommendation: "recompress" | "keep" | "downscale" | "grayscale";
222
222
  }
223
223
  /**
224
- * Full document analysis report.
225
- */
224
+ * Full document analysis report.
225
+ */
226
226
  interface AnalysisReport {
227
227
  /** Per-image analysis results. */
228
228
  readonly images: readonly ImageAnalysis[];
@@ -236,49 +236,49 @@ interface AnalysisReport {
236
236
  readonly totalSavingsPercent: number;
237
237
  }
238
238
  /**
239
- * Options for `analyzeImages()`.
240
- */
239
+ * Options for `analyzeImages()`.
240
+ */
241
241
  interface AnalyzeImagesOptions {
242
242
  /**
243
- * JPEG quality used for size estimation (1–100).
244
- *
245
- * Default: `80`.
246
- */
243
+ * JPEG quality used for size estimation (1–100).
244
+ *
245
+ * Default: `80`.
246
+ */
247
247
  readonly quality?: number;
248
248
  /**
249
- * Maximum allowed DPI. Images exceeding this at their display size
250
- * receive a `'downscale'` recommendation.
251
- *
252
- * Default: `150`.
253
- */
249
+ * Maximum allowed DPI. Images exceeding this at their display size
250
+ * receive a `'downscale'` recommendation.
251
+ *
252
+ * Default: `150`.
253
+ */
254
254
  readonly maxDpi?: number;
255
255
  }
256
256
  /**
257
- * Analyze all images in a PDF and report potential savings without
258
- * modifying the document.
259
- *
260
- * For each image XObject with `bitsPerComponent === 8` and 1–4 channels,
261
- * the function estimates the JPEG-encoded size — using the WASM encoder
262
- * when available, or a heuristic fallback otherwise.
263
- *
264
- * @param doc - A parsed `PdfDocument`.
265
- * @param options - Optional quality and maxDpi settings.
266
- * @returns An `AnalysisReport` with per-image and aggregate statistics.
267
- *
268
- * @example
269
- * ```ts
270
- * import { loadPdf, analyzeImages } from 'modern-pdf-lib';
271
- *
272
- * const doc = await loadPdf(pdfBytes);
273
- * const report = analyzeImages(doc, { quality: 75, maxDpi: 150 });
274
- *
275
- * console.log(`Total savings: ${report.totalSavingsPercent.toFixed(1)}%`);
276
- * for (const img of report.images) {
277
- * console.log(` ${img.name}: ${img.recommendation} (${img.savingsPercent.toFixed(1)}%)`);
278
- * }
279
- * ```
280
- */
257
+ * Analyze all images in a PDF and report potential savings without
258
+ * modifying the document.
259
+ *
260
+ * For each image XObject with `bitsPerComponent === 8` and 1–4 channels,
261
+ * the function estimates the JPEG-encoded size — using the WASM encoder
262
+ * when available, or a heuristic fallback otherwise.
263
+ *
264
+ * @param doc - A parsed `PdfDocument`.
265
+ * @param options - Optional quality and maxDpi settings.
266
+ * @returns An `AnalysisReport` with per-image and aggregate statistics.
267
+ *
268
+ * @example
269
+ * ```ts
270
+ * import { loadPdf, analyzeImages } from 'modern-pdf-lib';
271
+ *
272
+ * const doc = await loadPdf(pdfBytes);
273
+ * const report = analyzeImages(doc, { quality: 75, maxDpi: 150 });
274
+ *
275
+ * console.log(`Total savings: ${report.totalSavingsPercent.toFixed(1)}%`);
276
+ * for (const img of report.images) {
277
+ * console.log(` ${img.name}: ${img.recommendation} (${img.savingsPercent.toFixed(1)}%)`);
278
+ * }
279
+ * ```
280
+ */
281
281
  declare function analyzeImages(doc: PdfDocument, options?: AnalyzeImagesOptions): AnalysisReport;
282
282
  //#endregion
283
283
  export { parseContentStream as _, ImageInfo as a, PdfParseError as c, TextExtractionOptions as d, TextItem as f, Operand as g, ContentStreamOperator as h, analyzeImages as i, formatHexContext as l, extractTextWithPositions as m, AnalyzeImagesOptions as n, decodeImageStream as o, extractText as p, ImageAnalysis as r, extractImages as s, AnalysisReport as t, decodeStream as u };
284
- //# sourceMappingURL=compressionAnalysis-VtYV9Zmq.d.cts.map
284
+ //# sourceMappingURL=compressionAnalysis-UfmonqbM.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compressionAnalysis-UfmonqbM.d.cts","names":[],"sources":["../src/parser/contentStreamParser.ts","../src/parser/textExtractor.ts","../src/parser/streamDecode.ts","../src/parser/parseError.ts","../src/assets/image/imageExtract.ts","../src/assets/image/compressionAnalysis.ts"],"mappings":";;;;AA0CY;AAyBZ;;;;;;;;AAAsD;AAzB1C,KATA,OAAA,sCAA6C,OAAA,GAAU,OAAA;;;ACHnE;UDQiB,qBAAA;;EAEf,QAAA;;EAEA,QAAA,EAAU,OAAA;AAAA;ACiCZ;;;;;;AAAA,iBDRgB,kBAAA,CAAmB,IAAA,EAAM,UAAA,GAAa,qBAAA;;;;;;UCrCrC,QAAA;EDqCqC;ECnCpD,IAAA;;EAEA,CAAA;;EAEA,CAAA;EANe;EAQf,KAAA;EARe;EAUf,MAAA;;EAEA,QAAA;;EAEA,QAAA;AAAA;;;AAAA;UAMe,qBAAA;EAAA;;;AAKf;EAAA,aAAA;AAAA;;;;;;;;;;;;;;iBAoBc,WAAA,CACd,SAAA,EAAW,qBAAA,IACX,SAAA,GAAY,OAAA,EACZ,OAAA,GAAU,qBAAA;AA0LZ;;;;;;;;;;AAAA,iBAAgB,wBAAA,CACd,SAAA,EAAW,qBAAA,IACX,SAAA,GAAY,OAAA,GACX,QAAA;;;;;;AD1OH;;;;AAAmE;AAKnE;;;;;iBEFgB,YAAA,CACd,IAAA,EAAM,UAAA,EACN,OAAA,qBACA,WAAA,GAAc,OAAA,GAAU,OAAA,YACvB,UAAA;;;;;;;AFPH;cG3Ba,aAAA,SAAsB,KAAA;EAAA,kBACf,IAAA;EAAA,SACT,MAAA;EAAA,SACA,QAAA;EAAA,SACA,MAAA;EAAA,SACA,UAAA;EAET,WAAA,CAAY,OAAA;IACV,OAAA;IACA,MAAA;IACA,QAAA;IACA,MAAA;IACA,IAAA,GAAO,UAAA;IACP,KAAA,GAAQ,KAAA;EAAA;AAAA;AAAA,iBAiBI,gBAAA,CAAiB,IAAA,EAAM,UAAA,EAAY,MAAA,UAAgB,UAAA;;;;;;UCJlD,SAAA;EJUL;EAAA,SIRD,MAAA,EAAQ,SAAA;EJiCnB;EAAA,SI/BW,GAAA,EAAK,MAAA;;WAEL,IAAA;;WAEA,SAAA;;WAEA,KAAA;EJyB2C;EAAA,SIvB3C,MAAA;;WAEA,gBAAA;EHhBX;EAAA,SGkBW,UAAA;;WAEA,QAAA;;WAEA,OAAA;;WAEA,cAAA;AAAA;;;;AHVT;AAMF;;;;AAKE;AAoBF;;;;;;;;;;;;iBG6FgB,aAAA,CAAc,GAAA,EAAK,WAAA,GAAc,SAAA;;;AH1FrC;AA0LZ;;;;;;;;iBGgBgB,iBAAA,CAAkB,SAAA,EAAW,SAAA,GAAY,UAAA;;;;;;UC/PxC,aAAA;ELiBL;EAAA,SKfD,IAAA;ELwCX;EAAA,SKtCW,SAAA;;WAEA,KAAA;;WAEA,MAAA;;WAEA,WAAA;ELgC2C;EAAA,SK9B3C,aAAA;;WAEA,UAAA;EJTX;EAAA,SIWW,iBAAA;;WAEA,gBAAA;;WAEA,cAAA;;WAEA,WAAA;;WAEA,YAAA;;WAEA,cAAA;AAAA;AJDX;;;AAAA,UIOiB,cAAA;EJFf;EAAA,SIIS,MAAA,WAAiB,aAAA;EJgBZ;EAAA,SIdL,gBAAA;;WAEA,kBAAA;;WAEA,YAAA;EJaC;EAAA,SIXD,mBAAA;AAAA;;;;UAUM,oBAAA;EJCL;AAAA;AA0LZ;;;EA1LY,SIKD,OAAA;;;;;;;WAOA,MAAA;AAAA;;;AJiLR;;;;ACvOH;;;;;;;;;;;;;;;;;AAIG;;iBG8Ja,aAAA,CACd,GAAA,EAAK,WAAA,EACL,OAAA,GAAU,oBAAA,GACT,cAAA"}
package/dist/create.cjs CHANGED
@@ -1,54 +1,52 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_pdfPage = require('./pdfPage-Cd8jOJp6.cjs');
3
- const require_pdfDocument = require('./pdfDocument-CEbbUP9i.cjs');
4
- const require_layout = require('./layout-DH61a1iR.cjs');
5
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_pdfDocument = require("./pdfDocument-C_7mrBCL.cjs");
3
+ const require_layout = require("./layout-C4vbTlBW.cjs");
6
4
  exports.BlendMode = require_layout.BlendMode;
7
5
  exports.EmbeddedFont = require_pdfDocument.EmbeddedFont;
8
6
  exports.ImageAlignment = require_layout.ImageAlignment;
9
7
  exports.LineCapStyle = require_layout.LineCapStyle;
10
8
  exports.LineJoinStyle = require_layout.LineJoinStyle;
11
- exports.PageSizes = require_pdfPage.PageSizes;
9
+ exports.PageSizes = require_pdfDocument.PageSizes;
12
10
  exports.PdfDocument = require_pdfDocument.PdfDocument;
13
- exports.PdfPage = require_pdfPage.PdfPage;
11
+ exports.PdfPage = require_pdfDocument.PdfPage;
14
12
  exports.StandardFonts = require_pdfDocument.StandardFonts;
15
13
  exports.TextAlignment = require_layout.TextAlignment;
16
14
  exports.TextRenderingMode = require_layout.TextRenderingMode;
17
15
  exports.asNumber = require_layout.asNumber;
18
16
  exports.asPDFName = require_layout.asPDFName;
19
17
  exports.asPDFNumber = require_layout.asPDFNumber;
20
- exports.buildGradientObjects = require_pdfPage.buildGradientObjects;
21
- exports.buildPatternObjects = require_pdfPage.buildPatternObjects;
22
- exports.cmyk = require_pdfPage.cmyk;
23
- exports.colorToComponents = require_pdfPage.colorToComponents;
24
- exports.componentsToColor = require_pdfPage.componentsToColor;
18
+ exports.buildGradientObjects = require_pdfDocument.buildGradientObjects;
19
+ exports.buildPatternObjects = require_pdfDocument.buildPatternObjects;
20
+ exports.cmyk = require_pdfDocument.cmyk;
21
+ exports.colorToComponents = require_pdfDocument.colorToComponents;
22
+ exports.componentsToColor = require_pdfDocument.componentsToColor;
25
23
  exports.computeFontSize = require_layout.computeFontSize;
26
24
  exports.copyPages = require_pdfDocument.copyPages;
27
25
  exports.createPdf = require_pdfDocument.createPdf;
28
26
  exports.cropPage = require_layout.cropPage;
29
- exports.degrees = require_pdfPage.degrees;
30
- exports.degreesToRadians = require_pdfPage.degreesToRadians;
27
+ exports.degrees = require_pdfDocument.degrees;
28
+ exports.degreesToRadians = require_pdfDocument.degreesToRadians;
31
29
  exports.embedPageAsFormXObject = require_pdfDocument.embedPageAsFormXObject;
32
30
  exports.getPageSize = require_layout.getPageSize;
33
- exports.grayscale = require_pdfPage.grayscale;
31
+ exports.grayscale = require_pdfDocument.grayscale;
34
32
  exports.insertPage = require_layout.insertPage;
35
33
  exports.layoutCombedText = require_layout.layoutCombedText;
36
34
  exports.layoutMultilineText = require_layout.layoutMultilineText;
37
35
  exports.layoutSinglelineText = require_layout.layoutSinglelineText;
38
- exports.linearGradient = require_pdfPage.linearGradient;
36
+ exports.linearGradient = require_pdfDocument.linearGradient;
39
37
  exports.mergePdfs = require_pdfDocument.mergePdfs;
40
38
  exports.movePage = require_layout.movePage;
41
- exports.radialGradient = require_pdfPage.radialGradient;
42
- exports.radians = require_pdfPage.radians;
43
- exports.radiansToDegrees = require_pdfPage.radiansToDegrees;
39
+ exports.radialGradient = require_pdfDocument.radialGradient;
40
+ exports.radians = require_pdfDocument.radians;
41
+ exports.radiansToDegrees = require_pdfDocument.radiansToDegrees;
44
42
  exports.removePage = require_layout.removePage;
45
43
  exports.removePages = require_layout.removePages;
46
44
  exports.resizePage = require_layout.resizePage;
47
45
  exports.reversePages = require_layout.reversePages;
48
- exports.rgb = require_pdfPage.rgb;
46
+ exports.rgb = require_pdfDocument.rgb;
49
47
  exports.rotateAllPages = require_layout.rotateAllPages;
50
48
  exports.rotatePage = require_layout.rotatePage;
51
- exports.setFillingColor = require_pdfPage.setFillingColor;
52
- exports.setStrokingColor = require_pdfPage.setStrokingColor;
49
+ exports.setFillingColor = require_pdfDocument.setFillingColor;
50
+ exports.setStrokingColor = require_pdfDocument.setStrokingColor;
53
51
  exports.splitPdf = require_pdfDocument.splitPdf;
54
- exports.tilingPattern = require_pdfPage.tilingPattern;
52
+ exports.tilingPattern = require_pdfDocument.tilingPattern;
package/dist/create.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as DrawLineOptions, $n as colorToComponents, An as Angle, At as ColorStop, Bt as linearGradient, Cn as BlendMode, En as LineJoinStyle, Fn as degreesToRadians, Ft as RadialGradientFill, Gt as EmbeddedPdfPage, H as DocumentMetadata, Ht as tilingPattern, In as radians, It as RadialGradientOptions, Jn as GrayscaleColor, Kn as CmykColor, Kt as embedPageAsFormXObject, Ln as radiansToDegrees, Lt as TilingPatternOptions, Mn as Radians, Mt as LinearGradientOptions, Nt as NormalizedStop, On as TextAlignment, Pn as degrees, Pt as PatternFill, Q as DrawImageOptions, Qn as cmyk, R as PdfSaveOptions, Rt as buildGradientObjects, Tn as LineCapStyle, Ut as DrawPageOptions, V as CatalogOptions, Vt as radialGradient, Wt as EmbedPageOptions, X as DrawCircleOptions, Yn as RgbColor, Z as DrawEllipseOptions, a as StandardFonts, at as FontRef, cr as setFillingColor, ct as PageSizes, dt as SoftMaskRef, er as componentsToColor, et as DrawQrCodeOptions, ft as TransparencyGroupOptions, i as StandardFontName, it as DrawTextOptions, jn as Degrees, jt as GradientFill, kn as TextRenderingMode, lt as PdfPage, mr as setStrokingColor, n as PdfDocument, nr as rgb, nt as DrawSquareOptions, o as createPdf, ot as ImageRef, qn as Color, r as SetTitleOptions, rt as DrawSvgPathOptions, st as PageSize, t as EmbedFontOptions, tr as grayscale, tt as DrawRectangleOptions, ut as SoftMaskBuilder, wn as ImageAlignment, zt as buildPatternObjects } from "./pdfDocument-CbU-2TjT.cjs";
2
- import { A as movePage, C as copyPages, D as cropPage, E as CropBox, F as rotateAllPages, I as rotatePage, L as asNumber, M as removePages, N as resizePage, O as getPageSize, P as reversePages, R as asPDFName, S as PageRange, T as splitPdf, _ as LayoutSinglelineResult, b as layoutMultilineText, f as ComputeFontSizeOptions, g as LayoutSinglelineOptions, h as LayoutMultilineResult, j as removePage, k as insertPage, m as LayoutMultilineOptions, p as LayoutCombedOptions, r as EmbeddedFont, v as computeFontSize, w as mergePdfs, x as layoutSinglelineText, y as layoutCombedText, z as asPDFNumber } from "./fontEmbed-BN842wlb.cjs";
1
+ import { Ar as setStrokingColor, Bn as Radians, Bt as RadialGradientOptions, Ft as GradientFill, G as CatalogOptions, Gn as radiansToDegrees, Gt as radialGradient, Hn as degrees, Ht as buildGradientObjects, I as PdfSaveOptions, In as TextAlignment, It as LinearGradientOptions, Jt as EmbedPageOptions, K as DocumentMetadata, Kt as tilingPattern, Ln as TextRenderingMode, Lt as NormalizedStop, Mn as ImageAlignment, Nn as LineCapStyle, Pn as LineJoinStyle, Pt as ColorStop, Rn as Angle, Rt as PatternFill, Un as degreesToRadians, Ut as buildPatternObjects, Vt as TilingPatternOptions, Wn as radians, Wt as linearGradient, Xt as embedPageAsFormXObject, Yt as EmbeddedPdfPage, _r as rgb, a as StandardFonts, at as DrawRectangleOptions, cr as cmyk, ct as DrawTextOptions, dt as PageSize, er as CmykColor, et as DrawCircleOptions, fr as componentsToColor, ft as PageSizes, gt as TransparencyGroupOptions, hr as grayscale, ht as SoftMaskRef, i as StandardFontName, ir as RgbColor, it as DrawQrCodeOptions, jn as BlendMode, lt as FontRef, mt as SoftMaskBuilder, n as PdfDocument, nt as DrawImageOptions, o as createPdf, ot as DrawSquareOptions, pt as PdfPage, qt as DrawPageOptions, r as SetTitleOptions, rr as GrayscaleColor, rt as DrawLineOptions, st as DrawSvgPathOptions, t as EmbedFontOptions, tr as Color, tt as DrawEllipseOptions, ur as colorToComponents, ut as ImageRef, wr as setFillingColor, zn as Degrees, zt as RadialGradientFill } from "./pdfDocument-CzOipXnw.cjs";
2
+ import { A as movePage, C as copyPages, D as cropPage, E as CropBox, F as rotateAllPages, I as rotatePage, L as asNumber, M as removePages, N as resizePage, O as getPageSize, P as reversePages, R as asPDFName, S as PageRange, T as splitPdf, _ as LayoutSinglelineResult, b as layoutMultilineText, f as ComputeFontSizeOptions, g as LayoutSinglelineOptions, h as LayoutMultilineResult, j as removePage, k as insertPage, m as LayoutMultilineOptions, p as LayoutCombedOptions, r as EmbeddedFont, v as computeFontSize, w as mergePdfs, x as layoutSinglelineText, y as layoutCombedText, z as asPDFNumber } from "./fontEmbed-DGiZS0h2.cjs";
3
3
  export { type Angle, BlendMode, type CatalogOptions, type CmykColor, type Color, type ColorStop, type ComputeFontSizeOptions, type CropBox, type Degrees, type DocumentMetadata, type DrawCircleOptions, type DrawEllipseOptions, type DrawImageOptions, type DrawLineOptions, type DrawPageOptions, type DrawQrCodeOptions, type DrawRectangleOptions, type DrawSquareOptions, type DrawSvgPathOptions, type DrawTextOptions, type EmbedFontOptions, type EmbedPageOptions, EmbeddedFont, type EmbeddedPdfPage, type FontRef, type GradientFill, type GrayscaleColor, ImageAlignment, type ImageRef, type LayoutCombedOptions, type LayoutMultilineOptions, type LayoutMultilineResult, type LayoutSinglelineOptions, type LayoutSinglelineResult, LineCapStyle, LineJoinStyle, type LinearGradientOptions, type NormalizedStop, type PageRange, type PageSize, PageSizes, type PatternFill, PdfDocument, PdfPage, type PdfSaveOptions, type RadialGradientFill, type RadialGradientOptions, type Radians, type RgbColor, type SetTitleOptions, type SoftMaskBuilder, type SoftMaskRef, type StandardFontName, StandardFonts, TextAlignment, TextRenderingMode, type TilingPatternOptions, type TransparencyGroupOptions, asNumber, asPDFName, asPDFNumber, buildGradientObjects, buildPatternObjects, cmyk, colorToComponents, componentsToColor, computeFontSize, copyPages, createPdf, cropPage, degrees, degreesToRadians, embedPageAsFormXObject, getPageSize, grayscale, insertPage, layoutCombedText, layoutMultilineText, layoutSinglelineText, linearGradient, mergePdfs, movePage, radialGradient, radians, radiansToDegrees, removePage, removePages, resizePage, reversePages, rgb, rotateAllPages, rotatePage, setFillingColor, setStrokingColor, splitPdf, tilingPattern };
package/dist/create.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as DrawLineOptions, $n as colorToComponents, An as Angle, At as ColorStop, Bt as linearGradient, Cn as BlendMode, En as LineJoinStyle, Fn as degreesToRadians, Ft as RadialGradientFill, Gt as EmbeddedPdfPage, H as DocumentMetadata, Ht as tilingPattern, In as radians, It as RadialGradientOptions, Jn as GrayscaleColor, Kn as CmykColor, Kt as embedPageAsFormXObject, Ln as radiansToDegrees, Lt as TilingPatternOptions, Mn as Radians, Mt as LinearGradientOptions, Nt as NormalizedStop, On as TextAlignment, Pn as degrees, Pt as PatternFill, Q as DrawImageOptions, Qn as cmyk, R as PdfSaveOptions, Rt as buildGradientObjects, Tn as LineCapStyle, Ut as DrawPageOptions, V as CatalogOptions, Vt as radialGradient, Wt as EmbedPageOptions, X as DrawCircleOptions, Yn as RgbColor, Z as DrawEllipseOptions, a as StandardFonts, at as FontRef, cr as setFillingColor, ct as PageSizes, dt as SoftMaskRef, er as componentsToColor, et as DrawQrCodeOptions, ft as TransparencyGroupOptions, i as StandardFontName, it as DrawTextOptions, jn as Degrees, jt as GradientFill, kn as TextRenderingMode, lt as PdfPage, mr as setStrokingColor, n as PdfDocument, nr as rgb, nt as DrawSquareOptions, o as createPdf, ot as ImageRef, qn as Color, r as SetTitleOptions, rt as DrawSvgPathOptions, st as PageSize, t as EmbedFontOptions, tr as grayscale, tt as DrawRectangleOptions, ut as SoftMaskBuilder, wn as ImageAlignment, zt as buildPatternObjects } from "./pdfDocument-BgvEP5Po.mjs";
2
- import { A as movePage, C as copyPages, D as cropPage, E as CropBox, F as rotateAllPages, I as rotatePage, L as asNumber, M as removePages, N as resizePage, O as getPageSize, P as reversePages, R as asPDFName, S as PageRange, T as splitPdf, _ as LayoutSinglelineResult, b as layoutMultilineText, f as ComputeFontSizeOptions, g as LayoutSinglelineOptions, h as LayoutMultilineResult, j as removePage, k as insertPage, m as LayoutMultilineOptions, p as LayoutCombedOptions, r as EmbeddedFont, v as computeFontSize, w as mergePdfs, x as layoutSinglelineText, y as layoutCombedText, z as asPDFNumber } from "./fontEmbed-Dgq5K89o.mjs";
1
+ import { Ar as setStrokingColor, Bn as Radians, Bt as RadialGradientOptions, Ft as GradientFill, G as CatalogOptions, Gn as radiansToDegrees, Gt as radialGradient, Hn as degrees, Ht as buildGradientObjects, I as PdfSaveOptions, In as TextAlignment, It as LinearGradientOptions, Jt as EmbedPageOptions, K as DocumentMetadata, Kt as tilingPattern, Ln as TextRenderingMode, Lt as NormalizedStop, Mn as ImageAlignment, Nn as LineCapStyle, Pn as LineJoinStyle, Pt as ColorStop, Rn as Angle, Rt as PatternFill, Un as degreesToRadians, Ut as buildPatternObjects, Vt as TilingPatternOptions, Wn as radians, Wt as linearGradient, Xt as embedPageAsFormXObject, Yt as EmbeddedPdfPage, _r as rgb, a as StandardFonts, at as DrawRectangleOptions, cr as cmyk, ct as DrawTextOptions, dt as PageSize, er as CmykColor, et as DrawCircleOptions, fr as componentsToColor, ft as PageSizes, gt as TransparencyGroupOptions, hr as grayscale, ht as SoftMaskRef, i as StandardFontName, ir as RgbColor, it as DrawQrCodeOptions, jn as BlendMode, lt as FontRef, mt as SoftMaskBuilder, n as PdfDocument, nt as DrawImageOptions, o as createPdf, ot as DrawSquareOptions, pt as PdfPage, qt as DrawPageOptions, r as SetTitleOptions, rr as GrayscaleColor, rt as DrawLineOptions, st as DrawSvgPathOptions, t as EmbedFontOptions, tr as Color, tt as DrawEllipseOptions, ur as colorToComponents, ut as ImageRef, wr as setFillingColor, zn as Degrees, zt as RadialGradientFill } from "./pdfDocument-CH2E4UCc.mjs";
2
+ import { A as movePage, C as copyPages, D as cropPage, E as CropBox, F as rotateAllPages, I as rotatePage, L as asNumber, M as removePages, N as resizePage, O as getPageSize, P as reversePages, R as asPDFName, S as PageRange, T as splitPdf, _ as LayoutSinglelineResult, b as layoutMultilineText, f as ComputeFontSizeOptions, g as LayoutSinglelineOptions, h as LayoutMultilineResult, j as removePage, k as insertPage, m as LayoutMultilineOptions, p as LayoutCombedOptions, r as EmbeddedFont, v as computeFontSize, w as mergePdfs, x as layoutSinglelineText, y as layoutCombedText, z as asPDFNumber } from "./fontEmbed-DtA_riGC.mjs";
3
3
  export { type Angle, BlendMode, type CatalogOptions, type CmykColor, type Color, type ColorStop, type ComputeFontSizeOptions, type CropBox, type Degrees, type DocumentMetadata, type DrawCircleOptions, type DrawEllipseOptions, type DrawImageOptions, type DrawLineOptions, type DrawPageOptions, type DrawQrCodeOptions, type DrawRectangleOptions, type DrawSquareOptions, type DrawSvgPathOptions, type DrawTextOptions, type EmbedFontOptions, type EmbedPageOptions, EmbeddedFont, type EmbeddedPdfPage, type FontRef, type GradientFill, type GrayscaleColor, ImageAlignment, type ImageRef, type LayoutCombedOptions, type LayoutMultilineOptions, type LayoutMultilineResult, type LayoutSinglelineOptions, type LayoutSinglelineResult, LineCapStyle, LineJoinStyle, type LinearGradientOptions, type NormalizedStop, type PageRange, type PageSize, PageSizes, type PatternFill, PdfDocument, PdfPage, type PdfSaveOptions, type RadialGradientFill, type RadialGradientOptions, type Radians, type RgbColor, type SetTitleOptions, type SoftMaskBuilder, type SoftMaskRef, type StandardFontName, StandardFonts, TextAlignment, TextRenderingMode, type TilingPatternOptions, type TransparencyGroupOptions, asNumber, asPDFName, asPDFNumber, buildGradientObjects, buildPatternObjects, cmyk, colorToComponents, componentsToColor, computeFontSize, copyPages, createPdf, cropPage, degrees, degreesToRadians, embedPageAsFormXObject, getPageSize, grayscale, insertPage, layoutCombedText, layoutMultilineText, layoutSinglelineText, linearGradient, mergePdfs, movePage, radialGradient, radians, radiansToDegrees, removePage, removePages, resizePage, reversePages, rgb, rotateAllPages, rotatePage, setFillingColor, setStrokingColor, splitPdf, tilingPattern };
package/dist/create.mjs CHANGED
@@ -1,5 +1,3 @@
1
- import { G as radiansToDegrees, H as degrees, U as degreesToRadians, W as radians, at as grayscale, d as linearGradient, f as radialGradient, ft as setFillingColor, it as componentsToColor, l as buildGradientObjects, n as PdfPage, nt as cmyk, ot as rgb, p as tilingPattern, rt as colorToComponents, t as PageSizes, u as buildPatternObjects, vt as setStrokingColor } from "./pdfPage-B_d9HmkG.mjs";
2
- import { At as EmbeddedFont, I as copyPages, L as mergePdfs, R as splitPdf, i as embedPageAsFormXObject, n as StandardFonts, r as createPdf, t as PdfDocument } from "./pdfDocument-B0_XwS4X.mjs";
3
- import { C as asPDFName, S as asNumber, _ as LineCapStyle, a as cropPage, b as TextAlignment, c as movePage, d as resizePage, f as reversePages, g as ImageAlignment, h as BlendMode, i as layoutSinglelineText, l as removePage, m as rotatePage, n as layoutCombedText, o as getPageSize, p as rotateAllPages, r as layoutMultilineText, s as insertPage, t as computeFontSize, u as removePages, v as LineJoinStyle, w as asPDFNumber, x as TextRenderingMode } from "./layout-D6EUKSP8.mjs";
4
-
5
- export { BlendMode, EmbeddedFont, ImageAlignment, LineCapStyle, LineJoinStyle, PageSizes, PdfDocument, PdfPage, StandardFonts, TextAlignment, TextRenderingMode, asNumber, asPDFName, asPDFNumber, buildGradientObjects, buildPatternObjects, cmyk, colorToComponents, componentsToColor, computeFontSize, copyPages, createPdf, cropPage, degrees, degreesToRadians, embedPageAsFormXObject, getPageSize, grayscale, insertPage, layoutCombedText, layoutMultilineText, layoutSinglelineText, linearGradient, mergePdfs, movePage, radialGradient, radians, radiansToDegrees, removePage, removePages, resizePage, reversePages, rgb, rotateAllPages, rotatePage, setFillingColor, setStrokingColor, splitPdf, tilingPattern };
1
+ import { B as copyPages, Bt as PdfPage, Fn as radians, H as splitPdf, In as radiansToDegrees, Jt as linearGradient, Kt as buildGradientObjects, Mt as EmbeddedFont, Nn as degrees, Pn as degreesToRadians, V as mergePdfs, Xt as tilingPattern, Yn as colorToComponents, Yt as radialGradient, Zn as componentsToColor, c as embedPageAsFormXObject, er as grayscale, hr as setStrokingColor, lr as setFillingColor, n as StandardFonts, nr as rgb, qn as cmyk, qt as buildPatternObjects, r as createPdf, t as PdfDocument, zt as PageSizes } from "./pdfDocument-DRbT6HZw.mjs";
2
+ import { C as asPDFName, S as asNumber, _ as LineCapStyle, a as cropPage, b as TextAlignment, c as movePage, d as resizePage, f as reversePages, g as ImageAlignment, h as BlendMode, i as layoutSinglelineText, l as removePage, m as rotatePage, n as layoutCombedText, o as getPageSize, p as rotateAllPages, r as layoutMultilineText, s as insertPage, t as computeFontSize, u as removePages, v as LineJoinStyle, w as asPDFNumber, x as TextRenderingMode } from "./layout-lO4x64kY.mjs";
3
+ export { BlendMode, EmbeddedFont, ImageAlignment, LineCapStyle, LineJoinStyle, PageSizes, PdfDocument, PdfPage, StandardFonts, TextAlignment, TextRenderingMode, asNumber, asPDFName, asPDFNumber, buildGradientObjects, buildPatternObjects, cmyk, colorToComponents, componentsToColor, computeFontSize, copyPages, createPdf, cropPage, degrees, degreesToRadians, embedPageAsFormXObject, getPageSize, grayscale, insertPage, layoutCombedText, layoutMultilineText, layoutSinglelineText, linearGradient, mergePdfs, movePage, radialGradient, radians, radiansToDegrees, removePage, removePages, resizePage, reversePages, rgb, rotateAllPages, rotatePage, setFillingColor, setStrokingColor, splitPdf, tilingPattern };
@@ -1,6 +1,5 @@
1
- import { os as __exportAll } from "./index-DCSbmXWh.d.mts";
2
- import { n as extractImages } from "./imageExtract-Dnk_Ssv7.mjs";
3
-
1
+ import { Vu as __exportAll } from "./index-C1lZe66f.d.mts";
2
+ import { n as extractImages } from "./imageExtract-Dapir-ux.mjs";
4
3
  //#region src/assets/image/deduplicateImages.ts
5
4
  var deduplicateImages_exports = /* @__PURE__ */ __exportAll({ deduplicateImages: () => deduplicateImages });
6
5
  /**
@@ -96,7 +95,7 @@ function deduplicateImages(doc) {
96
95
  bytesSaved
97
96
  };
98
97
  }
99
-
100
98
  //#endregion
101
99
  export { deduplicateImages_exports as n, deduplicateImages as t };
102
- //# sourceMappingURL=deduplicateImages-MfUDPxQz.mjs.map
100
+
101
+ //# sourceMappingURL=deduplicateImages-BTCyAPfJ.mjs.map
@@ -1,6 +1,5 @@
1
- const require_rolldown_runtime = require('./rolldown-runtime-CKhH4XqG.cjs');
2
- const require_imageExtract = require('./imageExtract-zEb1gnkb.cjs');
3
-
1
+ const require_rolldown_runtime = require("./rolldown-runtime-ak5kbic3.cjs");
2
+ const require_imageExtract = require("./imageExtract-DT50Hp_g.cjs");
4
3
  //#region src/assets/image/deduplicateImages.ts
5
4
  var deduplicateImages_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({ deduplicateImages: () => deduplicateImages });
6
5
  /**
@@ -96,18 +95,18 @@ function deduplicateImages(doc) {
96
95
  bytesSaved
97
96
  };
98
97
  }
99
-
100
98
  //#endregion
101
- Object.defineProperty(exports, 'deduplicateImages', {
102
- enumerable: true,
103
- get: function () {
104
- return deduplicateImages;
105
- }
99
+ Object.defineProperty(exports, "deduplicateImages", {
100
+ enumerable: true,
101
+ get: function() {
102
+ return deduplicateImages;
103
+ }
106
104
  });
107
- Object.defineProperty(exports, 'deduplicateImages_exports', {
108
- enumerable: true,
109
- get: function () {
110
- return deduplicateImages_exports;
111
- }
105
+ Object.defineProperty(exports, "deduplicateImages_exports", {
106
+ enumerable: true,
107
+ get: function() {
108
+ return deduplicateImages_exports;
109
+ }
112
110
  });
113
- //# sourceMappingURL=deduplicateImages-cKsnD6Ep.cjs.map
111
+
112
+ //# sourceMappingURL=deduplicateImages-CaGgaqyS.cjs.map