Exemplo n.º 1
0
 def _process( self ):
     tz = self._conf.getTimezone()
     filename = "%s - Abstract.pdf"%self._target.getTitle()
     pdf = TrackManagerAbstractToPDF(self._conf, self._abstract, self._track, tz=tz)
     data = pdf.getPDFBin()
     #self._req.headers_out["Accept-Ranges"] = "bytes"
     self._req.headers_out["Content-Length"] = "%s"%len(data)
     cfg = Config.getInstance()
     mimetype = cfg.getFileTypeMimeType( "PDF" )
     self._req.content_type = """%s"""%(mimetype)
     self._req.headers_out["Content-Disposition"] = """inline; filename="%s\""""%filename
     return data
Exemplo n.º 2
0
 def _process(self):
     tz = self._conf.getTimezone()
     filename = "%s - Abstract.pdf" % self._target.getTitle()
     pdf = TrackManagerAbstractToPDF(self._abstract, self._track, tz=tz)
     return send_file(filename, pdf.generate(), 'PDF')
Exemplo n.º 3
0
 def _process(self):
     tz = self._conf.getTimezone()
     filename = "%s - Abstract.pdf" % self._target.getTitle()
     pdf = TrackManagerAbstractToPDF(self._conf, self._abstract, self._track, tz=tz)
     return send_file(filename, StringIO(pdf.getPDFBin()), "PDF")