@sdetweil I read the print.js library, it is of substantial size, does such a volume remain “compatible” with a simple raspberry?
Read the statement by Michael Teeuw here.
Alexandre-Venditti69
@Alexandre-Venditti69
Latest posts made by Alexandre-Venditti69
-
RE: Print
-
RE: Print
showLastPhoto: function(result, sendResult = true, showLastOnly = false) { var autoValidate = showLastOnly ? true : result.options.autoValidate this.IsShooting = true var con = document.querySelector("#EXT-SELFIES") con.classList.add("shown") var rd = document.querySelector("#EXT-SELFIES .result") rd.style.backgroundImage = `url(modules/EXT-Selfies/photos/${result.uri})` rd.classList.add("shown") if (autoValidate) { if (this.config.usePreview) { var preview = document.querySelector("#EXT-SELFIES .preview") preview.classList.remove("shown") } setTimeout(()=>{ this.lastPhoto = result if (sendResult) this.sendNotification("EXT_SELFIES-RESULT", result) this.closeDisplayer() }, this.config.resultDuration) } }, validateSelfie: function(result) { var preview = document.querySelector("#EXT-SELFIES .preview") preview.classList.remove("shown") var pannel = document.getElementById("EXT-SELFIES-PANNEL") pannel.classList.add("shown") var sendIcon = document.getElementById("EXT-SELFIES-SEND") sendIcon.onclick = ()=> { this.lastPhoto = result // Sauvegarde le selfie en local this.sendNotification("EXT_SELFIES-RESULT", result) // Envoi la notif pour EXT-SSender this.closeDisplayer() }
Dans cette partie, j’ai rajouté à SendIcon :
this.sendSocketNotification("printResult", payload) Mon node helper reçoit cette notification et exécutera printResult function (payload) {}
Est ce un bon début ?
-
RE: Print
@sdetweil i think if you use that, then u would have to add code to that to get to the image…
Of course, bugsounet told me i ve have to add console.log(payload) on the notification.
i ve start to write a new fonction in Ext-Selfies.js, and his node_helper.
texte du lien this exemple script print on défaut printer , but how i can writte it to resolve the payload -
RE: Print
@sdetweil great thank so much, I’ve never ser this
very interesting and complete documentation. my first difficulty in all these docs is that the file is always referred to by exact path (ex: /home/pi/img.jpg) and in our EXT module, the image is sent as payload data. how to recover this variable in the print.js script I participated with bugsounet in the writing of the module (especially spectator to understand how it works), I would have liked to make my first pull request, hear the thunder of the printer at the print notification . If a developper interrsting to write this modules with me, or maybe sale me this. -
Print
Bonjour à tous, je cherche a étoffer un modules en y ajoutant une petite fonction en plus. Module : EXT-Selfies by @bugsounet. Je suis nouveau dans l’environnement de la programation et j’aurai besoin de quelques tips.
Mon but : avoir une option, impression selfie
J’ai énormément regarder de scripts sur cups, ipp, node.lp… et j’aimerais avoir vos conseils afin de savoir quelle serait la meilleure option ?
Créer un module, ajouter un script au modules? Comprendre la syntaxe d’un script ipp afin d’avoir le payload de l’image envoyé à mon imprimante.?
Tout renseignement ou aide est bonne a prendre.
Merci pour votre aide et conseils, en vous souhaitant une très bonne année 2023.
Informatiquement ✌🏼adding english (sdetweil)
Hello everyone, I am looking to expand a module by adding a small additional function. Module: EXT-Selfies by @bugsounet. I am new to the programming environment and I will need some tips.
My goal: to have an option, selfie printing
I have looked at a lot of scripts on cups, ipp, node.lp… and I would like your advice on what would be the best option?
Create a module, add a script to the modules? Understand the syntax of an ipp script in order to have the payload of the image sent to my printer.?
Any information or help is welcome.
Thank you for your help and advice, wishing you a very happy new year 2023.
IT