dart_pdf icon indicating copy to clipboard operation
dart_pdf copied to clipboard

DataCloneError: Failed to execute 'postMessage' on 'Worker': ArrayBuffer at index 0 is already detached.

Open MacDeveloper1 opened this issue 1 year ago • 1 comments

I decided to try to use new version of PDF.js and according to docs I added the following variable into index.html.

<script>
  // PDF.js options
  var dartPdfJsVersion = "3.4.120";
</script>

The PDF file was generated and shown but then after resize the window I got this exception: `` ══╡ EXCEPTION CAUGHT BY PRINTING ╞════════════════════════════════════════════════════ The following DomException object was thrown while rastering a PDF: DataCloneError: Failed to execute 'postMessage' on 'Worker': ArrayBuffer at index 0 is already detached.

When the exception was thrown, this was the stack

PageFormat: "PdfPageFormat 612x792 margins:72, 72, 72, 72" ═══════════════════════════════════════════════════════════════════════════════ Another exception was thrown: Assertion failed: file:///C:/Users/user/AppData/Local/Pub/Cache/git/dart_pdf-140d22beeb765ffab7ccb19a4cb2abf5fa25563d/printing/lib/src/preview/custom.dart:200:12

MacDeveloper1 avatar Feb 20 '24 16:02 MacDeveloper1

Any news here? I have the same problem

chrizstone avatar Jan 27 '25 12:01 chrizstone