def _process(self): tz = self._conf.getTimezone() if not self._abstractIds: return "No abstract to print" pdf = TrackManagerAbstractsToPDF(self._conf, self._track, self._abstractIds, tz=tz) return send_file('Abstracts.pdf', pdf.generate(), 'PDF')
def _process( self ): tz = self._conf.getTimezone() filename = "Abstracts.pdf" if not self._abstracts: return "No abstract to print" pdf = TrackManagerAbstractsToPDF(self._conf, self._track, self._abstracts,tz=tz) data = pdf.getPDFBin() self._req.set_content_length(len(data)) cfg = Config.getInstance() mimetype = cfg.getFileTypeMimeType( "PDF" ) self._req.content_type = """%s; name="%s\""""%(mimetype, filename ) self._req.headers_out["Content-Disposition"] = """inline; filename="%s\""""%filename return data
def _process( self ): tz = self._conf.getTimezone() filename = "Abstracts.pdf" if not self._abstractIds: return "No abstract to print" pdf = TrackManagerAbstractsToPDF(self._conf, self._track, self._abstractIds,tz=tz) data = pdf.getPDFBin() self._req.set_content_length(len(data)) cfg = Config.getInstance() mimetype = cfg.getFileTypeMimeType( "PDF" ) self._req.content_type = """%s; name="%s\""""%(mimetype, filename ) self._req.headers_out["Content-Disposition"] = """inline; filename="%s\""""%filename return data
def _process(self): tz = self._conf.getTimezone() if not self._abstractIds: return "No abstract to print" pdf = TrackManagerAbstractsToPDF(self._conf, self._track, self._abstractIds,tz=tz) return send_file('Abstracts.pdf', pdf.generate(), 'PDF')
def _process(self): tz = self._conf.getTimezone() if not self._abstractIds: return "No abstract to print" pdf = TrackManagerAbstractsToPDF(self._conf, self._track, self._abstractIds, tz=tz) return send_file("Abstracts.pdf", StringIO(pdf.getPDFBin()), "PDF")