A tutorial for using troff to format PDF files in Linux was published by MakeTechEasier.
How to Use Troff to Format PDF Documents in Linux
Troff is a minimal yet powerful document text processor for Linux systems. It allows you to easily create print-ready documents by compiling source files from the command line. Unlike LaTeX, Troff is incredibly lightweight and is preinstalled on most Linux systems. This tutorial shows you how to use Troff to format PDF documents in Ubuntu.
How to Use Troff to Format PDF Documents in Linux