@chialab/pdfjs-lib 1.0.0-alpha.7 → 1.0.0-alpha.9

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.
@@ -52641,18 +52641,29 @@ var _OperatorList = class _OperatorList {
52641
52641
  switch (fnArray[i]) {
52642
52642
  case OPS.paintInlineImageXObject:
52643
52643
  case OPS.paintInlineImageXObjectGroup:
52644
- case OPS.paintImageMaskXObject:
52645
- const arg = argsArray[i][0];
52646
- if (arg.data?.buffer instanceof ArrayBuffer) {
52647
- transfers.push(arg.data.buffer);
52644
+ case OPS.paintImageMaskXObject: {
52645
+ const { bitmap, data } = argsArray[i][0];
52646
+ if (bitmap || data?.buffer) {
52647
+ transfers.push(bitmap || data.buffer);
52648
52648
  }
52649
52649
  break;
52650
- case OPS.constructPath:
52650
+ }
52651
+ case OPS.constructPath: {
52651
52652
  const [, [data], minMax] = argsArray[i];
52652
52653
  if (data) {
52653
52654
  transfers.push(data.buffer, minMax.buffer);
52654
52655
  }
52655
52656
  break;
52657
+ }
52658
+ case OPS.paintFormXObjectBegin:
52659
+ const [matrix, bbox] = argsArray[i];
52660
+ if (matrix) {
52661
+ transfers.push(matrix.buffer);
52662
+ }
52663
+ if (bbox) {
52664
+ transfers.push(bbox.buffer);
52665
+ }
52666
+ break;
52656
52667
  }
52657
52668
  }
52658
52669
  return transfers;
@@ -54272,7 +54283,9 @@ var PartialEvaluator = class _PartialEvaluator {
54272
54283
  }
54273
54284
  operatorList.addOp(OPS.beginGroup, [groupOptions]);
54274
54285
  }
54275
- const args = group ? [matrix, null] : [matrix, bbox];
54286
+ const f32matrix = matrix && new Float32Array(matrix);
54287
+ const f32bbox = !group && bbox && new Float32Array(bbox) || null;
54288
+ const args = [f32matrix, f32bbox];
54276
54289
  operatorList.addOp(OPS.paintFormXObjectBegin, args);
54277
54290
  await this.getOperatorList({
54278
54291
  stream: xobj,
@@ -186,10 +186,10 @@ declare class CanvasExtraState {
186
186
  activeSMask: any;
187
187
  transferMaps: string;
188
188
  clone(): any;
189
- updateRectMinMax(transform: any, rect: any): void;
189
+ updateRectMinMax([m0, m1, m2, m3, m4, m5]: [any, any, any, any, any, any], [r0, r1, r2, r3]: [any, any, any, any]): void;
190
190
  minX: any;
191
- minY: any;
192
191
  maxX: any;
192
+ minY: any;
193
193
  maxY: any;
194
194
  getPathBoundingBox(pathType?: string, transform?: null): any[];
195
195
  updateClipFromPath(): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chialab/pdfjs-lib",
3
3
  "description": "A custom Mozilla's PDF.js build with better Node support and extras.",
4
- "version": "1.0.0-alpha.7",
4
+ "version": "1.0.0-alpha.9",
5
5
  "type": "module",
6
6
  "author": "Chialab <dev@chialab.it>",
7
7
  "license": "MIT",