nbesli/pdf-merger-js

Uncaught (in promise) Error: already ended

Closed this issue · 5 comments

I have an issue on the this.merger.save() step which is :

fragment.js?2c29:10 Uncaught (in promise) Error: already ended
    at eval (fragment.js?2c29:10:1)
    at ./node_modules/pdfjs/lib/fragment.js (app.25ffb61edecf24d00fed.hot-update.js:245:1)
    at __webpack_require__ (runtime.js:859:30)
    at fn (runtime.js:151:20)
    at Object.eval (document.js?07b2:4:1)
    at eval (document.js:813:30)
    at ./node_modules/pdfjs/lib/document.js (app.25ffb61edecf24d00fed.hot-update.js:161:1)
    at __webpack_require__ (runtime.js:859:30)
    at fn (runtime.js:151:20)
    at eval (index.js?4e59:3:1)

@abbygailbunagan Please provide a code-snippet to reproduce this error!

const PDFMerger = require('pdf-merger-js');
    var merger = new PDFMerger();
    (async () => {
      merger.add('http://192.168.0.198:4000/Media/Files/msgc4896e2b7f31bdb285363d1ef8ce327e/sample.pdf');
      merger.add('http://192.168.0.198:4000/Media/Files/msgc4896e2b7f31bdb285363d1ef8ce327e/sample.pdf');
      merger.add('http://192.168.0.198:4000/Media/Files/msgc4896e2b7f31bdb285363d1ef8ce327e/sample.pdf');
      await merger.save('mergearchivingdoc');
      console.log(merger)
     })();

here is my code @mojoaxel thankyou

I'm having the same problem, any update for this?

@abbygailbunagan @GabeConsalter Please check if this is still an issue with v4.

Closing as solved with #84. Please let us know if this is still an issue!