@embedpdf/engines 2.11.0 → 2.11.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.
Files changed (45) hide show
  1. package/dist/browser-BpXqcQ3U.cjs +2 -0
  2. package/dist/browser-BpXqcQ3U.cjs.map +1 -0
  3. package/dist/{browser-BISJ9naB.js → browser-BuzIa755.js} +95 -6
  4. package/dist/browser-BuzIa755.js.map +1 -0
  5. package/dist/direct-engine-IJ8DmFTb.cjs +2 -0
  6. package/dist/direct-engine-IJ8DmFTb.cjs.map +1 -0
  7. package/dist/{direct-engine-cyecHjwI.js → direct-engine-oh_i6TH_.js} +7 -7
  8. package/dist/direct-engine-oh_i6TH_.js.map +1 -0
  9. package/dist/index.cjs +1 -1
  10. package/dist/index.js +3 -3
  11. package/dist/lib/converters/index.cjs +1 -1
  12. package/dist/lib/converters/index.js +1 -1
  13. package/dist/lib/image-encoder/bmp.d.ts +13 -0
  14. package/dist/lib/image-encoder/image-encoder-worker.d.ts +1 -1
  15. package/dist/lib/image-encoder/worker-pool.d.ts +1 -1
  16. package/dist/lib/pdfium/index.cjs +1 -1
  17. package/dist/lib/pdfium/index.js +4 -4
  18. package/dist/lib/pdfium/web/direct-engine.cjs +1 -1
  19. package/dist/lib/pdfium/web/direct-engine.js +3 -3
  20. package/dist/lib/pdfium/web/worker-engine.cjs +1 -1
  21. package/dist/lib/pdfium/web/worker-engine.cjs.map +1 -1
  22. package/dist/lib/pdfium/web/worker-engine.js +127 -5
  23. package/dist/lib/pdfium/web/worker-engine.js.map +1 -1
  24. package/dist/{pdf-engine-Dj-haWhC.js → pdf-engine-D9v0RfKe.js} +3 -3
  25. package/dist/pdf-engine-D9v0RfKe.js.map +1 -0
  26. package/dist/pdf-engine-DeiICuca.cjs +2 -0
  27. package/dist/pdf-engine-DeiICuca.cjs.map +1 -0
  28. package/dist/preact/index.cjs +1 -1
  29. package/dist/preact/index.js +1 -1
  30. package/dist/react/index.cjs +1 -1
  31. package/dist/react/index.js +1 -1
  32. package/dist/svelte/index.cjs +1 -1
  33. package/dist/svelte/index.js +1 -1
  34. package/dist/vue/index.cjs +1 -1
  35. package/dist/vue/index.js +1 -1
  36. package/package.json +4 -4
  37. package/dist/browser-13mzox-R.cjs +0 -2
  38. package/dist/browser-13mzox-R.cjs.map +0 -1
  39. package/dist/browser-BISJ9naB.js.map +0 -1
  40. package/dist/direct-engine-BNQEVS9L.cjs +0 -2
  41. package/dist/direct-engine-BNQEVS9L.cjs.map +0 -1
  42. package/dist/direct-engine-cyecHjwI.js.map +0 -1
  43. package/dist/pdf-engine-BoFryxxe.cjs +0 -2
  44. package/dist/pdf-engine-BoFryxxe.cjs.map +0 -1
  45. package/dist/pdf-engine-Dj-haWhC.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { init } from "@embedpdf/pdfium";
2
2
  import { Rotation, NoopLogger, PdfTaskHelper, PdfErrorCode, pdfDateToDate, PdfJavaScriptActionTrigger, PdfAnnotationSubtype, isUuidV4, uuidV4, PdfJavaScriptWidgetEventType, PDF_ANNOT_AACTION_EVENT, PDF_FORM_FIELD_TYPE, PdfPageFlattenFlag, stripPdfUnwantedMarkers, PdfAnnotationName, PdfAnnotationColorType, PdfAnnotationBorderStyle, PdfStandardFont, PDF_FORM_FIELD_FLAG, webColorToPdfColor, pdfColorToWebColor, PdfAnnotationLineEnding, PdfStampFit, PdfTrappedStatus, pdfAlphaToWebOpacity, webOpacityToPdfAlpha, PdfAnnotationReplyType, dateToPdfDate, quadToRect, rectToQuad, PdfPageObjectType, flagsToNames, namesToFlags, AppearanceMode, Task, toIntRect, transformRect, buildUserToDeviceMatrix, AP_MODE_NORMAL, AP_MODE_ROLLOVER, AP_MODE_DOWN, PdfZoomMode, PdfActionType } from "@embedpdf/models";
3
- import { P as PdfEngine } from "./pdf-engine-Dj-haWhC.js";
4
- import { b as browserImageDataToBlobConverter } from "./browser-BISJ9naB.js";
3
+ import { P as PdfEngine } from "./pdf-engine-D9v0RfKe.js";
4
+ import { b as browserImageDataToBlobConverter } from "./browser-BuzIa755.js";
5
5
  function readString(wasmModule, readChars, parseChars, defaultLength = 100) {
6
6
  let buffer = wasmModule.wasmExports.malloc(defaultLength);
7
7
  for (let i = 0; i < defaultLength; i++) {
@@ -4203,10 +4203,10 @@ class PdfiumNative {
4203
4203
  return false;
4204
4204
  }
4205
4205
  const matrixPtr = this.memoryManager.malloc(6 * 4);
4206
- this.pdfiumModule.pdfium.setValue(matrixPtr, imageData.width, "float");
4206
+ this.pdfiumModule.pdfium.setValue(matrixPtr, rect.size.width, "float");
4207
4207
  this.pdfiumModule.pdfium.setValue(matrixPtr + 4, 0, "float");
4208
4208
  this.pdfiumModule.pdfium.setValue(matrixPtr + 8, 0, "float");
4209
- this.pdfiumModule.pdfium.setValue(matrixPtr + 12, imageData.height, "float");
4209
+ this.pdfiumModule.pdfium.setValue(matrixPtr + 12, rect.size.height, "float");
4210
4210
  this.pdfiumModule.pdfium.setValue(matrixPtr + 16, 0, "float");
4211
4211
  this.pdfiumModule.pdfium.setValue(matrixPtr + 20, 0, "float");
4212
4212
  if (!this.pdfiumModule.FPDFPageObj_SetMatrix(imageObjectPtr, matrixPtr)) {
@@ -4219,8 +4219,8 @@ class PdfiumNative {
4219
4219
  this.memoryManager.free(matrixPtr);
4220
4220
  const pagePos = this.convertDevicePointToPagePoint(doc, page, {
4221
4221
  x: rect.origin.x,
4222
- y: rect.origin.y + imageData.height
4223
- // shift down by the image height
4222
+ y: rect.origin.y + rect.size.height
4223
+ // shift down by the authored display height
4224
4224
  });
4225
4225
  this.pdfiumModule.FPDFPageObj_Transform(imageObjectPtr, 1, 0, 0, 1, pagePos.x, pagePos.y);
4226
4226
  if (!this.pdfiumModule.FPDFAnnot_AppendObject(annotationPtr, imageObjectPtr)) {
@@ -9685,4 +9685,4 @@ export {
9685
9685
  isValidCustomKey as i,
9686
9686
  readArrayBuffer as r
9687
9687
  };
9688
- //# sourceMappingURL=direct-engine-cyecHjwI.js.map
9688
+ //# sourceMappingURL=direct-engine-oh_i6TH_.js.map