Example #1
0
 def pdf(self):
     pdf = RegistrantsListToPDF(self._conf, list=self._list, display=self._display)
     try:
         data = pdf.getPDFBin()
     except:
         raise FormValuesError( _("""Text too large to generate a PDF with "Table Style". Please try again generating with "Book Style"."""))
     return send_file('RegistrantsList.pdf', StringIO(data), 'PDF')
Example #2
0
 def pdf( self ):
     filename = "RegistrantsList.pdf"
     pdf = RegistrantsListToPDF(self._conf,list=self._list, display=self._display)
     data = pdf.getPDFBin()
     self._rh._req.set_content_length(len(data))
     cfg = Config.getInstance()
     mimetype = cfg.getFileTypeMimeType( "PDF" )
     self._rh._req.content_type = """%s"""%(mimetype)
     self._rh._req.headers_out["Content-Disposition"] = """inline; filename="%s\""""%filename
     return data
Example #3
0
 def _process(self):
     pdf = RegistrantsListToPDF(self.event, reglist=self.registrations, display=self.regform_items,
                                special_items=self.special_item_ids)
     try:
         data = pdf.getPDFBin()
     except Exception:
         if Config.getInstance().getDebug():
             raise
         raise FormValuesError(_("Text too large to generate a PDF with table style. "
                                 "Please try again generating with book style."))
     return send_file('RegistrantsList.pdf', BytesIO(data), 'PDF')
Example #4
0
 def _process(self):
     pdf = RegistrantsListToPDF(self._conf, reglist=self.registrations, display=self.export_config['regform_items'],
                                static_items=self.export_config['static_item_ids'])
     try:
         data = pdf.getPDFBin()
     except Exception:
         if Config.getInstance().getDebug():
             raise
         raise FormValuesError(_("Text too large to generate a PDF with table style. "
                                 "Please try again generating with book style."))
     return send_file('RegistrantsList.pdf', BytesIO(data), 'PDF')
Example #5
0
 def pdf(self):
     pdf = RegistrantsListToPDF(self._conf,
                                list=self._list,
                                display=self._display)
     try:
         data = pdf.getPDFBin()
     except:
         raise FormValuesError(
             _("""Text too large to generate a PDF with "Table Style". Please try again generating with "Book Style"."""
               ))
     return send_file('RegistrantsList.pdf', StringIO(data), 'PDF')
Example #6
0
 def pdf( self ):
     filename = "RegistrantsList.pdf"
     pdf = RegistrantsListToPDF(self._conf,list=self._list, display=self._display)
     try:
         data = pdf.getPDFBin()
     except:
         raise FormValuesError( _("""Text too large to generate a PDF with "Table Style". Please try again generating with "Book Style"."""))
     self._rh._req.set_content_length(len(data))
     cfg = Config.getInstance()
     mimetype = cfg.getFileTypeMimeType( "PDF" )
     self._rh._req.content_type = """%s"""%(mimetype)
     self._rh._req.headers_out["Content-Disposition"] = """inline; filename="%s\""""%filename
     return data
Example #7
0
 def pdf( self ):
     filename = "RegistrantsList.pdf"
     pdf = RegistrantsListToPDF(self._conf,list=self._list, display=self._display)
     try:
         data = pdf.getPDFBin()
     except:
         raise FormValuesError( _("""Text too large to generate a PDF with "Table Style". Please try again generating with "Book Style"."""))
     self._rh._req.set_content_length(len(data))
     cfg = Config.getInstance()
     mimetype = cfg.getFileTypeMimeType( "PDF" )
     self._rh._req.content_type = """%s"""%(mimetype)
     self._rh._req.headers_out["Content-Disposition"] = """inline; filename="%s\""""%filename
     return data
Example #8
0
 def pdf(self):
     filename = "RegistrantsList.pdf"
     pdf = RegistrantsListToPDF(self._conf,
                                list=self._list,
                                display=self._display)
     data = pdf.getPDFBin()
     self._rh._req.set_content_length(len(data))
     cfg = Config.getInstance()
     mimetype = cfg.getFileTypeMimeType("PDF")
     self._rh._req.content_type = """%s""" % (mimetype)
     self._rh._req.headers_out[
         "Content-Disposition"] = """inline; filename="%s\"""" % filename
     return data