Getting more height for embedded PDF Tiddlers

Continuing the discussion from Custom Styles Based of a Field of Tiddler:

Hi,

I am just sharing my solution to a problem that I was having. By default, when you embed external PDFs in a tiddler via _canonical_uri (and possibly viewing any PDF), the tiddler window height is rather short and is like reading through a letter slot.

My solution using my cargo-cult knowledge of CSS and @Mohammad 's excellent tip (linked) was to add the following to a tiddler tagged with $:/tags/Stylesheet :

\define pdf-css()
\rules only
[data-tiddler-title="$(currentTiddler)$"] .tc-tiddler-body > embed, .tc-tiddler-body > iframe {
  height: 80vh;
}
\end
<$list filter="[all[tiddlers]type[application/pdf]]">
<<pdf-css>><br>
</$list>

Now the PDF tiddlers have most of the vertical screen real estate available to them.

/Mike

6 Likes