Links to tiddlers, or internal links, are managed by JavaScript in TiddlyWiki. However, there are methods to control the href generation when exporting to static pages.
My inquiry is: when exporting two or three tiddlers to a PDF using the browser’s print and save to PDF functionality (no Node.JS), how can the href generation be controlled to ensure the internal links function correctly?
As far as I know that’s not possible at the moment, since browser printing does not use specific TW templates. Creating static pages does use specific templates, that are responsible to convert href for static pages.
I think you should post this at GitHub too and mention @jeremyruston here or @jermolene at Gighub.
I utilize a new page layout to print or save to PDF through the browser’s print to PDF functionality. This enables the use of a new $:/core/ui/ViewTemplate. Is it possible for this to control the href generation, similar to exporting to a page?
!! Normal tiddlywiki link to tiddler:
[[HelloThere]]
!! Tweaked link to tiddler:
<$let tv-filter-export-link="[[https://www.duckduckgo.com]]">
[[HelloThere]]
</$let>
Paste it in a new tiddler on tiddlywiki.com. Inside TW, both links point to HelloThere, but when exported to PDF, second link goes to www.duckduckgo.com
Very interesting. Of note is that in TW, the location in the status bar (I’m on Chrome/Windows at the moment) is duckduckgo, even though it actually simply opens the tiddler.
Same thing here, Firefox on linux.
I guess it’s a security related feature, the browser shows the “real” target of the link (even though js treatment of TW links actually redirects to the target tiddler instead of the href).