Print.js icon indicating copy to clipboard operation
Print.js copied to clipboard

The Print.js can not print on the Electron when the print type is pdf

Open hy999 opened this issue 3 years ago • 3 comments
trafficstars

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 avatar Sep 15 '22 02:09 hy999

@hy999
Hi, did you solve the problem? Have you changed to another printing tool?

TingNLP avatar Sep 26 '22 02:09 TingNLP

@TingNLP did you encounter the same problem? I have the same problem in my application. The printed pdf is always damaged.

FlorianMold avatar Nov 23 '22 14:11 FlorianMold

@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.

hy999 avatar Nov 23 '22 14:11 hy999