@qrcommunication/gigapdf-lib 0.108.0 → 0.109.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/CHANGELOG.md +19 -0
- package/dist/index.cjs +11 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -8
- package/dist/index.d.ts +11 -8
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/gigapdf.wasm +0 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -193,11 +193,12 @@ declare class GigaPdfEngine {
|
|
|
193
193
|
*/
|
|
194
194
|
officeToPdfWith(office: Uint8Array, fonts?: HtmlFont[]): Uint8Array;
|
|
195
195
|
/**
|
|
196
|
-
* Image (PNG/JPEG/GIF/WebP/AVIF) → one-page PDF, format auto-detected:
|
|
197
|
-
* image is centred and scaled to fit on an A4 portrait page. PNG/JPEG
|
|
198
|
-
* directly; GIF/WebP/AVIF are transcoded to PNG first — all in pure
|
|
199
|
-
* no third-party image library. Empty array if the bytes are not a
|
|
200
|
-
* image. To combine many images into a single document, pipe each
|
|
196
|
+
* Image (PNG/JPEG/GIF/WebP/AVIF/TIFF) → one-page PDF, format auto-detected:
|
|
197
|
+
* the image is centred and scaled to fit on an A4 portrait page. PNG/JPEG
|
|
198
|
+
* embed directly; GIF/WebP/AVIF/TIFF are transcoded to PNG first — all in pure
|
|
199
|
+
* Rust/WASM, no third-party image library. Empty array if the bytes are not a
|
|
200
|
+
* recognized image. To combine many images into a single document, pipe each
|
|
201
|
+
* result
|
|
201
202
|
* through {@link mergePdfs}.
|
|
202
203
|
*/
|
|
203
204
|
imageToPdf(image: Uint8Array): Uint8Array;
|
|
@@ -2304,8 +2305,10 @@ declare class GigaPdfDoc {
|
|
|
2304
2305
|
*/
|
|
2305
2306
|
addPath(page: number, svgPath: string, ox: number, oy: number, stroke?: number | null, fill?: number | null, lineWidth?: number, opacity?: number): boolean;
|
|
2306
2307
|
/**
|
|
2307
|
-
* Embed a raster image
|
|
2308
|
-
*
|
|
2308
|
+
* Embed a raster image at `(x,y)` sized `(w,h)` in PDF user space. Format
|
|
2309
|
+
* auto-detected: **PNG, JPEG, GIF, WebP, AVIF, TIFF** (non-PNG/JPEG decoded to
|
|
2310
|
+
* RGBA in pure Rust/WASM). PNG alpha is honoured; `opacity` (0..1) sets an
|
|
2311
|
+
* overall alpha.
|
|
2309
2312
|
*/
|
|
2310
2313
|
addImage(page: number, data: Uint8Array, x: number, y: number, w: number, h: number, opacity?: number): boolean;
|
|
2311
2314
|
/**
|
|
@@ -2329,7 +2332,7 @@ declare class GigaPdfDoc {
|
|
|
2329
2332
|
replaceImage(page: number, index: number, data: Uint8Array): boolean;
|
|
2330
2333
|
/**
|
|
2331
2334
|
* Stamp an **image watermark** across pages from raw image bytes. Accepts the
|
|
2332
|
-
*
|
|
2335
|
+
* formats the engine decodes — **PNG, JPEG, WebP, GIF, AVIF, TIFF**. The
|
|
2333
2336
|
* image is embedded **once** and referenced on every target page.
|
|
2334
2337
|
*
|
|
2335
2338
|
* `opts.pages` is a list of 1-based page numbers; omit it (or pass `[]`) to
|
package/dist/index.d.ts
CHANGED
|
@@ -193,11 +193,12 @@ declare class GigaPdfEngine {
|
|
|
193
193
|
*/
|
|
194
194
|
officeToPdfWith(office: Uint8Array, fonts?: HtmlFont[]): Uint8Array;
|
|
195
195
|
/**
|
|
196
|
-
* Image (PNG/JPEG/GIF/WebP/AVIF) → one-page PDF, format auto-detected:
|
|
197
|
-
* image is centred and scaled to fit on an A4 portrait page. PNG/JPEG
|
|
198
|
-
* directly; GIF/WebP/AVIF are transcoded to PNG first — all in pure
|
|
199
|
-
* no third-party image library. Empty array if the bytes are not a
|
|
200
|
-
* image. To combine many images into a single document, pipe each
|
|
196
|
+
* Image (PNG/JPEG/GIF/WebP/AVIF/TIFF) → one-page PDF, format auto-detected:
|
|
197
|
+
* the image is centred and scaled to fit on an A4 portrait page. PNG/JPEG
|
|
198
|
+
* embed directly; GIF/WebP/AVIF/TIFF are transcoded to PNG first — all in pure
|
|
199
|
+
* Rust/WASM, no third-party image library. Empty array if the bytes are not a
|
|
200
|
+
* recognized image. To combine many images into a single document, pipe each
|
|
201
|
+
* result
|
|
201
202
|
* through {@link mergePdfs}.
|
|
202
203
|
*/
|
|
203
204
|
imageToPdf(image: Uint8Array): Uint8Array;
|
|
@@ -2304,8 +2305,10 @@ declare class GigaPdfDoc {
|
|
|
2304
2305
|
*/
|
|
2305
2306
|
addPath(page: number, svgPath: string, ox: number, oy: number, stroke?: number | null, fill?: number | null, lineWidth?: number, opacity?: number): boolean;
|
|
2306
2307
|
/**
|
|
2307
|
-
* Embed a raster image
|
|
2308
|
-
*
|
|
2308
|
+
* Embed a raster image at `(x,y)` sized `(w,h)` in PDF user space. Format
|
|
2309
|
+
* auto-detected: **PNG, JPEG, GIF, WebP, AVIF, TIFF** (non-PNG/JPEG decoded to
|
|
2310
|
+
* RGBA in pure Rust/WASM). PNG alpha is honoured; `opacity` (0..1) sets an
|
|
2311
|
+
* overall alpha.
|
|
2309
2312
|
*/
|
|
2310
2313
|
addImage(page: number, data: Uint8Array, x: number, y: number, w: number, h: number, opacity?: number): boolean;
|
|
2311
2314
|
/**
|
|
@@ -2329,7 +2332,7 @@ declare class GigaPdfDoc {
|
|
|
2329
2332
|
replaceImage(page: number, index: number, data: Uint8Array): boolean;
|
|
2330
2333
|
/**
|
|
2331
2334
|
* Stamp an **image watermark** across pages from raw image bytes. Accepts the
|
|
2332
|
-
*
|
|
2335
|
+
* formats the engine decodes — **PNG, JPEG, WebP, GIF, AVIF, TIFF**. The
|
|
2333
2336
|
* image is embedded **once** and referenced on every target page.
|
|
2334
2337
|
*
|
|
2335
2338
|
* `opts.pages` is a list of 1-based page numbers; omit it (or pass `[]`) to
|
package/dist/index.js
CHANGED
|
@@ -368,11 +368,12 @@ var GigaPdfEngine = class _GigaPdfEngine {
|
|
|
368
368
|
);
|
|
369
369
|
}
|
|
370
370
|
/**
|
|
371
|
-
* Image (PNG/JPEG/GIF/WebP/AVIF) → one-page PDF, format auto-detected:
|
|
372
|
-
* image is centred and scaled to fit on an A4 portrait page. PNG/JPEG
|
|
373
|
-
* directly; GIF/WebP/AVIF are transcoded to PNG first — all in pure
|
|
374
|
-
* no third-party image library. Empty array if the bytes are not a
|
|
375
|
-
* image. To combine many images into a single document, pipe each
|
|
371
|
+
* Image (PNG/JPEG/GIF/WebP/AVIF/TIFF) → one-page PDF, format auto-detected:
|
|
372
|
+
* the image is centred and scaled to fit on an A4 portrait page. PNG/JPEG
|
|
373
|
+
* embed directly; GIF/WebP/AVIF/TIFF are transcoded to PNG first — all in pure
|
|
374
|
+
* Rust/WASM, no third-party image library. Empty array if the bytes are not a
|
|
375
|
+
* recognized image. To combine many images into a single document, pipe each
|
|
376
|
+
* result
|
|
376
377
|
* through {@link mergePdfs}.
|
|
377
378
|
*/
|
|
378
379
|
imageToPdf(image) {
|
|
@@ -1599,8 +1600,10 @@ var GigaPdfDoc = class {
|
|
|
1599
1600
|
) === 0;
|
|
1600
1601
|
}
|
|
1601
1602
|
/**
|
|
1602
|
-
* Embed a raster image
|
|
1603
|
-
*
|
|
1603
|
+
* Embed a raster image at `(x,y)` sized `(w,h)` in PDF user space. Format
|
|
1604
|
+
* auto-detected: **PNG, JPEG, GIF, WebP, AVIF, TIFF** (non-PNG/JPEG decoded to
|
|
1605
|
+
* RGBA in pure Rust/WASM). PNG alpha is honoured; `opacity` (0..1) sets an
|
|
1606
|
+
* overall alpha.
|
|
1604
1607
|
*/
|
|
1605
1608
|
addImage(page, data, x, y, w, h, opacity = 1) {
|
|
1606
1609
|
return this.g._withBytes(
|
|
@@ -1631,7 +1634,7 @@ var GigaPdfDoc = class {
|
|
|
1631
1634
|
}
|
|
1632
1635
|
/**
|
|
1633
1636
|
* Stamp an **image watermark** across pages from raw image bytes. Accepts the
|
|
1634
|
-
*
|
|
1637
|
+
* formats the engine decodes — **PNG, JPEG, WebP, GIF, AVIF, TIFF**. The
|
|
1635
1638
|
* image is embedded **once** and referenced on every target page.
|
|
1636
1639
|
*
|
|
1637
1640
|
* `opts.pages` is a list of 1-based page numbers; omit it (or pass `[]`) to
|