Currently you use `PDFJS.createPromiseCapability()` everywhere in this file, meaning that you won't need this global.
However, wouldn't it be simpler to keep it and and instead just use `createPromiseCapability` in the code?