Use mutool draw for previewing PDFs
MuPDF's mutool draw command produces a decently high-resolution image form of a PDF. It can be specified to only produce an image of the first page, which would be nice for previewing PDFs.
Quick demo (after installing MuPDF):
$ mutool draw -o pdf-preview.png julia-1.5.0.pdf 1 # can add 2>/dev/null
page julia-1.5.0.pdf 1
$ kitty +kitten icat pdf-preview.png
Or directly through stdout:
mutool draw -o - julia-1.5.0.pdf 1 2>/dev/null | kitty +kitten icat
PDF previews would allow me to use broot as my main file browser, I hope it can be added! In addition to mutool, the Kitty icat method may be of interest. It uses ImageMagick to open both images and pdfs. (For a pdf, one generally needs a white background.)
kitty +kitten icat --background white stuff.pdf
PDF previews would allow me to use broot as my main file browser, I hope it can be added! In addition to mutool, the Kitty icat method may be of interest. It uses ImageMagick to open both images and pdfs. (For a pdf, one generally needs a white background.)
kitty +kitten icat --background white stuff.pdf
Just discovered Broot. Amazing application. PDF previews are literately the only missing feature.