bin/code-to-pdf @ 34084ee62b4a

More
author Steve Losh <steve@stevelosh.com>
date Fri, 06 Nov 2020 11:01:07 -0500
parents 1d7d7c65d893
children (none)
#!/usr/bin/env bash

set -euo pipefail

TITLE="$1"
shift

enscript -1 --media=Letter \
    --toc \
    --header '%H - $N | | page $% of $= in file $v' \
    --fancy-header=sjl \
    --font "UbuntuMono-Regular@9" \
    --header-font "UbuntuMono-Bold@12" \
    --title "$TITLE" \
    --baselineskip 3 \
    --line-numbers \
    --highlight \
    --color \
    --mark-wrapped-lines=arrow \
    --margins=50:50:18:50 \
    --portrait \
    --output - \
    --word-wrap $* \
    | ps2pdf - code.pdf

    # --margins=20:40:30:30 \
    # --landscape \