<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 23, 2020 at 1:28 AM Linux ROUEN Normandie <<a href="mailto:linux.rouen@free.fr">linux.rouen@free.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>Thanks for your reply. This Print... to PDF is really a nice feature
    of Purr Data. It would be even nicer when the user will be able to
    change the paper orientation awa the zoom level before printing.<br>
    <br>
    I hope you will be able to implement this 'autoprint' flag in a
    future release.<br></div></blockquote><div><br></div><div>Well, the good news is that I already implemented this and the dialog itself works very well, you can change orientation, media type, target (pdf or printer), etc., it does it all.</div><div><br></div><div> The bad news is that it breaks the real-time engine's main thread, which now gets a SIGHUP in the select() call inside sys_domicrosleep() while the print dialog is open. This takes down the engine, and subsequently the GUI once the print dialog is finished. It guess that's because invoking the print dialog in this manner somehow suspends the main thread of the GUI (even though I made sure to launch the dialog from a background thread to avoid this), so that the engine<->GUI communication stops working after a while (presumably because either the GUI->engine pipe runs dry, or the engine->GUI pipe fills up to the brim). Funnily enough, this doesn't happen with any of the other GUI operations even if they run for extended periods of time (such as building of the search index when you launch the help browser for the first time after a fresh install or upgrade).</div><div><br></div><div>Jonathan, maybe I should submit what I have as a merge request, so that we can have a look together and figure out how to work around the SIGHUP issue? I have some ideas on how to tackle this, but I'd like to get your opinion.<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
    <div>
      After further investigations, I didn't find this Print window (I
      have attached in my 1st mail) in any application on my system.<br>
      Does that mean it's belonging to NW.js (Chromium)? What is strange
      it's all in French and not in English. And neither Chromium nor
      Chrome are installed on my system, only Firefox.<br></div></div></blockquote><div><br></div><div>Yes, it's in nw.js (which is basically Chromium + Node.js).</div><div><br></div><div>Albert<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>
      <br>
      Best, Joseph<br>
      - - - - - - - - - -<br>
    </div>
    <div><br>
      Le 22/10/2020 à 11:58, Albert Graef a écrit :<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr">Hi Joseph,<br>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Tue, Oct 20, 2020 at 1:57
            AM Linux ROUEN Normandie <<a href="mailto:linux.rouen@free.fr" target="_blank">linux.rouen@free.fr</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>The File / Print... (PDF) feature of Purr Data is very
              useful, but depending of the patch you can get
              sometime/often only part of it.<br>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div>Well, it looks like I wrote this stuff some 4 years ago.
            ;-) I needed it as a quick and dirty means for the students
            to add a printout of the patch to their homework
            assignments. Maybe it's time to revisit it.<br>
          </div>
          <div> <br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>
              <div> So, is it possible to have access to this window
                (which only appears ~ 1/2 second with frozen default
                parameters) for being able to tailor your print?<br>
              </div>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div>The API which nw.js provided for this purpose at the time
            (<a href="https://nwjs.readthedocs.io/en/nw19/References/Window/#winprintoptions" target="_blank">https://nwjs.readthedocs.io/en/nw19/References/Window/#winprintoptions</a>)
            was rather limited and didn't allow user interaction. But it
            looks like there's a new autoprint flag which fixes this
            issue, so we might be able to offer something better now.</div>
          <div><br>
          </div>
          <div>I'll look into it as soon as I find the time.</div>
          <div><br>
          </div>
          <div>Albert<br>
          </div>
          <div><br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>
              <div> Then, the PDF file saving will have to be done from
                this window.<br>
                <br>
                Thanks. Best,<br>
                Joseph Gastelais<br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        -- <br>
        <div dir="ltr">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div>
                  <div dir="ltr">Dr. Albert Gr"af<br>
                    Computer Music Research Group, JGU Mainz, Germany<br>
                    Email: <a href="mailto:aggraef@gmail.com" target="_blank">aggraef@gmail.com</a>,
                    web: <a href="https://agraef.github.io/" target="_blank">https://agraef.github.io/</a></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
L2Ork-dev mailing list
<a href="mailto:L2Ork-dev@disis.music.vt.edu" target="_blank">L2Ork-dev@disis.music.vt.edu</a>
<a href="https://disis.music.vt.edu/listinfo/l2ork-dev" target="_blank">https://disis.music.vt.edu/listinfo/l2ork-dev</a></pre>
    </blockquote>
    <br>
  </div>

_______________________________________________<br>
L2Ork-dev mailing list<br>
<a href="mailto:L2Ork-dev@disis.music.vt.edu" target="_blank">L2Ork-dev@disis.music.vt.edu</a><br>
<a href="https://disis.music.vt.edu/listinfo/l2ork-dev" rel="noreferrer" target="_blank">https://disis.music.vt.edu/listinfo/l2ork-dev</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Dr. Albert Gr"af<br>Computer Music Research Group, JGU Mainz, Germany<br>Email: <a href="mailto:aggraef@gmail.com" target="_blank">aggraef@gmail.com</a>, web: <a href="https://agraef.github.io/" target="_blank">https://agraef.github.io/</a></div></div></div></div></div></div></div>