title: Return PDF generated with FPDF in Flask
body: <p>I can generate a PDF with an image using the code below.  How can I return the generated PDF from a Flask route?</p>
  
  <pre><code>from fpdf import FPDF
  pdf = FPDF()
  img = input('enter file name')
  g = img + '.jpg'
  pdf.add_page()
  pdf.image(g, 50, 50)
  pdf.output(img + '.pdf', 'F')
  </code></pre>