JavaScript doesn't have any methods of interacting with output devices, which means you cannot use plain JS to print. You can however use a library like Print.js
at Printjs.
Install it like so
npm install print-js --save
Import it to your component like so
import printJS from 'print-js'
then pass it the file/data you need printed
printJS('docs/PrintJS.pdf')
In your case
var request = new Request('http://localhost:3030/node/express/companyfiles/download/' + email + '/', {
method:'GET',
headers: new Headers({ 'Content-Type': 'application/zip',}),
})
fetch(request)
.then(response => ( response.json() ))
.then(data)
printJS(data)
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…