25 lines
1.4 KiB
XML
25 lines
1.4 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" width="550" height="425" viewBox="0 0 550 425">
|
|
<rect width="550" height="425" fill="#FFFFFF" stroke="#AAAAAA" />
|
|
|
|
<text x="105" y="400">Page 5</text>
|
|
<text x="380" y="400">Page 6</text>
|
|
|
|
<foreignObject x="25" y="25" width="225" height="375">
|
|
<div xmlns="http://www.w3.org/1999/xhtml">
|
|
<b>Data URIs</b>
|
|
<p>Data URIs are a special URL format that allows for data to be stored directly in the URL itself, without any backing server.</p>
|
|
<p>They usually look like:</p>
|
|
<code>data:text/html;base64,...</code>
|
|
<code>data:image/png;base64,...</code>
|
|
<p>and are often embedded within webpages, but can be used by themselves and can contain more-or-less any file format, including (quite handily) zip files.</p>
|
|
</div>
|
|
</foreignObject>
|
|
|
|
<foreignObject x="300" y="25" width="225" height="375">
|
|
<div xmlns="http://www.w3.org/1999/xhtml">
|
|
<b>Putting It All Together</b>
|
|
<p>By putting SVG source into zip files, placing zip files into data URIs, putting data URIs into QR codes, and referencing the QR codes in the SVG source, we can magically store the source code of our zine in the zine itself more-or-less losslessly.</p>
|
|
<p>Some caveats apply, like needing software to process SVGs, QR codes, and the automation scripts, but those are hopefully less fragile than a difficult-to-edit PDF with a broken link.</p>
|
|
</div>
|
|
</foreignObject>
|
|
</svg>
|