Exemple #1
0
 def __init__(self, template, config):
     self.config = self._build_config(config)
     self.template = template
     self.tpl_data = self._process_tpl_data(template.data)
     self.page_size = getattr(pagesizes, self.config.page_size.name)
     if self.config.page_orientation == PageOrientation.landscape:
         self.page_size = pagesizes.landscape(self.page_size)
     self.width, self.height = self.page_size
     setTTFonts()
Exemple #2
0
 def __init__(self, template, config):
     self.config = self._build_config(config)
     self.template = template
     self.tpl_data = self._process_tpl_data(template.data)
     self.backside_tpl_data = None
     if template.backside_template:
         self.backside_tpl_data = self._process_tpl_data(template.backside_template.data)
     self.page_size = getattr(pagesizes, self.config.page_size.name)
     if self.config.page_orientation == PageOrientation.landscape:
         self.page_size = pagesizes.landscape(self.page_size)
     self.width, self.height = self.page_size
     setTTFonts()
Exemple #3
0
 def __init__(self, template, config):
     self.config = self._build_config(config)
     self.template = template
     self.tpl_data = self._process_tpl_data(template.data)
     self.backside_tpl_data = None
     if template.backside_template:
         self.backside_tpl_data = self._process_tpl_data(
             template.backside_template.data)
     self.page_size = self.config.page_size.size
     if self.config.page_orientation == PageOrientation.landscape:
         self.page_size = pagesizes.landscape(self.page_size)
     self.width, self.height = self.page_size
     setTTFonts()