예제 #1
0
 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')
예제 #2
0
 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
예제 #3
0
 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
예제 #4
0
파일: trackModif.py 프로젝트: NIIF/indico
 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')
예제 #5
0
 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")