Add "silent" option to suppress console messages
There are a lot of console.log's in this project, and it would be nice if there was a way to toggle their usage to keep the console clean.
In addition, when started to load a PDF and then destroying the component (by navigating away with vue-router while auto-destroy is set to true, for instance) then there are many uncaught exceptions in the console:
TypeError: Cannot read properties of null (reading 'ensureDoc')
My guess is that something is happening in the worker after the component has already been lost. It would be nice if these exceptions were caught to prevent console flooding as well.
Thank you for your consideration, happy to help in any way I can.
Much of those console.log's are printed by pdf.js directly, this library does not include any log but errors.
In addition, when started to load a PDF and then destroying the component (by navigating away with vue-router while auto-destroy is set to true, for instance) then there are many uncaught exceptions in the console:
TypeError: Cannot read properties of null (reading 'ensureDoc')My guess is that something is happening in the worker after the component has already been lost. It would be nice if these exceptions were caught to prevent console flooding as well.
Yup, this error is thrown when there is some pending promises and the worker was destroyed before those promises resolve, I am not sure if it is possible to include something like "silent" option... could you share some reproducible sample of this case?