@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix content: <http://purl.org/rss/1.0/modules/content/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

<https://lhero.org/portfolio/lh-save-down/>
  a sioc:Post ;
  dc:title "Using LH Save Down" ;
  dcterms:identifier 149962 ;
  dc:modified "2026-10-11T16:33:58Z"^^xsd:dateTime ;
  dc:created "2026-10-11T16:33:58Z"^^xsd:dateTime ;
  sioc:link <https://lhero.org/portfolio/lh-save-down/using-lh-save-down/> ;
  sioc:has_creator <https://lhero.org/author/1/#account> ;
  sioc:has_container <https://lhero.org/#posts> ;
  content:encoded """<ul class="lh_portfolio-meta"><li><strong>Part of:</strong> <a href="https://lhero.org/portfolio/lh-save-down/">LH Save Down</a></li></ul>
<h2 class="wp-block-heading">Installation</h2>



<ol class="wp-block-list"><li>Upload the <code>lh-save-down</code> folder to <code>/wp-content/plugins/</code>.</li><li>Run <code>composer install</code> inside the plugin directory (or use the LH MCP <code>run-composer</code> ability) to install mPDF and PHPePub into <code>vendor/</code>.</li><li>Activate the plugin.</li><li>Resave your permalinks (Settings, Permalinks) so the export feeds are registered.</li></ol>



<h2 class="wp-block-heading">Adding download links</h2>



<ul class="wp-block-list"><li><strong>Classic menus:</strong> Plain HTML, Plain Text, PDF and Epub appear as menu items under Appearance, Menus.</li><li><strong>Navigation blocks:</strong> the same four links are available by name in a navigation block&#8217;s inserter.</li></ul>



<p class="wp-block-paragraph">Shown on a single post or page, each link points at a signed download of that page in its format, with <code>rel="nofollow"</code>. On archives and other screens with no single post it is left out.</p>



<h2 class="wp-block-heading">Export URLs</h2>



<p class="wp-block-paragraph">Each format is a WordPress feed on the post&#8217;s permalink: <code>lh-save_down.html</code>, <code>lh-save_down.text</code>, <code>lh-save_down.pdf</code> and <code>lh-save_down.epub</code>. A request must also carry a valid <code>lh_save_down-token</code> query argument. The token is an HMAC of the post ID, the format and an expiry time, so it isn&#8217;t tied to any user or session and works until it expires. A request without a valid token gets an uncached 404. Build URLs through a menu or navigation link or through the <code>get-export-url</code> ability, rather than by hand.</p>



<h2 class="wp-block-heading">What is exported</h2>



<p class="wp-block-paragraph">When the block template displaying a post marks a document region (a block with the class <code>lh-md-content</code>) and LH Content Converter 2.3.0+ is active, the export renders that region, which carries its own title. Otherwise it renders the post title followed by the post content. PDF and EPUB document titles and file names always come from the post title.</p>



<h2 class="wp-block-heading">Customising the output</h2>



<p class="wp-block-paragraph">Copy a template from the plugin&#8217;s <code>templates/</code> directory to the root of the active theme or child theme and edit it there. The plugin uses the theme&#8217;s copy when one exists:</p>



<ul class="wp-block-list"><li><code>lh_save_down-html-post_template.php</code>: HTML, and EPUB, which wraps the same markup as XHTML.</li><li><code>lh_save_down-pdf-post_template.php</code>: PDF.</li><li><code>lh_save_down-text-post_template.php</code>: plain text.</li></ul>



<h2 class="wp-block-heading">Filters</h2>



<ul class="wp-block-list"><li><code>lh_save_down_token_ttl</code>: how long an export link stays valid, in seconds. Default <code>DAY_IN_SECONDS</code>.</li><li><code>lh_save_down_get_template_location</code>: the template file path for a format (<code>$location, $format</code>).</li><li><code>lh_save_down_get_site_lang</code>: the language declared in exports. Defaults to <code>get_bloginfo( 'language' )</code>.</li><li><code>lh_save_down_auto_script_to_lang</code>: turns on mPDF&#8217;s per-character script detection for multilingual content. Off by default because it is expensive; the PDF already picks a font for the site language.</li><li><code>lh_save_down_return_plugin_debugging_status</code>: debug logging.</li></ul>
"""^^rdf:XMLLiteral ;
  sioc:content """Part of: LH Save Down
Installation



Upload the lh-save-down folder to /wp-content/plugins/.Run composer install inside the plugin directory (or use the LH MCP run-composer ability) to install mPDF and PHPePub into vendor/.Activate the plugin.Resave your permalinks (Settings, Permalinks) so the export feeds are registered.



Adding download links



Classic menus: Plain HTML, Plain Text, PDF and Epub appear as menu items under Appearance, Menus.Navigation blocks: the same four links are available by name in a navigation block&#8217;s inserter.



Shown on a single post or page, each link points at a signed download of that page in its format, with rel="nofollow". On archives and other screens with no single post it is left out.



Export URLs



Each format is a WordPress feed on the post&#8217;s permalink: lh-save_down.html, lh-save_down.text, lh-save_down.pdf and lh-save_down.epub. A request must also carry a valid lh_save_down-token query argument. The token is an HMAC of the post ID, the format and an expiry time, so it isn&#8217;t tied to any user or session and works until it expires. A request without a valid token gets an uncached 404. Build URLs through a menu or navigation link or through the get-export-url ability, rather than by hand.



What is exported



When the block template displaying a post marks a document region (a block with the class lh-md-content) and LH Content Converter 2.3.0+ is active, the export renders that region, which carries its own title. Otherwise it renders the post title followed by the post content. PDF and EPUB document titles and file names always come from the post title.



Customising the output



Copy a template from the plugin&#8217;s templates/ directory to the root of the active theme or child theme and edit it there. The plugin uses the theme&#8217;s copy when one exists:



lh_save_down-html-post_template.php: HTML, and EPUB, which wraps the same markup as XHTML.lh_save_down-pdf-post_template.php: PDF.lh_save_down-text-post_template.php: plain text.



Filters



lh_save_down_token_ttl: how long an export link stays valid, in seconds. Default DAY_IN_SECONDS.lh_save_down_get_template_location: the template file path for a format ($location, $format).lh_save_down_get_site_lang: the language declared in exports. Defaults to get_bloginfo( 'language' ).lh_save_down_auto_script_to_lang: turns on mPDF&#8217;s per-character script detection for multilingual content. Off by default because it is expensive; the PDF already picks a font for the site language.lh_save_down_return_plugin_debugging_status: debug logging.
""" ;
  sioc:topic <https://lhero.org/?taxonomy=author&term=cap-1> .

<https://lhero.org/author/1/#account> rdfs:seeAlso <https://lhero.org/author/1/?feed=lhrdf&format=turtle> .
<https://lhero.org/?taxonomy=author&term=cap-1> rdfs:seeAlso <https://lhero.org/?taxonomy=author&term=cap-1&feed=lhrdf&format=turtle> .
