generate PDF for custom paper size

This commit is contained in:
James Feng Cao 2022-12-08 16:15:22 +08:00
parent b0aaa72b31
commit 732adfa362
15 changed files with 79 additions and 67 deletions

View file

@ -5,7 +5,18 @@
<link>/en/_posts/</link>
<description>Recent content in _posts on uweb browser</description>
<generator>Hugo -- gohugo.io</generator>
<lastBuildDate>Sun, 30 Oct 2022 00:00:00 +0000</lastBuildDate><atom:link href="/en/_posts/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Fri, 25 Nov 2022 00:00:00 +0000</lastBuildDate><atom:link href="/en/_posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Offline resources</title>
<link>/en/offlinecache/</link>
<pubDate>Fri, 25 Nov 2022 00:00:00 +0000</pubDate>
<guid>/en/offlinecache/</guid>
<description>Click to install url service that extracts web apps to the folder &amp;quot;sitecache/local/&amp;quot;: support web extensions (.crx for chrome &amp;amp; .xpi for firefox).
Offline resources locate in the folder &amp;quot;sitecache&amp;quot;. With the option &amp;quot;use offline resources&amp;quot; enabled, the corresponding files in &amp;quot;sitecache/[domain name]/[full path including filename, the url path part]&amp;quot; are loaded first before reaching the network.
PWAs (Progresssive Web Applications) and some web extensions (.crx for chrome &amp;amp; .xpi for firefox) are just packaged websites.</description>
</item>
<item>
<title>Make any url as website</title>
<link>/en/url2site/</link>
@ -16,17 +27,6 @@
&amp;quot;i:0m04:[url]&amp;quot;: to treat the [url] content as html with bookmarklet. &amp;quot;i:0mi:5h:[url]&amp;quot;: to treat the [url] content as html (for download or no-script links etc.) &amp;quot;i:0mi:5h?[postfix]::[url]&amp;quot;: auto append query postfix to url to retrieve content. &amp;quot;i:0mi:5h/[regex]/[replacement]::[url]&amp;quot;: use the result of regular expression replacement to retrieve the content.</description>
</item>
<item>
<title>Offline resources</title>
<link>/en/offlinecache/</link>
<pubDate>Thu, 20 Oct 2022 00:00:00 +0000</pubDate>
<guid>/en/offlinecache/</guid>
<description>Click to install url service that extracts web apps to the folder &amp;quot;sitecache/local/&amp;quot;: support web extensions (.crx for chrome &amp;amp; .xpi for firefox).
Offline resources locate in the folder &amp;quot;sitecache&amp;quot;. With the option &amp;quot;use offline resources&amp;quot; enabled, the corresponding files in &amp;quot;sitecache/[domain name]/[full path including filename, &#39;?&#39; , &#39;&amp;amp;&#39; , &#39;=&#39;. exactly as url]&amp;quot; are loaded first before reaching the network.
PWAs (Progresssive Web Applications) and some web extensions (.crx for chrome &amp;amp; .</description>
</item>
<item>
<title>Html5 applications</title>
<link>/en/html5/</link>

View file

@ -49,6 +49,8 @@
<p><a href="https://releases.pagure.org/uweb/">pagure</a></p>
<p><a href="https://sourceforge.net/projects/uwebbrowser/files/v1/">sourceforge</a></p>
<h4 id="change-logs">Change logs</h4>
<p>948: Address bar: &quot;:p [width in milliInch]x[height]&quot; to generate PDF in custom size<br>
946: Option &quot;use offline cache&quot; to support serverless local websites.</p>
<p>945: commands to support evaluation of generated js code.</p>
<p>943: Multiple home screens support .mht (offline webpage), .search &amp; .html local files.</p>
<p>940: <a href="../url2site/index.html">Any url as website</a> with local html processing (<a href="../links/index.html">&quot;i:0m/..../xxx.html:url&quot;</a>)</p>

View file

@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<meta name="generator" content="Hugo 0.105.0">
<meta name="generator" content="Hugo 0.108.0">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
@ -85,14 +85,14 @@
<li class="post">
<a href="url2site/index.html">
<span>Make any url as website</span>
<a href="offlinecache/index.html">
<span>Offline resources</span>
</a>
</li>
<li class="post">
<a href="offlinecache/index.html">
<span>Offline resources</span>
<a href="url2site/index.html">
<span>Make any url as website</span>
</a>
</li>

View file

@ -5,7 +5,18 @@
<link>/en/</link>
<description>Recent content on uweb browser</description>
<generator>Hugo -- gohugo.io</generator>
<lastBuildDate>Sun, 30 Oct 2022 00:00:00 +0000</lastBuildDate><atom:link href="/en/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Fri, 25 Nov 2022 00:00:00 +0000</lastBuildDate><atom:link href="/en/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Offline resources</title>
<link>/en/offlinecache/</link>
<pubDate>Fri, 25 Nov 2022 00:00:00 +0000</pubDate>
<guid>/en/offlinecache/</guid>
<description>Click to install url service that extracts web apps to the folder &amp;quot;sitecache/local/&amp;quot;: support web extensions (.crx for chrome &amp;amp; .xpi for firefox).
Offline resources locate in the folder &amp;quot;sitecache&amp;quot;. With the option &amp;quot;use offline resources&amp;quot; enabled, the corresponding files in &amp;quot;sitecache/[domain name]/[full path including filename, the url path part]&amp;quot; are loaded first before reaching the network.
PWAs (Progresssive Web Applications) and some web extensions (.crx for chrome &amp;amp; .xpi for firefox) are just packaged websites.</description>
</item>
<item>
<title>Make any url as website</title>
<link>/en/url2site/</link>
@ -16,17 +27,6 @@
&amp;quot;i:0m04:[url]&amp;quot;: to treat the [url] content as html with bookmarklet. &amp;quot;i:0mi:5h:[url]&amp;quot;: to treat the [url] content as html (for download or no-script links etc.) &amp;quot;i:0mi:5h?[postfix]::[url]&amp;quot;: auto append query postfix to url to retrieve content. &amp;quot;i:0mi:5h/[regex]/[replacement]::[url]&amp;quot;: use the result of regular expression replacement to retrieve the content.</description>
</item>
<item>
<title>Offline resources</title>
<link>/en/offlinecache/</link>
<pubDate>Thu, 20 Oct 2022 00:00:00 +0000</pubDate>
<guid>/en/offlinecache/</guid>
<description>Click to install url service that extracts web apps to the folder &amp;quot;sitecache/local/&amp;quot;: support web extensions (.crx for chrome &amp;amp; .xpi for firefox).
Offline resources locate in the folder &amp;quot;sitecache&amp;quot;. With the option &amp;quot;use offline resources&amp;quot; enabled, the corresponding files in &amp;quot;sitecache/[domain name]/[full path including filename, &#39;?&#39; , &#39;&amp;amp;&#39; , &#39;=&#39;. exactly as url]&amp;quot; are loaded first before reaching the network.
PWAs (Progresssive Web Applications) and some web extensions (.crx for chrome &amp;amp; .</description>
</item>
<item>
<title>Html5 applications</title>
<link>/en/html5/</link>
@ -59,12 +59,13 @@ uweb, termux &amp;amp; history versions
github
pagure
sourceforge
Change logs 945: commands to support evaluation of generated js code.
Change logs 948: Address bar: &amp;quot;:p [width in milliInch]x[height]&amp;quot; to generate PDF in custom size
946: Option &amp;quot;use offline cache&amp;quot; to support serverless local websites.
945: commands to support evaluation of generated js code.
943: Multiple home screens support .mht (offline webpage), .search &amp;amp; .html local files.
940: Any url as website with local html processing (&amp;quot;i:0m/..../xxx.html:url&amp;quot;)
935:
Pipe support: command line output to uweb tabs. 934:
Serverless local sites: PWA-kind web extension (chrome .crx &amp;amp; firefox .xpi) support. PWAs and web extensions to be used as search engines, ex.</description>
Pipe support: command line output to uweb tabs.</description>
</item>
<item>

View file

@ -96,6 +96,11 @@ Config http proxy, &quot;:010:&quot; to disable any proxy.</p>
Socks proxy</p>
</li>
</ul>
<h4 id="commands">commands</h4>
<ul>
<li>:p [width in milliInch]x[height in milliInch]<br>
Generate/Print PDF file in the &quot;/sdcard/Download&quot; folder.</li>
</ul>
<h3 id="i-internal-links">&quot;i:&quot; internal links:</h3>
<ul>
<li>

View file

@ -48,8 +48,10 @@
</ul>
<p><a href="i:01Extract webapp:i:0bsitecache/local/:">Click to install url service that extracts web apps to the folder &quot;sitecache/local/&quot;</a>: support web extensions (.crx for chrome &amp; .xpi for firefox).</p>
<p>Offline resources locate in the folder &quot;sitecache&quot;. With the option &quot;use offline resources&quot; enabled, the corresponding files in &quot;sitecache/[domain name]/[full path including filename, '?' , '&amp;' , '='. exactly as url]&quot; are loaded first before reaching the network.</p>
<p>Offline resources locate in the folder &quot;sitecache&quot;. With the option &quot;use offline resources&quot; enabled, the corresponding files in &quot;sitecache/[domain name]/[full path including filename, the url path part]&quot; are loaded first before reaching the network.</p>
<p>PWAs (Progresssive Web Applications) and some web extensions (.crx for chrome &amp; .xpi for firefox) are just packaged websites. Ex. the &quot;kiwix&quot; extension can be extracted to the folder &quot;sitecache/local/kiwix&quot;<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>, then the kiwix extension can be accessed via url &quot;https://local/kiwix/www/index.html&quot; in the browser.</p>
<h4 id="serverless-local-sites">Serverless local sites</h4>
<p>Any folder under &quot;sitecache&quot; can be visited as a local site. Urls with search queries can be dynamically processed by the js/wasm code in the local file.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>

View file

@ -3,7 +3,7 @@
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>/en/_posts/</loc>
<lastmod>2022-10-30T00:00:00+00:00</lastmod>
<lastmod>2022-11-25T00:00:00+00:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -15,11 +15,21 @@
href="/en/_posts/"
/>
</url><url>
<loc>/en/url2site/</loc>
<lastmod>2022-10-30T00:00:00+00:00</lastmod>
<loc>/en/offlinecache/</loc>
<lastmod>2022-11-25T00:00:00+00:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/offlinecache/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/offlinecache/"
/>
</url><url>
<loc>/en/</loc>
<lastmod>2022-10-30T00:00:00+00:00</lastmod>
<lastmod>2022-11-25T00:00:00+00:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -31,18 +41,8 @@
href="/en/"
/>
</url><url>
<loc>/en/offlinecache/</loc>
<lastmod>2022-10-20T00:00:00+00:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/offlinecache/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/offlinecache/"
/>
<loc>/en/url2site/</loc>
<lastmod>2022-10-30T00:00:00+00:00</lastmod>
</url><url>
<loc>/en/html5/</loc>
<lastmod>2022-10-02T00:00:00+00:00</lastmod>

View file

@ -17,12 +17,13 @@ uweb, termux &amp;amp; history versions
github
pagure
sourceforge
Change logs 945: commands to support evaluation of generated js code.
Change logs 948: Address bar: &amp;quot;:p [width in milliInch]x[height]&amp;quot; to generate PDF in custom size
946: Option &amp;quot;use offline cache&amp;quot; to support serverless local websites.
945: commands to support evaluation of generated js code.
943: Multiple home screens support .mht (offline webpage), .search &amp;amp; .html local files.
940: Any url as website with local html processing (&amp;quot;i:0m/..../xxx.html:url&amp;quot;)
935:
Pipe support: command line output to uweb tabs. 934:
Serverless local sites: PWA-kind web extension (chrome .crx &amp;amp; firefox .xpi) support. PWAs and web extensions to be used as search engines, ex.</description>
Pipe support: command line output to uweb tabs.</description>
</item>
<item>