def add_page(self, orientation='<STR_LIT>'):
if(self.state==<NUM_LIT:0>):<EOL><INDENT>self.open()<EOL><DEDENT>family=self.font_family<EOL>if self.underline:<EOL><INDENT>style = self.font_style + '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>style = self.font_style<EOL><DEDENT>size=self.font_size_pt<EOL>lw=self.line_width<EOL>dc=self.draw_color<EOL>fc=self.fill_color<EOL>tc=self.text_color<EOL>cf=self.color_flag<EOL>if(self.page><NUM_LIT:0>):<EOL><INDENT>self.in_footer=<NUM_LIT:1><EOL>self.footer()<EOL>self.in_footer=<NUM_LIT:0><EOL>self._endpage()<EOL><DEDENT>self._beginpage(orientation)<EOL>self._out('<STR_LIT>')<EOL>self.line_width=lw<EOL>self._out(sprintf('<STR_LIT>',lw*self.k))<EOL>if(family):<EOL><INDENT>self.set_font(family,style,size)<EOL><DEDENT>self.draw_color=dc<EOL>if(dc!='<STR_LIT>'):<EOL><INDENT>self._out(dc)<EOL><DEDENT>self.fill_color=fc<EOL>if(fc!='<STR_LIT>'):<EOL><INDENT>self._out(fc)<EOL><DEDENT>self.text_color=tc<EOL>self.color_flag=cf<EOL>self.header()<EOL>if(self.line_width!=lw):<EOL><INDENT>self.line_width=lw<EOL>self._out(sprintf('<STR_LIT>',lw*self.k))<EOL><DEDENT>if(family):<EOL><INDENT>self.set_font(family,style,size)<EOL><DEDENT>if(self.draw_color!=dc):<EOL><INDENT>self.draw_color=dc<EOL>self._out(dc)<EOL><DEDENT>if(self.fill_color!=fc):<EOL><INDENT>self.fill_color=fc<EOL>self._out(fc)<EOL><DEDENT>self.text_color=tc<EOL>self.color_flag=cf<EOL>
Start a new page