code: def layout(self, rect=None, width=0, height=0, fontsize=11):
          
          if self.isClosed or self.isEncrypted:
              raise ValueError("operation illegal for closed / encrypted doc")
  
          val = _fitz.Document_layout(self, rect, width, height, fontsize)
  
          self._reset_page_refs()
          self.initData()
  
          return val
docs: Re-layout a reflowable document.