@docmentis/udoc-viewer 0.6.21 → 0.6.23

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 (142) hide show
  1. package/dist/package.json +1 -1
  2. package/dist/src/UDocClient.d.ts +22 -0
  3. package/dist/src/UDocClient.d.ts.map +1 -1
  4. package/dist/src/UDocClient.js +25 -1
  5. package/dist/src/UDocClient.js.map +1 -1
  6. package/dist/src/UDocViewer.d.ts +4 -3
  7. package/dist/src/UDocViewer.d.ts.map +1 -1
  8. package/dist/src/UDocViewer.js +50 -3
  9. package/dist/src/UDocViewer.js.map +1 -1
  10. package/dist/src/ui/viewer/actions.d.ts +34 -3
  11. package/dist/src/ui/viewer/actions.d.ts.map +1 -1
  12. package/dist/src/ui/viewer/annotation/ShapeRenderer.d.ts.map +1 -1
  13. package/dist/src/ui/viewer/annotation/ShapeRenderer.js +23 -16
  14. package/dist/src/ui/viewer/annotation/ShapeRenderer.js.map +1 -1
  15. package/dist/src/ui/viewer/annotation/index.d.ts +1 -1
  16. package/dist/src/ui/viewer/annotation/index.d.ts.map +1 -1
  17. package/dist/src/ui/viewer/annotation/index.js +1 -1
  18. package/dist/src/ui/viewer/annotation/index.js.map +1 -1
  19. package/dist/src/ui/viewer/annotation/render.d.ts.map +1 -1
  20. package/dist/src/ui/viewer/annotation/render.js +11 -4
  21. package/dist/src/ui/viewer/annotation/render.js.map +1 -1
  22. package/dist/src/ui/viewer/annotation/types.d.ts +9 -1
  23. package/dist/src/ui/viewer/annotation/types.d.ts.map +1 -1
  24. package/dist/src/ui/viewer/annotation/utils.d.ts +10 -1
  25. package/dist/src/ui/viewer/annotation/utils.d.ts.map +1 -1
  26. package/dist/src/ui/viewer/annotation/utils.js +114 -0
  27. package/dist/src/ui/viewer/annotation/utils.js.map +1 -1
  28. package/dist/src/ui/viewer/components/ColorSelect.d.ts +26 -0
  29. package/dist/src/ui/viewer/components/ColorSelect.d.ts.map +1 -0
  30. package/dist/src/ui/viewer/components/ColorSelect.js +120 -0
  31. package/dist/src/ui/viewer/components/ColorSelect.js.map +1 -0
  32. package/dist/src/ui/viewer/components/FloatingToolbar.js +12 -12
  33. package/dist/src/ui/viewer/components/FloatingToolbar.js.map +1 -1
  34. package/dist/src/ui/viewer/components/NumberInput.d.ts +32 -0
  35. package/dist/src/ui/viewer/components/NumberInput.d.ts.map +1 -0
  36. package/dist/src/ui/viewer/components/NumberInput.js +101 -0
  37. package/dist/src/ui/viewer/components/NumberInput.js.map +1 -0
  38. package/dist/src/ui/viewer/components/Spread.d.ts +2 -2
  39. package/dist/src/ui/viewer/components/Spread.d.ts.map +1 -1
  40. package/dist/src/ui/viewer/components/Spread.js.map +1 -1
  41. package/dist/src/ui/viewer/components/SubToolbar.d.ts +10 -0
  42. package/dist/src/ui/viewer/components/SubToolbar.d.ts.map +1 -0
  43. package/dist/src/ui/viewer/components/SubToolbar.js +481 -0
  44. package/dist/src/ui/viewer/components/SubToolbar.js.map +1 -0
  45. package/dist/src/ui/viewer/components/Toolbar.d.ts.map +1 -1
  46. package/dist/src/ui/viewer/components/Toolbar.js +147 -4
  47. package/dist/src/ui/viewer/components/Toolbar.js.map +1 -1
  48. package/dist/src/ui/viewer/components/ViewModeMenu.js +3 -3
  49. package/dist/src/ui/viewer/components/ViewModeMenu.js.map +1 -1
  50. package/dist/src/ui/viewer/components/Viewport.d.ts.map +1 -1
  51. package/dist/src/ui/viewer/components/Viewport.js +40 -2
  52. package/dist/src/ui/viewer/components/Viewport.js.map +1 -1
  53. package/dist/src/ui/viewer/i18n/ar.d.ts.map +1 -1
  54. package/dist/src/ui/viewer/i18n/ar.js +40 -0
  55. package/dist/src/ui/viewer/i18n/ar.js.map +1 -1
  56. package/dist/src/ui/viewer/i18n/de.d.ts.map +1 -1
  57. package/dist/src/ui/viewer/i18n/de.js +40 -0
  58. package/dist/src/ui/viewer/i18n/de.js.map +1 -1
  59. package/dist/src/ui/viewer/i18n/en.d.ts.map +1 -1
  60. package/dist/src/ui/viewer/i18n/en.js +40 -0
  61. package/dist/src/ui/viewer/i18n/en.js.map +1 -1
  62. package/dist/src/ui/viewer/i18n/es.d.ts.map +1 -1
  63. package/dist/src/ui/viewer/i18n/es.js +40 -0
  64. package/dist/src/ui/viewer/i18n/es.js.map +1 -1
  65. package/dist/src/ui/viewer/i18n/fr.d.ts.map +1 -1
  66. package/dist/src/ui/viewer/i18n/fr.js +40 -0
  67. package/dist/src/ui/viewer/i18n/fr.js.map +1 -1
  68. package/dist/src/ui/viewer/i18n/ja.d.ts.map +1 -1
  69. package/dist/src/ui/viewer/i18n/ja.js +40 -0
  70. package/dist/src/ui/viewer/i18n/ja.js.map +1 -1
  71. package/dist/src/ui/viewer/i18n/ko.d.ts.map +1 -1
  72. package/dist/src/ui/viewer/i18n/ko.js +40 -0
  73. package/dist/src/ui/viewer/i18n/ko.js.map +1 -1
  74. package/dist/src/ui/viewer/i18n/pt-BR.d.ts.map +1 -1
  75. package/dist/src/ui/viewer/i18n/pt-BR.js +40 -0
  76. package/dist/src/ui/viewer/i18n/pt-BR.js.map +1 -1
  77. package/dist/src/ui/viewer/i18n/ru.d.ts.map +1 -1
  78. package/dist/src/ui/viewer/i18n/ru.js +40 -0
  79. package/dist/src/ui/viewer/i18n/ru.js.map +1 -1
  80. package/dist/src/ui/viewer/i18n/types.d.ts +35 -0
  81. package/dist/src/ui/viewer/i18n/types.d.ts.map +1 -1
  82. package/dist/src/ui/viewer/i18n/zh-CN.d.ts.map +1 -1
  83. package/dist/src/ui/viewer/i18n/zh-CN.js +40 -0
  84. package/dist/src/ui/viewer/i18n/zh-CN.js.map +1 -1
  85. package/dist/src/ui/viewer/i18n/zh-TW.d.ts.map +1 -1
  86. package/dist/src/ui/viewer/i18n/zh-TW.js +40 -0
  87. package/dist/src/ui/viewer/i18n/zh-TW.js.map +1 -1
  88. package/dist/src/ui/viewer/icons.d.ts +29 -0
  89. package/dist/src/ui/viewer/icons.d.ts.map +1 -1
  90. package/dist/src/ui/viewer/icons.js +42 -0
  91. package/dist/src/ui/viewer/icons.js.map +1 -1
  92. package/dist/src/ui/viewer/reducer.d.ts.map +1 -1
  93. package/dist/src/ui/viewer/reducer.js +109 -1
  94. package/dist/src/ui/viewer/reducer.js.map +1 -1
  95. package/dist/src/ui/viewer/search/search.d.ts +4 -4
  96. package/dist/src/ui/viewer/search/search.d.ts.map +1 -1
  97. package/dist/src/ui/viewer/search/search.js +1 -1
  98. package/dist/src/ui/viewer/search/search.js.map +1 -1
  99. package/dist/src/ui/viewer/shell.d.ts +2 -2
  100. package/dist/src/ui/viewer/shell.d.ts.map +1 -1
  101. package/dist/src/ui/viewer/shell.js +13 -2
  102. package/dist/src/ui/viewer/shell.js.map +1 -1
  103. package/dist/src/ui/viewer/state.d.ts +55 -2
  104. package/dist/src/ui/viewer/state.d.ts.map +1 -1
  105. package/dist/src/ui/viewer/state.js +30 -0
  106. package/dist/src/ui/viewer/state.js.map +1 -1
  107. package/dist/src/ui/viewer/styles-inline.d.ts +1 -1
  108. package/dist/src/ui/viewer/styles-inline.d.ts.map +1 -1
  109. package/dist/src/ui/viewer/styles-inline.js +875 -246
  110. package/dist/src/ui/viewer/styles-inline.js.map +1 -1
  111. package/dist/src/ui/viewer/text/render.d.ts +3 -3
  112. package/dist/src/ui/viewer/text/render.d.ts.map +1 -1
  113. package/dist/src/ui/viewer/text/render.js +2 -2
  114. package/dist/src/ui/viewer/text/render.js.map +1 -1
  115. package/dist/src/ui/viewer/tools/AnnotationDrawController.d.ts +21 -0
  116. package/dist/src/ui/viewer/tools/AnnotationDrawController.d.ts.map +1 -0
  117. package/dist/src/ui/viewer/tools/AnnotationDrawController.js +392 -0
  118. package/dist/src/ui/viewer/tools/AnnotationDrawController.js.map +1 -0
  119. package/dist/src/ui/viewer/tools/AnnotationSelectController.d.ts +22 -0
  120. package/dist/src/ui/viewer/tools/AnnotationSelectController.d.ts.map +1 -0
  121. package/dist/src/ui/viewer/tools/AnnotationSelectController.js +367 -0
  122. package/dist/src/ui/viewer/tools/AnnotationSelectController.js.map +1 -0
  123. package/dist/src/ui/viewer/tools/ViewToolController.d.ts +20 -0
  124. package/dist/src/ui/viewer/tools/ViewToolController.d.ts.map +1 -0
  125. package/dist/src/ui/viewer/tools/ViewToolController.js +194 -0
  126. package/dist/src/ui/viewer/tools/ViewToolController.js.map +1 -0
  127. package/dist/src/wasm/udoc.d.ts +399 -114
  128. package/dist/src/wasm/udoc.js +157 -81
  129. package/dist/src/wasm/udoc_bg.wasm +0 -0
  130. package/dist/src/wasm/udoc_bg.wasm.d.ts +8 -7
  131. package/dist/src/worker/WorkerClient.d.ts +17 -11
  132. package/dist/src/worker/WorkerClient.d.ts.map +1 -1
  133. package/dist/src/worker/WorkerClient.js +10 -2
  134. package/dist/src/worker/WorkerClient.js.map +1 -1
  135. package/dist/src/worker/index.d.ts +1 -1
  136. package/dist/src/worker/index.d.ts.map +1 -1
  137. package/dist/src/worker/worker-inline.js +1 -1
  138. package/dist/src/worker/worker.d.ts +26 -58
  139. package/dist/src/worker/worker.d.ts.map +1 -1
  140. package/dist/src/worker/worker.js +161 -80
  141. package/dist/src/worker/worker.js.map +1 -1
  142. package/package.json +1 -1
