code: def printFromHTML(self, sr_html):
          
          # HTML written to debug file
          debug_mode = App.config.getConfiguration().debug_mode
          if debug_mode:
              tmp_fn = tempfile.mktemp(suffix=".html")
              open(tmp_fn, "wb").write(sr_html)
  
          # Creates the pdf
          # we must supply the file ourself so that createPdf leaves it alone.
          pdf_fn = tempfile.mktemp(suffix=".pdf")
          pdf_report = createPdf(htmlreport=sr_html, outfile=pdf_fn)
          return pdf_report
docs: Tis function generates a pdf file from the html
          :sr_html: the html to use to generate the pdf