Closed xeladotbe closed 3 weeks ago
Thanks - this sounds like a bug - we will look into it.
Can you please provide a (minimal) script along with the PDF file that exhibits this issue.
Hey @ccxvii,
you can use the test.pdf from your tests folder: https://github.com/ArtifexSoftware/mupdf.js/blob/master/examples/tests/test.pdf
The exception only occurs if you specify all pages of the PDF file, i.e. PDF file has 3 pages
document.rearrangePages([0, 1]) => no exception document.rearrangePages([0, 1, 2]) =>exception
Hope this helps. I can also provide a minimal script later.
Regards, Alex
Hey @ccxvii ,
seems like the issue is gone with the latest release, I can't reproduce it anymore.
Regards, Alex
Hello,
I am trying to manipulate a PDF or change the page order, I tried the rearrangePages method, but here I get the following exception:
ERROR Error: Uncaught (in promise): RuntimeError: memory access out of bounds RuntimeError: memory access out of bounds at mupdf-wasm.wasm at mupdf-wasm.wasm at mupdf-wasm.wasm at mupdf-wasm.wasm at Object._wasm_free (mupdf-wasm.js:705:12) at PDFDocument.rearrangePages (mupdf.js:1722:22)
The exception is triggered by the following line in the finally block:
libmupdf._wasm_free(ptr);
But the reordering still works.
Thank you and regards, Alex