@@ -187,6 +187,16 @@ function passArray8ToWasm0(arg, malloc) {
187
187
  return ptr;
188
188
  }
189
189
 
190
+ function passArrayJsValueToWasm0(array, malloc) {
191
+ const ptr = malloc(array.length * 4, 4) >>> 0;
192
+ const mem = getDataViewMemory0();
193
+ for (let i = 0; i < array.length; i++) {
194
+ mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
195
+ }
196
+ WASM_VECTOR_LEN = array.length;
197
+ return ptr;
198
+ }
199
+
190
200
  function passStringToWasm0(arg, malloc, realloc) {
191
201
  if (realloc === undefined) {
192
202
  const buf = cachedTextEncoder.encode(arg);
@@ -259,12 +269,12 @@ if (!('encodeInto' in cachedTextEncoder)) {
259
269
 
260
270
  let WASM_VECTOR_LEN = 0;
261
271
 
262
- function __wasm_bindgen_func_elem_2710(arg0, arg1, arg2) {
263
- wasm.__wasm_bindgen_func_elem_2710(arg0, arg1, addHeapObject(arg2));
272
+ function __wasm_bindgen_func_elem_4165(arg0, arg1, arg2) {
273
+ wasm.__wasm_bindgen_func_elem_4165(arg0, arg1, addHeapObject(arg2));
264
274
  }
265
275
 
266
- function __wasm_bindgen_func_elem_20199(arg0, arg1, arg2, arg3) {
267
- wasm.__wasm_bindgen_func_elem_20199(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
276
+ function __wasm_bindgen_func_elem_22334(arg0, arg1, arg2, arg3) {
277
+ wasm.__wasm_bindgen_func_elem_22334(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
268
278
  }
269
279
 
270
280
  const __wbindgen_enum_GpuBufferBindingType = ["uniform", "storage", "read-only-storage"];
@@ -379,7 +389,7 @@ export class Wasm {
379
389
  *
380
390
  * Returns an empty array if the document has no outline.
381
391
  * @param {string} id
382
- * @returns {any}
392
+ * @returns {JsOutlineItem[]}
383
393
  */
384
394
  get_outline(id) {
385
395
  try {
@@ -390,10 +400,13 @@ export class Wasm {
390
400
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
391
401
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
392
402
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
393
- if (r2) {
394
- throw takeObject(r1);
403
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
404
+ if (r3) {
405
+ throw takeObject(r2);
395
406
  }
396
- return takeObject(r0);
407
+ var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
408
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
409
+ return v2;
397
410
  } finally {
398
411
  wasm.__wbindgen_add_to_stack_pointer(16);
399
412
  }
@@ -434,21 +447,26 @@ export class Wasm {
434
447
  *
435
448
  * # Returns
436
449
  * Array of IDs for the newly created documents (one per composition).
437
- * @param {any} compositions
438
- * @param {any} doc_ids
439
- * @returns {any}
450
+ * @param {JsCompositions} compositions
451
+ * @param {string[]} doc_ids
452
+ * @returns {string[]}
440
453
  */
441
454
  pdf_compose(compositions, doc_ids) {
442
455
  try {
443
456
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
444
- wasm.wasm_pdf_compose(retptr, this.__wbg_ptr, addHeapObject(compositions), addHeapObject(doc_ids));
457
+ const ptr0 = passArrayJsValueToWasm0(doc_ids, wasm.__wbindgen_export);
458
+ const len0 = WASM_VECTOR_LEN;
459
+ wasm.wasm_pdf_compose(retptr, this.__wbg_ptr, addHeapObject(compositions), ptr0, len0);
445
460
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
446
461
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
447
462
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
448
- if (r2) {
449
- throw takeObject(r1);
463
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
464
+ if (r3) {
465
+ throw takeObject(r2);
450
466
  }
451
- return takeObject(r0);
467
+ var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
468
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
469
+ return v2;
452
470
  } finally {
453
471
  wasm.__wbindgen_add_to_stack_pointer(16);
454
472
  }
@@ -462,24 +480,13 @@ export class Wasm {
462
480
  * # Returns
463
481
  * License validation result as JSON.
464
482
  * @param {string} license_key
465
- * @returns {any}
483
+ * @returns {LicenseResult}
466
484
  */
467
485
  set_license(license_key) {
468
- try {
469
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
470
- const ptr0 = passStringToWasm0(license_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
471
- const len0 = WASM_VECTOR_LEN;
472
- wasm.wasm_set_license(retptr, this.__wbg_ptr, ptr0, len0);
473
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
474
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
475
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
476
- if (r2) {
477
- throw takeObject(r1);
478
- }
479
- return takeObject(r0);
480
- } finally {
481
- wasm.__wbindgen_add_to_stack_pointer(16);
482
- }
486
+ const ptr0 = passStringToWasm0(license_key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
487
+ const len0 = WASM_VECTOR_LEN;
488
+ const ret = wasm.wasm_set_license(this.__wbg_ptr, ptr0, len0);
489
+ return takeObject(ret);
483
490
  }
484
491
  /**
485
492
  * Authenticate with a password to unlock an encrypted document.
@@ -584,7 +591,7 @@ export class Wasm {
584
591
  * Returns an array of `PageInfo` objects, one per page.
585
592
  * More efficient than calling `page_info` for each page.
586
593
  * @param {string} id
587
- * @returns {PageInfo[]}
594
+ * @returns {JsPageInfo[]}
588
595
  */
589
596
  all_page_info(id) {
590
597
  try {
@@ -595,10 +602,13 @@ export class Wasm {
595
602
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
596
603
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
597
604
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
598
- if (r2) {
599
- throw takeObject(r1);
605
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
606
+ if (r3) {
607
+ throw takeObject(r2);
600
608
  }
601
- return takeObject(r0);
609
+ var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
610
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
611
+ return v2;
602
612
  } finally {
603
613
  wasm.__wbindgen_add_to_stack_pointer(16);
604
614
  }
@@ -627,7 +637,7 @@ export class Wasm {
627
637
  * # Returns
628
638
  * `FontUsageEntry[]` — see TypeScript types for shape.
629
639
  * @param {string} id
630
- * @returns {any}
640
+ * @returns {JsFontUsageEntry[]}
631
641
  */
632
642
  get_font_usage(id) {
633
643
  try {
@@ -638,32 +648,24 @@ export class Wasm {
638
648
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
639
649
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
640
650
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
641
- if (r2) {
642
- throw takeObject(r1);
651
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
652
+ if (r3) {
653
+ throw takeObject(r2);
643
654
  }
644
- return takeObject(r0);
655
+ var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
656
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
657
+ return v2;
645
658
  } finally {
646
659
  wasm.__wbindgen_add_to_stack_pointer(16);
647
660
  }
648
661
  }
649
662
  /**
650
663
  * Get current license status.
651
- * @returns {any}
664
+ * @returns {LicenseResult}
652
665
  */
653
666
  license_status() {
654
- try {
655
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
656
- wasm.wasm_license_status(retptr, this.__wbg_ptr);
657
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
658
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
659
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
660
- if (r2) {
661
- throw takeObject(r1);
662
- }
663
- return takeObject(r0);
664
- } finally {
665
- wasm.__wbindgen_add_to_stack_pointer(16);
666
- }
667
+ const ret = wasm.wasm_license_status(this.__wbg_ptr);
668
+ return takeObject(ret);
667
669
  }
668
670
  /**
669
671
  * Check if a document requires a password to open.
@@ -750,12 +752,14 @@ export class Wasm {
750
752
  * const docId = udoc.loadPptx(pptxBytes);
751
753
  * const pixels = udoc.renderPageToRgba(docId, 0, 800, 600);
752
754
  * ```
753
- * @param {any} fonts
755
+ * @param {JsFontRegistration[]} fonts
754
756
  */
755
757
  registerFonts(fonts) {
756
758
  try {
757
759
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
758
- wasm.wasm_registerFonts(retptr, this.__wbg_ptr, addHeapObject(fonts));
760
+ const ptr0 = passArrayJsValueToWasm0(fonts, wasm.__wbindgen_export);
761
+ const len0 = WASM_VECTOR_LEN;
762
+ wasm.wasm_registerFonts(retptr, this.__wbg_ptr, ptr0, len0);
759
763
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
760
764
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
761
765
  if (r1) {
@@ -905,7 +909,7 @@ export class Wasm {
905
909
  * - `extension`: File extension (ttf, cff, t1, etc.)
906
910
  * - `data`: Raw font data as Uint8Array
907
911
  * @param {string} doc_id
908
- * @returns {any}
912
+ * @returns {JsExtractedFont[]}
909
913
  */
910
914
  pdf_extract_fonts(doc_id) {
911
915
  try {
@@ -916,10 +920,13 @@ export class Wasm {
916
920
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
917
921
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
918
922
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
919
- if (r2) {
920
- throw takeObject(r1);
923
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
924
+ if (r3) {
925
+ throw takeObject(r2);
921
926
  }
922
- return takeObject(r0);
927
+ var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
928
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
929
+ return v2;
923
930
  } finally {
924
931
  wasm.__wbindgen_add_to_stack_pointer(16);
925
932
  }
@@ -940,7 +947,7 @@ export class Wasm {
940
947
  * - `data`: Raw image data as Uint8Array
941
948
  * @param {string} doc_id
942
949
  * @param {boolean} convert_raw_to_png
943
- * @returns {any}
950
+ * @returns {JsExtractedImage[]}
944
951
  */
945
952
  pdf_extract_images(doc_id, convert_raw_to_png) {
946
953
  try {
@@ -951,10 +958,13 @@ export class Wasm {
951
958
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
952
959
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
953
960
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
954
- if (r2) {
955
- throw takeObject(r1);
961
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
962
+ if (r3) {
963
+ throw takeObject(r2);
956
964
  }
957
- return takeObject(r0);
965
+ var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
966
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
967
+ return v2;
958
968
  } finally {
959
969
  wasm.__wbindgen_add_to_stack_pointer(16);
960
970
  }
@@ -1046,7 +1056,7 @@ export class Wasm {
1046
1056
  *
1047
1057
  * Returns an object mapping page indices (as strings) to arrays of annotations.
1048
1058
  * @param {string} id
1049
- * @returns {any}
1059
+ * @returns {JsAnnotationsByPage}
1050
1060
  */
1051
1061
  get_all_annotations(id) {
1052
1062
  try {
@@ -1112,7 +1122,7 @@ export class Wasm {
1112
1122
  * Uses per-page loading for efficiency (only loads the requested page).
1113
1123
  * @param {string} id
1114
1124
  * @param {number} page_index
1115
- * @returns {any}
1125
+ * @returns {JsAnnotation[]}
1116
1126
  */
1117
1127
  get_page_annotations(id, page_index) {
1118
1128
  try {
@@ -1123,10 +1133,59 @@ export class Wasm {
1123
1133
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1124
1134
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1125
1135
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1126
- if (r2) {
1127
- throw takeObject(r1);
1136
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1137
+ if (r3) {
1138
+ throw takeObject(r2);
1128
1139
  }
1129
- return takeObject(r0);
1140
+ var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
1141
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
1142
+ return v2;
1143
+ } finally {
1144
+ wasm.__wbindgen_add_to_stack_pointer(16);
1145
+ }
1146
+ }
1147
+ /**
1148
+ * Save annotations back to a PDF document.
1149
+ *
1150
+ * Takes the current document and a set of annotations (grouped by page),
1151
+ * writes them into the PDF's annotation structures, and returns the
1152
+ * modified PDF bytes.
1153
+ *
1154
+ * # Arguments
1155
+ * * `doc_id` - Document ID
1156
+ * * `annotations_by_page` - Object mapping page indices (as strings) to
1157
+ * arrays of annotation objects. Same schema as returned by
1158
+ * `get_all_annotations`.
1159
+ *
1160
+ * # Returns
1161
+ * The modified PDF file bytes with annotations saved.
1162
+ *
1163
+ * # Example (JavaScript)
1164
+ * ```js
1165
+ * const annotations = udoc.get_all_annotations(docId);
1166
+ * // ... viewer edits annotations ...
1167
+ * const pdfBytes = udoc.pdf_save_annotations(docId, annotations);
1168
+ * ```
1169
+ * @param {string} doc_id
1170
+ * @param {JsAnnotationsByPage} annotations_by_page
1171
+ * @returns {Uint8Array}
1172
+ */
1173
+ pdf_save_annotations(doc_id, annotations_by_page) {
1174
+ try {
1175
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1176
+ const ptr0 = passStringToWasm0(doc_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1177
+ const len0 = WASM_VECTOR_LEN;
1178
+ wasm.wasm_pdf_save_annotations(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(annotations_by_page));
1179
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1180
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1181
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1182
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1183
+ if (r3) {
1184
+ throw takeObject(r2);
1185
+ }
1186
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
1187
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1188
+ return v2;
1130
1189
  } finally {
1131
1190
  wasm.__wbindgen_add_to_stack_pointer(16);
1132
1191
  }
@@ -1148,7 +1207,7 @@ export class Wasm {
1148
1207
  * @param {string} doc_id
1149
1208
  * @param {number} max_level
1150
1209
  * @param {boolean} split_mid_page
1151
- * @returns {any}
1210
+ * @returns {JsSplitByOutlineResult}
1152
1211
  */
1153
1212
  pdf_split_by_outline(doc_id, max_level, split_mid_page) {
1154
1213
  try {
@@ -1177,7 +1236,7 @@ export class Wasm {
1177
1236
  *
1178
1237
  * Returns an empty array for documents without visibility groups.
1179
1238
  * @param {string} id
1180
- * @returns {any}
1239
+ * @returns {JsVisibilityGroup[]}
1181
1240
  */
1182
1241
  get_visibility_groups(id) {
1183
1242
  try {
@@ -1188,10 +1247,13 @@ export class Wasm {
1188
1247
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1189
1248
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1190
1249
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1191
- if (r2) {
1192
- throw takeObject(r1);
1250
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1251
+ if (r3) {
1252
+ throw takeObject(r2);
1193
1253
  }
1194
- return takeObject(r0);
1254
+ var v2 = getArrayJsValueFromWasm0(r0, r1).slice();
1255
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
1256
+ return v2;
1195
1257
  } finally {
1196
1258
  wasm.__wbindgen_add_to_stack_pointer(16);
1197
1259
  }
@@ -1504,7 +1566,7 @@ export class Wasm {
1504
1566
  * Get info for a specific page.
1505
1567
  * @param {string} id
1506
1568
  * @param {number} page_index
1507
- * @returns {PageInfo}
1569
+ * @returns {JsPageInfo}
1508
1570
  */
1509
1571
  page_info(id, page_index) {
1510
1572
  try {
@@ -1552,7 +1614,7 @@ if (Symbol.dispose) Wasm.prototype[Symbol.dispose] = Wasm.prototype.free;
1552
1614
  * ]);
1553
1615
  * ```
1554
1616
  * @param {Uint8Array} data
1555
- * @returns {any}
1617
+ * @returns {JsParsedFontInfo}
1556
1618
  */
1557
1619
  export function parseFontInfo(data) {
1558
1620
  try {
@@ -1799,6 +1861,10 @@ function __wbg_get_imports() {
1799
1861
  imports.wbg.__wbg_end_ece2bf3a25678f12 = function(arg0) {
1800
1862
  getObject(arg0).end();
1801
1863
  };
1864
+ imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {
1865
+ const ret = Object.entries(getObject(arg0));
1866
+ return addHeapObject(ret);
1867
+ };
1802
1868
  imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
1803
1869
  let deferred0_0;
1804
1870
  let deferred0_1;
@@ -1895,6 +1961,16 @@ function __wbg_get_imports() {
1895
1961
  const ret = result;
1896
1962
  return ret;
1897
1963
  };
1964
+ imports.wbg.__wbg_instanceof_Map_084be8da74364158 = function(arg0) {
1965
+ let result;
1966
+ try {
1967
+ result = getObject(arg0) instanceof Map;
1968
+ } catch (_) {
1969
+ result = false;
1970
+ }
1971
+ const ret = result;
1972
+ return ret;
1973
+ };
1898
1974
  imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
1899
1975
  let result;
1900
1976
  try {
@@ -1990,7 +2066,7 @@ function __wbg_get_imports() {
1990
2066
  const a = state0.a;
1991
2067
  state0.a = 0;
1992
2068
  try {
1993
- return __wasm_bindgen_func_elem_20199(a, state0.b, arg0, arg1);
2069
+ return __wasm_bindgen_func_elem_22334(a, state0.b, arg0, arg1);
1994
2070
  } finally {
1995
2071
  state0.a = a;
1996
2072
  }
@@ -2470,11 +2546,6 @@ function __wbg_get_imports() {
2470
2546
  const ret = arg0;
2471
2547
  return addHeapObject(ret);
2472
2548
  };
2473
- imports.wbg.__wbindgen_cast_9d97beea3493d3db = function(arg0, arg1) {
2474
- // Cast intrinsic for `Closure(Closure { dtor_idx: 212, function: Function { arguments: [Externref], shim_idx: 213, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2475
- const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_2694, __wasm_bindgen_func_elem_2710);
2476
- return addHeapObject(ret);
2477
- };
2478
2549
  imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
2479
2550
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
2480
2551
  const ret = getArrayU8FromWasm0(arg0, arg1);
@@ -2485,6 +2556,11 @@ function __wbg_get_imports() {
2485
2556
  const ret = arg0;
2486
2557
  return addHeapObject(ret);
2487
2558
  };
2559
+ imports.wbg.__wbindgen_cast_e95d7a09ad75920b = function(arg0, arg1) {
2560
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 259, function: Function { arguments: [Externref], shim_idx: 260, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2561
+ const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_4149, __wasm_bindgen_func_elem_4165);
2562
+ return addHeapObject(ret);
2563
+ };
2488
2564
  imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
2489
2565
  const ret = getObject(arg0);
2490
2566
  return addHeapObject(ret);
Binary file
@@ -22,7 +22,7 @@ export const wasm_has_document: (a: number, b: number, c: number) => number;
22
22
  export const wasm_has_feature: (a: number, b: number, c: number) => number;
23
23
  export const wasm_has_gpu: (a: number) => number;
24
24
  export const wasm_init_gpu: (a: number) => number;
25
- export const wasm_license_status: (a: number, b: number) => void;
25
+ export const wasm_license_status: (a: number) => number;
26
26
  export const wasm_load: (a: number, b: number, c: number, d: number) => void;
27
27
  export const wasm_load_docx: (a: number, b: number, c: number, d: number) => void;
28
28
  export const wasm_load_image: (a: number, b: number, c: number, d: number) => void;
@@ -33,24 +33,25 @@ export const wasm_needs_password: (a: number, b: number, c: number, d: number) =
33
33
  export const wasm_new: (a: number, b: number, c: number, d: number) => number;
34
34
  export const wasm_page_count: (a: number, b: number, c: number, d: number) => void;
35
35
  export const wasm_page_info: (a: number, b: number, c: number, d: number, e: number) => void;
36
- export const wasm_pdf_compose: (a: number, b: number, c: number, d: number) => void;
36
+ export const wasm_pdf_compose: (a: number, b: number, c: number, d: number, e: number) => void;
37
37
  export const wasm_pdf_compress: (a: number, b: number, c: number, d: number) => void;
38
38
  export const wasm_pdf_decompress: (a: number, b: number, c: number, d: number) => void;
39
39
  export const wasm_pdf_extract_fonts: (a: number, b: number, c: number, d: number) => void;
40
40
  export const wasm_pdf_extract_images: (a: number, b: number, c: number, d: number, e: number) => void;
41
+ export const wasm_pdf_save_annotations: (a: number, b: number, c: number, d: number, e: number) => void;
41
42
  export const wasm_pdf_split_by_outline: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
42
- export const wasm_registerFonts: (a: number, b: number, c: number) => void;
43
+ export const wasm_registerFonts: (a: number, b: number, c: number, d: number) => void;
43
44
  export const wasm_remove_document: (a: number, b: number, c: number) => number;
44
45
  export const wasm_render_page_gpu: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
45
46
  export const wasm_render_page_to_png: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
46
47
  export const wasm_render_page_to_rgba: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
47
- export const wasm_set_license: (a: number, b: number, c: number, d: number) => void;
48
+ export const wasm_set_license: (a: number, b: number, c: number) => number;
48
49
  export const wasm_set_visibility_group_visible: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
49
50
  export const wasm_setup_telemetry: (a: number, b: number, c: number) => void;
50
51
  export const wasm_viewer_preferences: (a: number, b: number, c: number, d: number) => void;
51
- export const __wasm_bindgen_func_elem_2710: (a: number, b: number, c: number) => void;
52
- export const __wasm_bindgen_func_elem_2694: (a: number, b: number) => void;
53
- export const __wasm_bindgen_func_elem_20199: (a: number, b: number, c: number, d: number) => void;
52
+ export const __wasm_bindgen_func_elem_4165: (a: number, b: number, c: number) => void;
53
+ export const __wasm_bindgen_func_elem_4149: (a: number, b: number) => void;
54
+ export const __wasm_bindgen_func_elem_22334: (a: number, b: number, c: number, d: number) => void;
54
55
  export const __wbindgen_export: (a: number, b: number) => number;
55
56
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
56
57
  export const __wbindgen_export3: (a: number) => void;
@@ -5,12 +5,13 @@
5
5
  * Also handles render queue, cache, and priority management.
6
6
  * This is an internal API - use UDocClient for the public SDK.
7
7
  */
8
- import type { Composition, ComposePick, ExtractedFont, ExtractedImage, FontEntry, LicenseResult, OutlineSection, SplitByOutlineResult } from "./worker.js";
9
- import type { Orientation, SideDirection, CornerDirection, EightDirection, InOutDirection, TransitionEffect, PageTransition, FontSource, ResolvedFontInfo, FontUsageEntry } from "../wasm/udoc.js";
10
- export type { Composition, ComposePick, ExtractedFont, ExtractedImage, FontEntry, OutlineSection, SplitByOutlineResult, };
8
+ import type { Annotation, AnnotationsByPage, Composition, ComposePick, ExtractedFont, ExtractedImage, FontEntry, FontUsageEntry, LayoutPage, LicenseResult, OutlineItem, PageTransition, OutlineSection, SplitByOutlineResult, VisibilityGroup } from "./worker.js";
9
+ import type { JsOrientation as Orientation, JsSideDirection as SideDirection, JsCornerDirection as CornerDirection, JsEightDirection as EightDirection, JsInOutDirection as InOutDirection, JsTransitionEffect as TransitionEffect, JsFontSource as FontSource, JsResolvedFontInfo as ResolvedFontInfo, JsLayoutFrame as LayoutFrame, JsLayoutParcel as LayoutParcel, JsLayoutLine as LayoutLine, JsLayoutRun as LayoutRun, JsLayoutRunList as LayoutRunList, JsLayoutRunContent as LayoutRunContent, JsLayoutLineContent as LayoutLineContent, JsLayoutTable as LayoutTable, JsLayoutTableRow as LayoutTableRow, JsLayoutTableCell as LayoutTableCell, JsLayoutTableColumn as LayoutTableColumn, JsLayoutGrid as LayoutGrid, JsLayoutGridRow as LayoutGridRow, JsLayoutGridCell as LayoutGridCell, JsLayoutGridColumn as LayoutGridColumn, JsLayoutGlyph as LayoutGlyph, JsTransform as Transform } from "../wasm/udoc.js";
10
+ export type { Annotation, AnnotationsByPage, Composition, ComposePick, ExtractedFont, ExtractedImage, FontEntry, OutlineItem, OutlineSection, SplitByOutlineResult, VisibilityGroup, };
11
11
  export type { LicenseResult };
12
12
  export type { Orientation, SideDirection, CornerDirection, EightDirection, InOutDirection, TransitionEffect, PageTransition, };
13
13
  export type { FontSource, ResolvedFontInfo, FontUsageEntry };
14
+ export type { LayoutPage, LayoutFrame, LayoutParcel, LayoutLine, LayoutRun, LayoutRunList, LayoutRunContent, LayoutLineContent, LayoutTable, LayoutTableRow, LayoutTableCell, LayoutTableColumn, LayoutGrid, LayoutGridRow, LayoutGridCell, LayoutGridColumn, LayoutGlyph, Transform, };
14
15
  /**
15
16
  * Font information extracted from raw font binary data.
16
17
  */
@@ -175,35 +176,40 @@ export declare class WorkerClient {
175
176
  /**
176
177
  * Get the document outline.
177
178
  */
178
- getOutline(documentId: string): Promise<unknown[]>;
179
+ getOutline(documentId: string): Promise<OutlineItem[]>;
179
180
  /**
180
181
  * Get font usage information for a document.
181
182
  */
182
- getFontUsage(documentId: string): Promise<unknown[]>;
183
+ getFontUsage(documentId: string): Promise<FontUsageEntry[]>;
183
184
  /**
184
185
  * Get annotations for a specific page.
185
186
  * Routed through the unified work queue so renders take priority.
186
187
  */
187
- getPageAnnotations(documentId: string, pageIndex: number): Promise<unknown[]>;
188
+ getPageAnnotations(documentId: string, pageIndex: number): Promise<Annotation[]>;
188
189
  /**
189
190
  * Get the layout model for a specific page (for text selection/search).
190
191
  * Routed through the unified work queue so renders take priority.
191
192
  */
192
- getLayoutPage(documentId: string, pageIndex: number): Promise<unknown>;
193
+ getLayoutPage(documentId: string, pageIndex: number): Promise<LayoutPage>;
193
194
  /**
194
195
  * Request annotations via the unified work queue.
195
196
  * Lower priority than renders — waits for pending renders to complete first.
196
197
  */
197
- requestAnnotations(docId: string, pageIndex: number): Promise<unknown[]>;
198
+ requestAnnotations(docId: string, pageIndex: number): Promise<Annotation[]>;
198
199
  /**
199
200
  * Request text content via the unified work queue.
200
201
  * Lowest priority — waits for pending renders and annotations to complete first.
201
202
  */
202
- requestText(docId: string, pageIndex: number): Promise<unknown[]>;
203
+ requestText(docId: string, pageIndex: number): Promise<LayoutPage>;
203
204
  /**
204
205
  * Get all annotations grouped by page.
205
206
  */
206
- getAllAnnotations(documentId: string): Promise<Record<string, unknown[]>>;
207
+ getAllAnnotations(documentId: string): Promise<AnnotationsByPage>;
208
+ /**
209
+ * Save annotations to a PDF document.
210
+ * Returns the modified PDF bytes with annotations applied.
211
+ */
212
+ pdfSaveAnnotations(documentId: string, annotationsByPage: AnnotationsByPage): Promise<Uint8Array>;
207
213
  /**
208
214
  * Compose new PDF documents by cherry-picking pages from source documents.
209
215
  *
@@ -290,7 +296,7 @@ export declare class WorkerClient {
290
296
  /**
291
297
  * Get visibility groups for a document.
292
298
  */
293
- getVisibilityGroups(documentId: string): Promise<unknown[]>;
299
+ getVisibilityGroups(documentId: string): Promise<VisibilityGroup[]>;
294
300
  /**
295
301
  * Set visibility of a specific group.
296
302
  *
@@ -1 +1 @@
1
- {"version":3,"file":"WorkerClient.d.ts","sourceRoot":"","sources":["../../../src/worker/WorkerClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACR,WAAW,EACX,WAAW,EACX,aAAa,EACb,cAAc,EACd,SAAS,EACT,aAAa,EACb,cAAc,EACd,oBAAoB,EAGvB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EACR,WAAW,EACX,aAAa,EACb,eAAe,EACf,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,cAAc,EACjB,MAAM,iBAAiB,CAAC;AAIzB,YAAY,EACR,WAAW,EACX,WAAW,EACX,aAAa,EACb,cAAc,EACd,SAAS,EACT,cAAc,EACd,oBAAoB,GACvB,CAAC;AAEF,YAAY,EAAE,aAAa,EAAE,CAAC;AAG9B,YAAY,EACR,WAAW,EACX,aAAa,EACb,eAAe,EACf,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,cAAc,GACjB,CAAC;AAGF,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB,0DAA0D;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,iCAAiC;IACjC,MAAM,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,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I;IAM/D;;;OAGG;IACH,4BAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAMpE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAK;IAE5C;;;;OAIG;IACH,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAkCnG;;;OAGG;IACG,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IA2C5D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAK;IAExC;;;;;;;;;OASG;IACH,OAAO,CAAC,SAAS;IA2DjB;;OAEG;IACH,sBAAsB,IAAI,IAAI;IA0B9B,OAAO,CAAC,gBAAgB;YAwCV,QAAQ;YA0DR,YAAY;YAoBZ,MAAM;IAoBpB,OAAO,CAAC,gBAAgB;IAexB,OAAO,CAAC,QAAQ;IAoBhB;;OAEG;IACH,SAAS,IAAI,IAAI;IASjB,OAAO,CAAC,IAAI;IAQZ,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,WAAW;CAGtB"}
@@ -385,7 +385,7 @@ export class WorkerClient {
385
385
  docId,
386
386
  page,
387
387
  priority: 0,
388
- resolve: resolve,
388
+ resolve,
389
389
  reject,
390
390
  });
391
391
  this.sortQueue();
@@ -425,7 +425,7 @@ export class WorkerClient {
425
425
  docId,
426
426
  page,
427
427
  priority: 0,
428
- resolve: resolve,
428
+ resolve,
429
429
  reject,
430
430
  });
431
431
  this.sortQueue();
@@ -450,6 +450,14 @@ export class WorkerClient {
450
450
  throw error;
451
451
  }
452
452
  }
453
+ /**
454
+ * Save annotations to a PDF document.
455
+ * Returns the modified PDF bytes with annotations applied.
456
+ */
457
+ async pdfSaveAnnotations(documentId, annotationsByPage) {
458
+ const response = (await this.send({ type: "pdfSaveAnnotations", documentId, annotationsByPage }));
459
+ return response.bytes;
460
+ }
453
461
  /**
454
462
  * Compose new PDF documents by cherry-picking pages from source documents.
455
463
  *