There are a number of libraries that allow you to build a PDF file. What I wanted to do was to (dynamically) convert an existing (html) output into a PDF without having to do a bunch of additional work.
I found a way to do that using something called html2pdf. It isn't overly well documented and it isn't totally flexible but it works. I had to adjust my html a bit to get it to work but it now produces a pretty faithful PDF copy of my output report.
I think that providing a PDF option is often an add-on to producing a report on the screen. Using a utility like this to do the conversion makes a lot of sense to me.