title: Output a Document (preferably a PDF) from Python
body: <p>I've got a Python script (3.5) that will go through a whole battery of tests.  The user gets to select which tests get run out of N possible tests.  So, the user could run 1 tests up to N tests.</p>
  
  <p>Right now, I'm just outputting the results of the test to a plot with <code>matplotlib</code> and that looks OK, but they're just saved as individual files.  Also, the code has some PASS/FAIL criteria for each test.</p>
  
  <p>So, the issue is, I would like to use some tool with Python to output the whole story of the test sequence as a PDF.  I'd like to be able to keep some Boiler-Plate stuff and update some stuff in the middle....For example:</p>
  
  <p><code>Test was run for 7 minutes.  Maximum power was recorded as -69.5dBm.</code>
  <a href="https://i.stack.imgur.com/dvfOn.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dvfOn.jpg" alt="Graph"></a>
  The thing that is the same each time is:</p>
  
  <p><code>Test was run for   minutes.  Maximum power was recorded as     dBm.</code></p>
  
  <p>And, the number of minutes and the number for maximum power is pulled in from the results of the test.  Also, the graph is pulled in from 'matplotlib'.</p>
  
  <p>So, for each test, I'd like to append some Boiler-plate text, fill in some blanks with real data, and slap in an image where appropriate, and I'd like to do it with Python.</p>
  
  <p>I looked at some of the suggestions on SO, but for the most part it looks like the solutions are for appending or watermarking <em>existing</em> PDFs.  Also, Google turns up a lot of results for automating the generation of Python Code Documentation...Not Code for generating Documentation with Python.</p>
  
  <p>Reportlab looked promising, but it looks like it's been abandoned.</p>
  
  <p>Also, I'm not married to the requirement that the output be a PDF.  This is for internal use only, so there's some flexability.  HTML, Word or something else that can be converted to a PDF manually by the user afterwards is fine too.  I know PDFs can be somewhat troublesome due to their binary nature.</p>