#serve #pdf #live #browser #server #pdf-file #occurs

bin+lib pdf-live-server

Serve a PDF live while watching for changes and reloading the browser

2 releases

0.0.1 Aug 12, 2024
0.0.0 Aug 11, 2024

#20 in #occurs

MIT license

19KB
299 lines

PDF Live Server

I developed this for remote LaTeX editing with previewing.

Installation

cargo install pdf-live-server

Usage

$ pdf-live-server --help
Serve a PDF file live and reload the browser on changes

Usage: pdf-live-server [OPTIONS] --served-pdf <SERVED_PDF>

Options:
  -d, --watch-dir <WATCH_DIR>      Directory to watch for changes [default: ./]
  -f, --served-pdf <SERVED_PDF>    PDF file to serve. I also check its modified time to decide if changes occur
  -s, --socket-addr <SOCKET_ADDR>  Address to bind the server [default: 127.0.0.1:3000]
  -h, --help                       Print help

Dependencies

~17–26MB
~388K SLoC