<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Marin Lagacé - Applications</title><link href="https://www.marinlagace.ca/en/" rel="alternate"></link><link href="https://www.marinlagace.ca/feeds/applications.atom.xml" rel="self"></link><id>https://www.marinlagace.ca/en/</id><updated>2020-12-06T14:39:00-05:00</updated><entry><title>Using 'less' to view PDFs</title><link href="https://www.marinlagace.ca/en/2020/using-less-to-view-pdfs.html" rel="alternate"></link><published>2020-12-06T14:39:00-05:00</published><updated>2020-12-06T14:39:00-05:00</updated><author><name>Marin</name></author><id>tag:www.marinlagace.ca,2020-12-06:/en/2020/using-less-to-view-pdfs.html</id><summary type="html">&lt;p class="first last"&gt;Using 'less' to view PDFs directly in Vifm.&lt;/p&gt;
</summary><content type="html">&lt;p&gt;I love &lt;a class="reference external" href="https://vifm.info"&gt;Vifm&lt;/a&gt;. One of the features I like the most it that
you can easily preview any text file by pressing the &lt;span class="kbd"&gt;e&lt;/span&gt; key. But I would
also like to preview a PDF directly in &lt;span class="app"&gt;Vifm&lt;/span&gt; without having to start up a
GUI viewer. The trick is to use an application that will output the PDF's text
directly to the console.&lt;/p&gt;
&lt;p&gt;I started looking for such an application when I came across &lt;a class="reference external" href="https://stackoverflow.com/a/9553096"&gt;this post&lt;/a&gt; from &lt;span class="app"&gt;StackOverflow&lt;/span&gt;. It seems that
good-old &lt;span class="app"&gt;less&lt;/span&gt; can already do that. So, I added the following line to my
&lt;span class="path"&gt;vifmrc&lt;/span&gt; file.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;fileviewer *.pdf
        \ less &amp;quot;%c&amp;quot;,
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I can now preview PDF files in &lt;span class="app"&gt;Vifm&lt;/span&gt; and it works pretty well.&lt;/p&gt;
&lt;img alt="Viewing Pdf With Less" class="align-center" src="https://www.marinlagace.ca/en/images/Viewing_Pdf_With_Less.png" /&gt;
&lt;!-- vim: ft=pelican.rst --&gt;
</content><category term="vifm"></category><category term="pdf"></category></entry></feed>