@ujjayants LayoutLM is not designed for that but you may want to look at
  
      

      GitHub
  

  
    

GitHub - Layout-Parser/layout-parser: A Unified Toolkit for Deep Learning... 33

  A Unified Toolkit for Deep Learning Based Document Image Analysis - GitHub - Layout-Parser/layout-parser: A Unified Toolkit for Deep Learning Based Document Image Analysis


  

  
    
    
  

  


It may do what you are looking for.