Hello group,
I include quite a few pdfs in my tiddlers and this has seems to cause huge
memory usage - not so much by TW but more the many instanced pdf.js (well
around 7 pdf.js instances per tiddler).
Each pdf is transcluded from their own tiddler, which looks like this:
\define linkpdf(projectid, path, file, title, description)
<center>
<iframe src="./attachments/$projectid$/$path$/$file$"
type="application/pdf" width="100%" height="500px"/><br>
//[[$title$]]// -- <br>$description$<br>
</center>
\end
<$macrocall $name=linkpdf projectid = {{!!project-id}} path={{!!path}}
file={{!!file-name}} title={{!!title}} description={{!!description}}/>
Project-id, path, file-name and title are all fields in the tiddler.
In the main tiddler the pdf is transcluded by {{pdf tiddler}}.
Is there a way of triggering the transclusion?
I could replace transclusions with links and that way open the tiddlers by
demand, but I would prefer to keep them in the same tiddler where
additional attached is displayed. Also, the title of the pdf-tiddlers are
meant to be unique rather than human readable since they contain the result
of some analysis. Is there an easy way of providing a link title, for
instance the '//[[$title$]]// -- $description$' in the code above, or must
I always do [Readable|non readable tiddler title]?
One way could be to include some javascript in the pdf-tiddler where the
source of the iframe is loaded onclick, but it would be nicer if this is
handled else where - I imagine there may be times when a single tiddler
transcludes just two pdfs for comparison, and that this should be onload.
Is transclusion through a template possible? The template could then
contain an onclick macro using elements from the transcluded pdf tiddler
for meaning full display?
Are there any suggestions?
Thanks.
Cheers,
Ulrik
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.