[L2Ork-dev] Purr Data: File / Print... PDF

Albert Graef aggraef at gmail.com
Fri Oct 23 04:42:14 EDT 2020


On Fri, Oct 23, 2020 at 1:28 AM Linux ROUEN Normandie <linux.rouen at free.fr>
wrote:

> 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.
>
> I hope you will be able to implement this 'autoprint' flag in a future
> release.
>

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.

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

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.

After further investigations, I didn't find this Print window (I have
> attached in my 1st mail) in any application on my system.
> 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.
>

Yes, it's in nw.js (which is basically Chromium + Node.js).

Albert


> Best, Joseph
> - - - - - - - - - -
>
> Le 22/10/2020 à 11:58, Albert Graef a écrit :
>
> Hi Joseph,
>
> On Tue, Oct 20, 2020 at 1:57 AM Linux ROUEN Normandie <linux.rouen at free.fr>
> wrote:
>
>> 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.
>>
>
> 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.
>
> 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?
>>
>
> The API which nw.js provided for this purpose at the time (
> https://nwjs.readthedocs.io/en/nw19/References/Window/#winprintoptions)
> 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.
>
> I'll look into it as soon as I find the time.
>
> Albert
>
> Then, the PDF file saving will have to be done from this window.
>>
>> Thanks. Best,
>> Joseph Gastelais
>>
>
> --
> Dr. Albert Gr"af
> Computer Music Research Group, JGU Mainz, Germany
> Email: aggraef at gmail.com, web: https://agraef.github.io/
>
> _______________________________________________
> L2Ork-dev mailing listL2Ork-dev at disis.music.vt.eduhttps://disis.music.vt.edu/listinfo/l2ork-dev
>
>
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> https://disis.music.vt.edu/listinfo/l2ork-dev



-- 
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany
Email: aggraef at gmail.com, web: https://agraef.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://disis.music.vt.edu/pipermail/l2ork-dev/attachments/20201023/f0524bbf/attachment.html>


More information about the L2Ork-dev mailing list