Saving a web page to PDF

The shot-scraper pdf command saves a PDF version of a web page - the equivalent of using Print -> Save to PDF in Chromium.

shot-scraper pdf

This will save to datasette-io.pdf. You can use -o to specify a filename:

shot-scraper pdf \
  -o learn-sql.pdf

shot-scraper pdf –help

Full --help for this command:

Usage: shot-scraper pdf [OPTIONS] URL

  Create a PDF of the specified page


      shot-scraper pdf

  Use -o to specify a filename:

      shot-scraper pdf -o datasette.pdf

  -a, --auth FILENAME    Path to JSON authentication context file
  -o, --output FILE
  -j, --javascript TEXT  Execute this JS prior to creating the PDF
  --wait INTEGER         Wait this many milliseconds before taking the
  --media-screen         Use screen rather than print styles
  --landscape            Use landscape orientation
  -h, --help             Show this message and exit.