This is an updated verison of Print.JS in which the firefox printing issues has been fixed.
To install via npm:
npm i print-js-updated
To install via yarn:
yarn add print-js-updated
Import the library into your project:
import printJS from 'print-js-updated'
<button type="button" onclick="printJS('docs/printjs.pdf')">
Print PDF
</button>
For more usage info, kindly visit printjs.crabbly.com
Print.js is available under the MIT license.