<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Print]]></title><description><![CDATA[<p dir="auto">Bonjour à tous, je cherche a étoffer un modules en y ajoutant une petite fonction en plus. Module : EXT-Selfies by <a class="plugin-mentions-user plugin-mentions-a" href="/user/bugsounet" aria-label="Profile: bugsounet">@<bdi>bugsounet</bdi></a>. Je suis nouveau dans l’environnement de la programation et j’aurai besoin de quelques tips.<br />
Mon but : avoir une option, impression selfie<br />
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 ?<br />
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.?<br />
Tout renseignement ou aide est bonne a prendre.<br />
Merci pour votre aide et conseils, en vous souhaitant une très bonne année 2023.<br />
Informatiquement ✌🏼</p>
<p dir="auto">adding english (sdetweil)</p>
<p dir="auto">Hello everyone, I am looking to expand a module by adding a small additional function. Module: EXT-Selfies by <a class="plugin-mentions-user plugin-mentions-a" href="/user/bugsounet" aria-label="Profile: bugsounet">@<bdi>bugsounet</bdi></a>. I am new to the programming environment and I will need some tips.<br />
My goal: to have an option, selfie printing<br />
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?<br />
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.?<br />
Any information or help is welcome.<br />
Thank you for your help and advice, wishing you a very happy new year 2023.<br />
IT</p>
]]></description><link>https://forum.magicmirror.builders/topic/17514/print</link><generator>RSS for Node</generator><lastBuildDate>Thu, 18 Jun 2026 13:53:41 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/17514.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 06 Jan 2023 14:01:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Print on Sat, 07 Jan 2023 13:07:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alexandre-venditti69" aria-label="Profile: Alexandre-Venditti69">@<bdi>Alexandre-Venditti69</bdi></a> said in <a href="/post/106986">Print</a>:</p>
<blockquote>
<p dir="auto">Est ce un bon début ?</p>
</blockquote>
<p dir="auto">sorry, I have no idea.<br />
I would have thought u could print directly from the browser, and not have to go to the helper.</p>
<p dir="auto">never tried printing</p>
]]></description><link>https://forum.magicmirror.builders/post/106990</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/106990</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 07 Jan 2023 13:07:22 GMT</pubDate></item><item><title><![CDATA[Reply to Print on Fri, 06 Jan 2023 20:54:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alexandre-venditti69" aria-label="Profile: Alexandre-Venditti69">@<bdi>Alexandre-Venditti69</bdi></a> no clue…  raspberry pi 3 has 1 gig  or memory and pi4 can have up to 8gig.</p>
]]></description><link>https://forum.magicmirror.builders/post/106978</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/106978</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Fri, 06 Jan 2023 20:54:41 GMT</pubDate></item><item><title><![CDATA[Reply to Print on Fri, 06 Jan 2023 20:52:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> I read the print.js library, it is of substantial size, does such a volume remain “compatible” with a simple raspberry?</p>
]]></description><link>https://forum.magicmirror.builders/post/106977</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/106977</guid><dc:creator><![CDATA[Alexandre-Venditti69]]></dc:creator><pubDate>Fri, 06 Jan 2023 20:52:54 GMT</pubDate></item><item><title><![CDATA[Reply to Print on Fri, 06 Jan 2023 17:36:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> thanks for your intention 🙏🏼</p>
]]></description><link>https://forum.magicmirror.builders/post/106959</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/106959</guid><dc:creator><![CDATA[Alexandre-Venditti69]]></dc:creator><pubDate>Fri, 06 Jan 2023 17:36:32 GMT</pubDate></item><item><title><![CDATA[Reply to Print on Sat, 07 Jan 2023 13:02:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a></p>
<pre><code>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(()=&gt;{
        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 = ()=&gt; {
      this.lastPhoto = result    // Sauvegarde le selfie en local
      this.sendNotification("EXT_SELFIES-RESULT", result) // Envoi la notif pour EXT-SSender
      this.closeDisplayer()
    }
</code></pre>
<p dir="auto">Dans cette partie, j’ai rajouté à SendIcon :</p>
<pre><code>this.sendSocketNotification("printResult", payload)

Mon node helper reçoit cette notification et exécutera printResult  function (payload) {}
</code></pre>
<p dir="auto">Est ce un bon début ?</p>
]]></description><link>https://forum.magicmirror.builders/post/106986</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/106986</guid><dc:creator><![CDATA[Alexandre-Venditti69]]></dc:creator><pubDate>Sat, 07 Jan 2023 13:02:42 GMT</pubDate></item><item><title><![CDATA[Reply to Print on Fri, 06 Jan 2023 17:05:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alexandre-venditti69" aria-label="Profile: Alexandre-Venditti69">@<bdi>Alexandre-Venditti69</bdi></a> console.log(notification)<br />
will dump out the structure of the notification object  so u might find the url there</p>
]]></description><link>https://forum.magicmirror.builders/post/106958</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/106958</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Fri, 06 Jan 2023 17:05:53 GMT</pubDate></item><item><title><![CDATA[Reply to Print on Fri, 06 Jan 2023 17:03:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> <em>i think if you use that, then u would have to add code to that to get to the image…</em><br />
Of course, bugsounet told me i ve have to add console.log(payload) on the notification.<br />
i ve start to write a new fonction in Ext-Selfies.js, and his node_helper.<br />
<a href="https://github.com/tomgco/node-lp/blob/master/lib/spawn-lp.js" target="_blank" rel="noopener noreferrer nofollow ugc">texte du lien</a> this exemple script print on défaut printer , but how i can writte it to resolve the payload</p>
]]></description><link>https://forum.magicmirror.builders/post/106957</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/106957</guid><dc:creator><![CDATA[Alexandre-Venditti69]]></dc:creator><pubDate>Fri, 06 Jan 2023 17:03:45 GMT</pubDate></item><item><title><![CDATA[Reply to Print on Fri, 06 Jan 2023 17:06:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alexandre-venditti69" aria-label="Profile: Alexandre-Venditti69">@<bdi>Alexandre-Venditti69</bdi></a> well you put the image on the screen by using a url ,</p>
<pre><code>&lt;img src="url...",
</code></pre>
<p dir="auto">so there u have the url u need to use to print</p>
<p dir="auto">u may have to extract it again from the html content at the time of the print request,<br />
but u can use the dhtml API calls to get it, or jQuery</p>
<p dir="auto">if u add a known ID= to the img tag</p>
<p dir="auto">document.getElementById(…)<br />
then u can get the value of the src=</p>
]]></description><link>https://forum.magicmirror.builders/post/106956</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/106956</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Fri, 06 Jan 2023 17:06:18 GMT</pubDate></item><item><title><![CDATA[Reply to Print on Fri, 06 Jan 2023 16:50:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> great thank so much,  I’ve never ser this<br />
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.</p>
]]></description><link>https://forum.magicmirror.builders/post/106955</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/106955</guid><dc:creator><![CDATA[Alexandre-Venditti69]]></dc:creator><pubDate>Fri, 06 Jan 2023 16:50:22 GMT</pubDate></item><item><title><![CDATA[Reply to Print on Fri, 06 Jan 2023 14:47:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alexandre-venditti69" aria-label="Profile: Alexandre-Venditti69">@<bdi>Alexandre-Venditti69</bdi></a>  i do not know the answer, don’t use the EXT* modules…</p>
<p dir="auto">i think if you use that, then u would have to add code to that to get to the image…</p>
<p dir="auto">i did a quick google search for “print image from browser”<br />
<a href="https://stackoverflow.com/questions/52885693/how-to-print-image-from-browser-using-javascript" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/52885693/how-to-print-image-from-browser-using-javascript</a></p>
]]></description><link>https://forum.magicmirror.builders/post/106949</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/106949</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Fri, 06 Jan 2023 14:47:21 GMT</pubDate></item></channel></rss>