code: def get_print_rect(self, grid_rect):
          
  
          grid = self.grid
  
          rect_x = grid_rect.x - \
              grid.GetScrollPos(wx.HORIZONTAL) * grid.GetScrollLineX()
          rect_y = grid_rect.y - \
              grid.GetScrollPos(wx.VERTICAL) * grid.GetScrollLineY()
  
          return wx.Rect(rect_x, rect_y, grid_rect.width, grid_rect.height)
docs: Returns wx.Rect that is correctly positioned on the print canvas