@qrcommunication/gigapdf-lib 0.124.0 → 0.124.1
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 +8 -0
- package/README.md +17 -0
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/gigapdf.wasm +0 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1584,6 +1584,8 @@ interface ImageElementInfo {
|
|
|
1584
1584
|
* the placement box above is NOT intersected with it.
|
|
1585
1585
|
*/
|
|
1586
1586
|
clipBounds: [number, number, number, number] | null;
|
|
1587
|
+
/** Author-supplied alternative text from the figure structure, if present. */
|
|
1588
|
+
alt: string | null;
|
|
1587
1589
|
}
|
|
1588
1590
|
/**
|
|
1589
1591
|
* One path segment from {@link GigaPdfDoc.vectorPaths} (page user space, origin
|
|
@@ -3393,6 +3395,8 @@ declare class GigaPdfDoc {
|
|
|
3393
3395
|
* non-empty) or the call otherwise fails.
|
|
3394
3396
|
*/
|
|
3395
3397
|
setFigureAlt(index: number, alt: string): boolean;
|
|
3398
|
+
/** Set alternative text on an image by page and unified element index. */
|
|
3399
|
+
setImageAlt(page: number, index: number, alt: string): boolean;
|
|
3396
3400
|
/**
|
|
3397
3401
|
* Serialize the document encrypted with the PDF Standard Security Handler.
|
|
3398
3402
|
* Defaults to **AES-256 (R6)**. `fileId` is the document `/ID` (any stable
|
package/dist/index.d.ts
CHANGED
|
@@ -1584,6 +1584,8 @@ interface ImageElementInfo {
|
|
|
1584
1584
|
* the placement box above is NOT intersected with it.
|
|
1585
1585
|
*/
|
|
1586
1586
|
clipBounds: [number, number, number, number] | null;
|
|
1587
|
+
/** Author-supplied alternative text from the figure structure, if present. */
|
|
1588
|
+
alt: string | null;
|
|
1587
1589
|
}
|
|
1588
1590
|
/**
|
|
1589
1591
|
* One path segment from {@link GigaPdfDoc.vectorPaths} (page user space, origin
|
|
@@ -3393,6 +3395,8 @@ declare class GigaPdfDoc {
|
|
|
3393
3395
|
* non-empty) or the call otherwise fails.
|
|
3394
3396
|
*/
|
|
3395
3397
|
setFigureAlt(index: number, alt: string): boolean;
|
|
3398
|
+
/** Set alternative text on an image by page and unified element index. */
|
|
3399
|
+
setImageAlt(page: number, index: number, alt: string): boolean;
|
|
3396
3400
|
/**
|
|
3397
3401
|
* Serialize the document encrypted with the PDF Standard Security Handler.
|
|
3398
3402
|
* Defaults to **AES-256 (R6)**. `fileId` is the document `/ID` (any stable
|
package/dist/index.js
CHANGED
|
@@ -2613,6 +2613,13 @@ var GigaPdfDoc = class {
|
|
|
2613
2613
|
setFigureAlt(index, alt) {
|
|
2614
2614
|
return this.g._withStr(alt, (p, l) => this.ex().gp_set_figure_alt(this.h, index, p, l)) === 0;
|
|
2615
2615
|
}
|
|
2616
|
+
/** Set alternative text on an image by page and unified element index. */
|
|
2617
|
+
setImageAlt(page, index, alt) {
|
|
2618
|
+
return this.g._withStr(
|
|
2619
|
+
alt,
|
|
2620
|
+
(p, l) => this.ex().gp_set_image_alt(this.h, page, index, p, l)
|
|
2621
|
+
) === 0;
|
|
2622
|
+
}
|
|
2616
2623
|
// security
|
|
2617
2624
|
/**
|
|
2618
2625
|
* Serialize the document encrypted with the PDF Standard Security Handler.
|