def Printer_Preview(self, event=None):
po1  = PrintoutWx(self, width=self.printer_width,<EOL>margin=self.printer_margin)<EOL>po2  = PrintoutWx(self, width=self.printer_width,<EOL>margin=self.printer_margin)<EOL>self.preview = wx.PrintPreview(po1,po2,self.printerData)<EOL>if not self.preview.Ok():  print("<STR_LIT>")<EOL>self.preview.SetZoom(<NUM_LIT:50>)<EOL>frameInst= self<EOL>while not isinstance(frameInst, wx.Frame):<EOL><INDENT>frameInst= frameInst.GetParent()<EOL><DEDENT>frame = wx.PreviewFrame(self.preview, frameInst, "<STR_LIT>")<EOL>frame.Initialize()<EOL>frame.SetPosition(self.GetPosition())<EOL>frame.SetSize((<NUM_LIT>,<NUM_LIT>))<EOL>frame.Centre(wx.BOTH)<EOL>frame.Show(True)<EOL>self.gui_repaint()<EOL>
generate Print Preview with wx Print mechanism