<?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[Export Purr Data canvas as SVG?]]></title><description><![CDATA[<p>I am aware that there exists <a href="https://github.com/iem-projects/patch2svg-plugin" rel="nofollow">https://github.com/iem-projects/patch2svg-plugin</a> :</p>
<blockquote>
<p>This adds a new menu-item to the &quot;File&quot; menu: &quot;Save patch as SVG...&quot;</p>
<p>It allows you to save the current Pd patch as an SVG graphics.</p>
</blockquote>
<p>... which is exactly what I need - but for Purr Data. Since <code>patch2svg</code> is a TCL script for vanilla PD, and (<a href="https://agraef.github.io/purr-data-intro/Purr-Data-Intro.html" rel="nofollow">https://agraef.github.io/purr-data-intro/Purr-Data-Intro.html</a> mentions:</p>
<blockquote>
<p>Purr Data is Pd-l2ork with the Tcl/Tk GUI part ripped out and replaced with modern web technology. To these ends, it uses an open-source framework called nw.js a.k.a. “node-webkit”, which is essentially a stand-alone web browser engine (Chromium) combined with a JavaScript runtime (Node.js).</p>
</blockquote>
<p>... it seems, I can't really use <code>patch2svg</code> for Purr Data.</p>
<p>Then again, Purr Data should already be drawing everything in SVG, it seems, - so it seems there should be a way for it to save the patch canvas as SVG natively; but I cannot see an obvious way to do it ...</p>
<p>I can print to PDF from Purr Data, and then convert that to SVG using inkscape - but in that case all texts become &quot;curves&quot;/&quot;paths&quot;, and are not editable as texts ...</p>
<p>So, I was wondering - is there a way to export a patch in Purr Data as an SVG vector image (and preferably, with text information present)?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Apr 2026 20:10:58 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/13417.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 21 Apr 2021 21:46:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Export Purr Data canvas as SVG? on Wed, 21 Apr 2021 21:46:14 GMT]]></title><description><![CDATA[<p>I am aware that there exists <a href="https://github.com/iem-projects/patch2svg-plugin" rel="nofollow">https://github.com/iem-projects/patch2svg-plugin</a> :</p>
<blockquote>
<p>This adds a new menu-item to the &quot;File&quot; menu: &quot;Save patch as SVG...&quot;</p>
<p>It allows you to save the current Pd patch as an SVG graphics.</p>
</blockquote>
<p>... which is exactly what I need - but for Purr Data. Since <code>patch2svg</code> is a TCL script for vanilla PD, and (<a href="https://agraef.github.io/purr-data-intro/Purr-Data-Intro.html" rel="nofollow">https://agraef.github.io/purr-data-intro/Purr-Data-Intro.html</a> mentions:</p>
<blockquote>
<p>Purr Data is Pd-l2ork with the Tcl/Tk GUI part ripped out and replaced with modern web technology. To these ends, it uses an open-source framework called nw.js a.k.a. “node-webkit”, which is essentially a stand-alone web browser engine (Chromium) combined with a JavaScript runtime (Node.js).</p>
</blockquote>
<p>... it seems, I can't really use <code>patch2svg</code> for Purr Data.</p>
<p>Then again, Purr Data should already be drawing everything in SVG, it seems, - so it seems there should be a way for it to save the patch canvas as SVG natively; but I cannot see an obvious way to do it ...</p>
<p>I can print to PDF from Purr Data, and then convert that to SVG using inkscape - but in that case all texts become &quot;curves&quot;/&quot;paths&quot;, and are not editable as texts ...</p>
<p>So, I was wondering - is there a way to export a patch in Purr Data as an SVG vector image (and preferably, with text information present)?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg</guid><dc:creator><![CDATA[sdaau_ml]]></dc:creator><pubDate>Wed, 21 Apr 2021 21:46:14 GMT</pubDate></item><item><title><![CDATA[Reply to Export Purr Data canvas as SVG? on Sat, 24 Apr 2021 22:59:39 GMT]]></title><description><![CDATA[<p>Hm, this should be super simple to implement.</p>
<p>In the meantime, you should be able to choose &quot;Help&quot; -&gt; &quot;Open DevTools&quot;, click the Elements tab, then right-click the svg element and choose &quot;Copy Outer HTML&quot;</p>
<p>Then paste it into an editor and save it with &quot;.svg&quot; at the end.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg/2</guid><dc:creator><![CDATA[jancsika]]></dc:creator><pubDate>Sat, 24 Apr 2021 22:59:39 GMT</pubDate></item><item><title><![CDATA[Reply to Export Purr Data canvas as SVG? on Sat, 24 Apr 2021 23:14:24 GMT]]></title><description><![CDATA[<p>Oops, I forgot about the CSS styling and fonts. Let me investigate.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg/3</guid><dc:creator><![CDATA[jancsika]]></dc:creator><pubDate>Sat, 24 Apr 2021 23:14:24 GMT</pubDate></item><item><title><![CDATA[Reply to Export Purr Data canvas as SVG? on Sun, 25 Apr 2021 08:53:40 GMT]]></title><description><![CDATA[<p>Awesome, many thanks <a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/jancsika">@jancsika</a> :</p>
<blockquote>
<p>In the meantime, you should be able to choose &quot;Help&quot; -&gt; &quot;Open DevTools&quot;,</p>
</blockquote>
<p>Nice, Chome developer console -- was looking for that as soon as I read Chromium, but could not otherwise find it <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /></p>
<p>Btw, it is called &quot;Help&quot; -&gt; &quot;Show DevTools&quot; in my PurrData 2.15.2</p>
<blockquote>
<p>Oops, I forgot about the CSS styling and fonts. Let me investigate.</p>
</blockquote>
<p>Yup, just tried it myself, fonts on [cnv] canvas seem fine, but not on regular objects; also some extension objects, and also abstractions, are rendered fully black. Also connector lines are missing.</p>
<p>Thanks for looking into this!</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg/4</guid><dc:creator><![CDATA[sdaau_ml]]></dc:creator><pubDate>Sun, 25 Apr 2021 08:53:40 GMT</pubDate></item><item><title><![CDATA[Reply to Export Purr Data canvas as SVG? on Sun, 25 Apr 2021 13:56:01 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-a" href="http://forum.pdpatchrepo.info/user/sdaau_ml">@sdaau_ml</a> Yeah, there are a few options here:</p>
<ol>
<li>Quick-and-dirty: I can go ahead set svg presentation attributes for object background and line stroke color to sane defaults. That way when you copy the outerhtml you'll get a readable patch in the default style (but no possibility to style the exported SVG according to the GUI presets). Those attys get overridden by CSS props so that should work with the current styling system.</li>
<li>I can insert the CSS stylesheet as CDATA in the svg. That adds about 10k to the file size, probably less if the SVG is optimized/minified. This way the current style can be applied, minus editmode grid/background image.</li>
<li>I can embed dejavu font in the SVG. That adds 337k to <em>every</em> exported SVG, but it's the only way to guarantee that the font is correctly chosen. It can probably be minified somehow but I'm not sure how to do that.</li>
</ol>
<p>Probably #2 is the best way to start.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg/5</guid><dc:creator><![CDATA[jancsika]]></dc:creator><pubDate>Sun, 25 Apr 2021 13:56:01 GMT</pubDate></item><item><title><![CDATA[Reply to Export Purr Data canvas as SVG? on Sun, 25 Apr 2021 15:33:02 GMT]]></title><description><![CDATA[<p>... in the meantime you can add styling to your SVG by adding this right below the opening <code>&lt;svg&gt;</code> tag:</p>
<pre><code>&lt;style type=&quot;text/css&quot;&gt;&lt;![CDATA[
svg {
    font-family: &quot;DejaVu Sans Mono&quot;;
}

.cord.signal {
    stroke-width: 2;
    stroke: #808095;
}

.cord.control {
    stroke-width: 1;
    stroke: #565;
}

.msg .border {
    stroke: #ccc;
    fill: #f8f8f6;
}

.obj .border {
    fill: #f6f8f8;
    stroke: #ccc;
}
]]&gt;&lt;/style&gt;

</code></pre>
<p>You'll just have to fish through the rest of the css stylesheet for other styles, but you get the idea...</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg/6</guid><dc:creator><![CDATA[jancsika]]></dc:creator><pubDate>Sun, 25 Apr 2021 15:33:02 GMT</pubDate></item><item><title><![CDATA[Reply to Export Purr Data canvas as SVG? on Sun, 25 Apr 2021 17:47:38 GMT]]></title><description><![CDATA[<p>Boy, I'd really like to go ahead and do <code>#3</code> above as well. Yes it makes the SVG obnoxiously large, but I think the benefit of controlling the font outweighs that cost. (And it appears optimizers can still get the file size back down to normal if needed.)</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/13417/export-purr-data-canvas-as-svg/7</guid><dc:creator><![CDATA[jancsika]]></dc:creator><pubDate>Sun, 25 Apr 2021 17:47:38 GMT</pubDate></item></channel></rss>