code: def render_to_reportlab_canvas(rl_canvas, papersize_tuple, layout):
      
      rl_canvas.setPageSize(papersize_tuple)
      layout.render(
          Rectangle(0, 0, *papersize_tuple),
          dict(output=ReportlabOutput(rl_canvas))
          )
docs: Renders the given layout manager on a page of the given canvas.