Print.js
Print.js copied to clipboard
The Print.js can not print on the Electron when the print type is pdf
Dependencies
Print-js Version: 1.6.0 Vue Version:3.2.39 node Version:16.8.9 npm Version:8.14.0 vite Version:3.0.9 electron Version:20.1.3
Question
It actived on the website,but not on the Electron when print PDF files. When type is image、html , The operation is ok. I put an issue to Electron,they recomand me put an issue to Print-js
As I Know,The electron only integrated render module of Chromium。
Steps
Install the print-js
npm install print-js@latest --save-dev
Import the print-js
import printJs from 'print-js'
Template
<template>
<div @click='PrintTest'>
</template>
Javascript
<script>
const PrintTest=()=>{
printJs({
printable:"base64 str / pdf url",
type:'pdf',
base64:true
})
}
</script>
@hy999
Hi, did you solve the problem?
Have you changed to another printing tool?
@TingNLP did you encounter the same problem? I have the same problem in my application. The printed pdf is always damaged.
@TingNLP @FlorianMold I can't solve it, I publish the project as a website. I also take a issue with Electron project, that they say it can not be solved recently or never.