If anyone is as curious about how this works as I am, here's some info from the source:
<a href="https://github.com/dsanson/termpdf/blob/master/termpdf#L71" rel="nofollow">https://github.com/dsanson/termpdf/blob/master/termpdf#L71</a><p>Some notes on Tmux's support: <a href="https://groups.google.com/forum/#!topic/iterm2-discuss/PJzHwRMOWK4" rel="nofollow">https://groups.google.com/forum/#!topic/iterm2-discuss/PJzHw...</a><p>Here are some other weird extended escape codes supported by iTerm on Mac, such as notifications and setting clipboard contents:
<a href="https://www.iterm2.com/documentation-escape-codes.html" rel="nofollow">https://www.iterm2.com/documentation-escape-codes.html</a>
Coincidentally, just today my friend was talking about terminal based browser, and I opened w3m, only to discover that it displays images now. I still couldn't figure out how it does that, so thought I might as well just ask here as it seems to be doing something similar here.
I really wish devdraw would get real Plan9 behavior and 9term would gain readline-style interaction such that they would allow us to transition to a rich terminal which can host text and graphics natively. I know there are some hacks like this one or Terminology (Enlightenment project), but those are still hacks. If you've ever used a native Plan9 environment where running a graphical application from within a shell transforms the shell into the graphical application, you know what I mean. It's very natural to lose the distinction. Yes, there are some hacks and closed applications that do some of this, but those cannot be used universally. Sadly plan9port and their devdraw and drawterm create a separate window and do not transform the terminal.
I find it interesting that the screenshot resembles my Emacs session. Personally, I find terminal emulators to be a worse target for PDF viewers than Emacs buffers.
I'll check this when I get back on my Linux machine, but has anyone tried this in Termite (or Gnome Terminal since they use essentially the same terminal library).