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

is it possible to do it just client side only without the need of a server ?

Open minanagehsalalma opened this issue 3 years ago • 2 comments

I am trying to do it on android with a page that requires login so the server won't have access to it.

doing it like this

javascript:{const script=document.createElement('script');script.src=' https://printjs-4de6.kxcdn.com/print.min.js';document.body.appendChild(script);printJS()}

thanks.

minanagehsalalma avatar Mar 18 '21 01:03 minanagehsalalma

If you don't need a server your server to serve style files or a pdf itself, this should work fine entirely client side. We are doing this.

WorldsEndless avatar Dec 12 '22 17:12 WorldsEndless

@WorldsEndless using this bookmarklet i am getting this error

javascript:{const script=document.createElement('script');script.src=' https://printjs-4de6.kxcdn.com/print.min.js';document.body.appendChild(script);printJS(docs/printjs.pdf)}

Uncaught ReferenceError: docs is not defined

any idea how pull it off ?

thanks a lot : )

minanagehsalalma avatar Feb 27 '23 11:02 minanagehsalalma