Hey people! I want to learn typst, a modern alternative to LaTeX written in Rust.
Typst can incrementally compile the files to PDF.
Ironically, there is no incrementally refreshing PDF viewer afaik. So for direct visual output of my progress, I would like the fastest, smoothest PDF viewer.
- Firefox loads too slow
- Okular fast (thanks for the tips guys), just flickering scrollbar and background icon
It can be as small and minimal for that task as possible.
Priorities:
- No flicker (no text re-alignment, no disappearing scroll bars, no changing UI)
- Fast refresh
- Smooth text refresh (maybe with a fade in)
- Generally solid
To test:
- evince / GNOME Document viewer
- atril
- mupdf
- zathura
- gv
Barebones:
Somehow monitor for changes
- pipdf (GTK4, but unmaintained)
- pdf_render (very minimal, maintained)
- pdf2pwg (needs
cargo add
andcargo build
, only A4 pages which seems totally sufficient) - pdf_renderer (security focused, pure Rust, may crash, incomplete)
I think Evince and Atril have a setting for that? Or was it mupdf? Else you could script something with
inotifywait
orwatch
.Btw, just googled it,
less
automatically uses lesspipe with pdftotext, sowatch -n 2 less your.pdf
works. Then there’sfbpdf
andfbgs
offbi
.Could you explain? less would just monitor the binary PDF for changes and then pass that to any viewer?
I think this is really helpful for barebones renderers, thanks! That will be a very good piece of the puzzle for a minimal PDF reader for this task
No, less has the LESSOPEN variable, which can be used to run input-preprocessors. lesspipe misuses that to run specific tools with specific mimetypes, in this case pdftotext for pdf files. It’s basically equivalent to running
pdftotext -layout <file.pdf> | less
. Though no images, for that the other tools.