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.
- package/README.md +16 -3
- package/dist/{batchOptimize-Ba_pWw71.cjs → batchOptimize-CXC9gNqD.cjs} +55 -55
- package/dist/{batchOptimize-DtRwBOqR.mjs → batchOptimize-CjLGD5ie.mjs} +25 -25
- package/dist/{bridge-DYCQzxF7.cjs → bridge-ByvzPu5h.cjs} +29 -31
- package/dist/{bridge-CcivG_Sm.mjs → bridge-ZD6O6QQa.mjs} +4 -5
- package/dist/browser.cjs +263 -151
- package/dist/browser.d.cts +166 -166
- package/dist/browser.d.cts.map +1 -1
- package/dist/browser.d.mts +166 -166
- package/dist/browser.d.mts.map +1 -1
- package/dist/browser.mjs +15 -19
- package/dist/cli/index.cjs +7 -7
- package/dist/cli/index.mjs +8 -8
- package/dist/{compressionAnalysis-odbHC7Uk.mjs → compressionAnalysis-BgKy45pA.mjs} +60 -74
- package/dist/{compressionAnalysis-DGs-MqTe.d.mts → compressionAnalysis-CDOp_vPr.d.mts} +136 -136
- package/dist/compressionAnalysis-CDOp_vPr.d.mts.map +1 -0
- package/dist/{compressionAnalysis-B84FPXaQ.cjs → compressionAnalysis-Djv-Zvcd.cjs} +90 -104
- package/dist/{compressionAnalysis-VtYV9Zmq.d.cts → compressionAnalysis-UfmonqbM.d.cts} +136 -136
- package/dist/compressionAnalysis-UfmonqbM.d.cts.map +1 -0
- package/dist/create.cjs +21 -23
- package/dist/create.d.cts +2 -2
- package/dist/create.d.mts +2 -2
- package/dist/create.mjs +3 -5
- package/dist/{deduplicateImages-MfUDPxQz.mjs → deduplicateImages-BTCyAPfJ.mjs} +4 -5
- package/dist/{deduplicateImages-cKsnD6Ep.cjs → deduplicateImages-CaGgaqyS.cjs} +14 -15
- package/dist/{fieldAppearance-C8PoLFSc.d.mts → fieldAppearance-Df1262CT.d.cts} +44 -44
- package/dist/fieldAppearance-Df1262CT.d.cts.map +1 -0
- package/dist/{fieldAppearance-CdiGFG5e.d.cts → fieldAppearance-_CZdoUCD.d.mts} +44 -44
- package/dist/fieldAppearance-_CZdoUCD.d.mts.map +1 -0
- package/dist/fontEmbed-DGiZS0h2.d.cts +677 -0
- package/dist/fontEmbed-DGiZS0h2.d.cts.map +1 -0
- package/dist/fontEmbed-DtA_riGC.d.mts +677 -0
- package/dist/fontEmbed-DtA_riGC.d.mts.map +1 -0
- package/dist/forms.cjs +3 -4
- package/dist/forms.d.cts +2 -2
- package/dist/forms.d.mts +2 -2
- package/dist/forms.mjs +2 -3
- package/dist/{grayscaleDetect-C6kFF3dk.mjs → grayscaleDetect-6GJrgBRT.mjs} +3 -3
- package/dist/{grayscaleDetect-C2m-eEXR.cjs → grayscaleDetect-DAUqxjgR.cjs} +13 -14
- package/dist/{imageExtract-zEb1gnkb.cjs → imageExtract-DT50Hp_g.cjs} +13 -14
- package/dist/{imageExtract-Dnk_Ssv7.mjs → imageExtract-Dapir-ux.mjs} +3 -4
- package/dist/index-C1lZe66f.d.mts +8682 -0
- package/dist/index-C1lZe66f.d.mts.map +1 -0
- package/dist/index-D1SvXWSI.d.cts +8682 -0
- package/dist/index-D1SvXWSI.d.cts.map +1 -0
- package/dist/index.cjs +263 -150
- package/dist/index.d.cts +7 -7
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +14 -17
- package/dist/{layout-DH61a1iR.cjs → layout-C4vbTlBW.cjs} +184 -134
- package/dist/{layout-D6EUKSP8.mjs → layout-lO4x64kY.mjs} +50 -12
- package/dist/{loader-C7B5dVCI.mjs → loader-B1Ix7ozU.mjs} +259 -13
- package/dist/{loader-I4zdkoWc.cjs → loader-DR7H0XOf.cjs} +343 -67
- package/dist/parse.cjs +7 -8
- package/dist/parse.d.cts +3 -3
- package/dist/parse.d.mts +3 -3
- package/dist/parse.mjs +6 -7
- package/dist/pdfDocument-CH2E4UCc.d.mts +5160 -0
- package/dist/pdfDocument-CH2E4UCc.d.mts.map +1 -0
- package/dist/{pdfDocument-CEbbUP9i.cjs → pdfDocument-C_7mrBCL.cjs} +20493 -9511
- package/dist/pdfDocument-CzOipXnw.d.cts +5160 -0
- package/dist/pdfDocument-CzOipXnw.d.cts.map +1 -0
- package/dist/{pdfDocument-B0_XwS4X.mjs → pdfDocument-DRbT6HZw.mjs} +11017 -863
- package/dist/{pdfForm-9gd40uz9.cjs → pdfForm-BVS_do95.cjs} +113 -102
- package/dist/pdfForm-Ca86NDWn.d.cts +897 -0
- package/dist/pdfForm-Ca86NDWn.d.cts.map +1 -0
- package/dist/pdfForm-Ca86NDWn.d.mts +897 -0
- package/dist/pdfForm-Ca86NDWn.d.mts.map +1 -0
- package/dist/{pdfForm-Cn-cVicP.mjs → pdfForm-CfLnlsj-.mjs} +23 -18
- package/dist/{pdfObjects-1veop1_d.cjs → pdfObjects-BcPlSI0a.cjs} +62 -53
- package/dist/{pdfObjects-uEsWlfzU.mjs → pdfObjects-CB7TEdbW.mjs} +12 -2
- package/dist/rolldown-runtime-ak5kbic3.cjs +18 -0
- package/dist/{src-B1iDGLCL.cjs → src-C-IDXuvi.cjs} +9886 -1421
- package/dist/{src-Db6Qknoz.mjs → src-DJaD-bJ2.mjs} +8392 -515
- package/dist/{streamDecode-Bj568Nc9.mjs → streamDecode-BamENT3k.mjs} +129 -150
- package/dist/{streamDecode-CvgErkFu.cjs → streamDecode-DcaZz309.cjs} +139 -160
- package/package.json +26 -22
- package/dist/compressionAnalysis-DGs-MqTe.d.mts.map +0 -1
- package/dist/compressionAnalysis-VtYV9Zmq.d.cts.map +0 -1
- package/dist/fflateAdapter-LTAeAhaD.cjs +0 -207
- package/dist/fflateAdapter-PSiW_ML7.mjs +0 -196
- package/dist/fieldAppearance-C8PoLFSc.d.mts.map +0 -1
- package/dist/fieldAppearance-CdiGFG5e.d.cts.map +0 -1
- package/dist/fontEmbed-BN842wlb.d.cts +0 -659
- package/dist/fontEmbed-BN842wlb.d.cts.map +0 -1
- package/dist/fontEmbed-Dgq5K89o.d.mts +0 -659
- package/dist/fontEmbed-Dgq5K89o.d.mts.map +0 -1
- package/dist/fontSubset-5SLWMmEw.cjs +0 -518
- package/dist/fontSubset-D-vQQems.mjs +0 -495
- package/dist/index-DCSbmXWh.d.mts +0 -5939
- package/dist/index-DCSbmXWh.d.mts.map +0 -1
- package/dist/index-J1W3FdL8.d.cts +0 -5939
- package/dist/index-J1W3FdL8.d.cts.map +0 -1
- package/dist/libdeflateWasm-8b91Vmia.mjs +0 -220
- package/dist/libdeflateWasm-BdiDEJOj.cjs +0 -237
- package/dist/pdfCatalog-3yMIhJtt.mjs +0 -138
- package/dist/pdfCatalog-CYy4NXEY.cjs +0 -173
- package/dist/pdfDocument-BgvEP5Po.d.mts +0 -4673
- package/dist/pdfDocument-BgvEP5Po.d.mts.map +0 -1
- package/dist/pdfDocument-CbU-2TjT.d.cts +0 -4673
- package/dist/pdfDocument-CbU-2TjT.d.cts.map +0 -1
- package/dist/pdfForm-BiyNtYem.d.mts +0 -905
- package/dist/pdfForm-BiyNtYem.d.mts.map +0 -1
- package/dist/pdfForm-SOXJ72LW.d.cts +0 -905
- package/dist/pdfForm-SOXJ72LW.d.cts.map +0 -1
- package/dist/pdfPage-B_d9HmkG.mjs +0 -8015
- package/dist/pdfPage-Cd8jOJp6.cjs +0 -8728
- package/dist/pngEmbed-BWAbEUKF.mjs +0 -552
- package/dist/pngEmbed-D4X4ZN-3.cjs +0 -563
- package/dist/rolldown-runtime-CKhH4XqG.cjs +0 -24
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { n as PdfDocument } from "./pdfDocument-
|
|
2
|
-
import { C as PdfRef, _ as PdfDict, v as PdfName, w as PdfStream } from "./pdfForm-
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
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
|
-
|
|
55
|
-
|
|
54
|
+
* Options for text extraction.
|
|
55
|
+
*/
|
|
56
56
|
interface TextExtractionOptions {
|
|
57
57
|
/**
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
* Include position information.
|
|
59
|
+
* Default: `false` for performance.
|
|
60
|
+
*/
|
|
61
61
|
withPositions?: boolean | undefined;
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
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
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
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
|
-
|
|
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:
|
|
221
|
+
readonly recommendation: "recompress" | "keep" | "downscale" | "grayscale";
|
|
222
222
|
}
|
|
223
223
|
/**
|
|
224
|
-
|
|
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
|
-
|
|
240
|
-
|
|
239
|
+
* Options for `analyzeImages()`.
|
|
240
|
+
*/
|
|
241
241
|
interface AnalyzeImagesOptions {
|
|
242
242
|
/**
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
243
|
+
* JPEG quality used for size estimation (1–100).
|
|
244
|
+
*
|
|
245
|
+
* Default: `80`.
|
|
246
|
+
*/
|
|
247
247
|
readonly quality?: number;
|
|
248
248
|
/**
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
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
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
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-
|
|
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:
|
|
2
|
-
const
|
|
3
|
-
const
|
|
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 =
|
|
9
|
+
exports.PageSizes = require_pdfDocument.PageSizes;
|
|
12
10
|
exports.PdfDocument = require_pdfDocument.PdfDocument;
|
|
13
|
-
exports.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 =
|
|
21
|
-
exports.buildPatternObjects =
|
|
22
|
-
exports.cmyk =
|
|
23
|
-
exports.colorToComponents =
|
|
24
|
-
exports.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 =
|
|
30
|
-
exports.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 =
|
|
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 =
|
|
36
|
+
exports.linearGradient = require_pdfDocument.linearGradient;
|
|
39
37
|
exports.mergePdfs = require_pdfDocument.mergePdfs;
|
|
40
38
|
exports.movePage = require_layout.movePage;
|
|
41
|
-
exports.radialGradient =
|
|
42
|
-
exports.radians =
|
|
43
|
-
exports.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 =
|
|
46
|
+
exports.rgb = require_pdfDocument.rgb;
|
|
49
47
|
exports.rotateAllPages = require_layout.rotateAllPages;
|
|
50
48
|
exports.rotatePage = require_layout.rotatePage;
|
|
51
|
-
exports.setFillingColor =
|
|
52
|
-
exports.setStrokingColor =
|
|
49
|
+
exports.setFillingColor = require_pdfDocument.setFillingColor;
|
|
50
|
+
exports.setStrokingColor = require_pdfDocument.setStrokingColor;
|
|
53
51
|
exports.splitPdf = require_pdfDocument.splitPdf;
|
|
54
|
-
exports.tilingPattern =
|
|
52
|
+
exports.tilingPattern = require_pdfDocument.tilingPattern;
|
package/dist/create.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
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 {
|
|
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-
|
|
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 {
|
|
2
|
-
import {
|
|
3
|
-
|
|
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 {
|
|
2
|
-
import { n as extractImages } from "./imageExtract-
|
|
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
|
-
|
|
100
|
+
|
|
101
|
+
//# sourceMappingURL=deduplicateImages-BTCyAPfJ.mjs.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
const require_rolldown_runtime = require(
|
|
2
|
-
const require_imageExtract = require(
|
|
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,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
99
|
+
Object.defineProperty(exports, "deduplicateImages", {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
get: function() {
|
|
102
|
+
return deduplicateImages;
|
|
103
|
+
}
|
|
106
104
|
});
|
|
107
|
-
Object.defineProperty(exports,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
Object.defineProperty(exports, "deduplicateImages_exports", {
|
|
106
|
+
enumerable: true,
|
|
107
|
+
get: function() {
|
|
108
|
+
return deduplicateImages_exports;
|
|
109
|
+
}
|
|
112
110
|
});
|
|
113
|
-
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=deduplicateImages-CaGgaqyS.cjs.map
|