Format output as a [pdf] file, saving the output to a file

troff

  • Typesetting processor for the groff (GNU Troff) document formatting system.
    See also `groff`.
    More information: <https://manned.org/troff>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

troff -T {{pdf}} {{path/to/input.roff}} | gropdf > {{path/to/output.pdf}}

click the source code to copy install troff on any operating system with command-not-found.com