@qrcommunication/gigapdf-lib 0.124.0 → 0.125.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 +21 -0
- package/README.md +17 -0
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -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
|
@@ -736,6 +736,8 @@ interface GigaCharStyle {
|
|
|
736
736
|
generic: GigaGeneric;
|
|
737
737
|
size_pt: number;
|
|
738
738
|
bold: boolean;
|
|
739
|
+
/** Exact CSS font weight (100–900) when the source carries more than regular/bold. */
|
|
740
|
+
font_weight?: number;
|
|
739
741
|
italic: boolean;
|
|
740
742
|
underline: boolean;
|
|
741
743
|
strike: boolean;
|
|
@@ -1340,6 +1342,8 @@ interface GigaStylePatch {
|
|
|
1340
1342
|
generic?: GigaGeneric;
|
|
1341
1343
|
size_pt?: number;
|
|
1342
1344
|
bold?: boolean;
|
|
1345
|
+
/** Exact CSS font weight; kept coherent with `bold` by the engine. */
|
|
1346
|
+
font_weight?: number;
|
|
1343
1347
|
italic?: boolean;
|
|
1344
1348
|
underline?: boolean;
|
|
1345
1349
|
strike?: boolean;
|
|
@@ -1584,6 +1588,8 @@ interface ImageElementInfo {
|
|
|
1584
1588
|
* the placement box above is NOT intersected with it.
|
|
1585
1589
|
*/
|
|
1586
1590
|
clipBounds: [number, number, number, number] | null;
|
|
1591
|
+
/** Author-supplied alternative text from the figure structure, if present. */
|
|
1592
|
+
alt: string | null;
|
|
1587
1593
|
}
|
|
1588
1594
|
/**
|
|
1589
1595
|
* One path segment from {@link GigaPdfDoc.vectorPaths} (page user space, origin
|
|
@@ -3393,6 +3399,8 @@ declare class GigaPdfDoc {
|
|
|
3393
3399
|
* non-empty) or the call otherwise fails.
|
|
3394
3400
|
*/
|
|
3395
3401
|
setFigureAlt(index: number, alt: string): boolean;
|
|
3402
|
+
/** Set alternative text on an image by page and unified element index. */
|
|
3403
|
+
setImageAlt(page: number, index: number, alt: string): boolean;
|
|
3396
3404
|
/**
|
|
3397
3405
|
* Serialize the document encrypted with the PDF Standard Security Handler.
|
|
3398
3406
|
* Defaults to **AES-256 (R6)**. `fileId` is the document `/ID` (any stable
|
package/dist/index.d.ts
CHANGED
|
@@ -736,6 +736,8 @@ interface GigaCharStyle {
|
|
|
736
736
|
generic: GigaGeneric;
|
|
737
737
|
size_pt: number;
|
|
738
738
|
bold: boolean;
|
|
739
|
+
/** Exact CSS font weight (100–900) when the source carries more than regular/bold. */
|
|
740
|
+
font_weight?: number;
|
|
739
741
|
italic: boolean;
|
|
740
742
|
underline: boolean;
|
|
741
743
|
strike: boolean;
|
|
@@ -1340,6 +1342,8 @@ interface GigaStylePatch {
|
|
|
1340
1342
|
generic?: GigaGeneric;
|
|
1341
1343
|
size_pt?: number;
|
|
1342
1344
|
bold?: boolean;
|
|
1345
|
+
/** Exact CSS font weight; kept coherent with `bold` by the engine. */
|
|
1346
|
+
font_weight?: number;
|
|
1343
1347
|
italic?: boolean;
|
|
1344
1348
|
underline?: boolean;
|
|
1345
1349
|
strike?: boolean;
|
|
@@ -1584,6 +1588,8 @@ interface ImageElementInfo {
|
|
|
1584
1588
|
* the placement box above is NOT intersected with it.
|
|
1585
1589
|
*/
|
|
1586
1590
|
clipBounds: [number, number, number, number] | null;
|
|
1591
|
+
/** Author-supplied alternative text from the figure structure, if present. */
|
|
1592
|
+
alt: string | null;
|
|
1587
1593
|
}
|
|
1588
1594
|
/**
|
|
1589
1595
|
* One path segment from {@link GigaPdfDoc.vectorPaths} (page user space, origin
|
|
@@ -3393,6 +3399,8 @@ declare class GigaPdfDoc {
|
|
|
3393
3399
|
* non-empty) or the call otherwise fails.
|
|
3394
3400
|
*/
|
|
3395
3401
|
setFigureAlt(index: number, alt: string): boolean;
|
|
3402
|
+
/** Set alternative text on an image by page and unified element index. */
|
|
3403
|
+
setImageAlt(page: number, index: number, alt: string): boolean;
|
|
3396
3404
|
/**
|
|
3397
3405
|
* Serialize the document encrypted with the PDF Standard Security Handler.
|
|
3398
3406
|
* 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.
|