0

am working on an inhouse document management system with Core PHP and postresql but i am trying to display an MS word Document and spreedsheet document using Core PHP but seem to fail, i have seen google docs viewer but it works online we dont intend to expose the system on the internet it is going to be used on local area network( LAN ) Offline which means i need some sort of a library or a function or method or class to help me do this.

i have also seen some solutions but most of them just extract the text and just echos it out. please help me.**

gview
  • 14,876
  • 3
  • 46
  • 51
  • You included the `phpoffice` tag. Doesn't that library do what you want? – Barmar Dec 10 '21 at 22:45
  • For document management, wouldn't it be better to store these as PDFs? Displaying PDFs in a browser is easy, they're basically read-only, and you don't have the complexity of trying to interpret Microsoft's document format. – Tim Roberts Dec 10 '21 at 22:49
  • This isn't really a PHP question but more a web browser support question, that has an answer here: https://stackoverflow.com/questions/27957766/how-do-i-render-a-word-document-doc-docx-in-the-browser-using-javascript – gview Dec 10 '21 at 22:49
  • @Barmar i have tried using PHPoffice but i cant seem to nail it, also one of the requirements for the system is that it should be able to display .docx, .pdf( i have done it already ) then also .pptx, maybe if you have a working code for PHPOFFICE. – ERIC HANSEN Dec 10 '21 at 23:02
  • @TimRoberts The System is required to be able to display .docx,.pdf.pptx documents but offline no use of viewers like google viewer since its going to be used on the LAN and accessed from an IP ADDR – ERIC HANSEN Dec 10 '21 at 23:06
  • I have never needed or used it, I have no code to offer you. – Barmar Dec 10 '21 at 23:06
  • You are wasting time looking at phpoffice. It is designed to create or edit office format documents. It is not a display/viewing system. – gview Dec 10 '21 at 23:46
  • I think you have radically underestimated the difficulty of displaying these kinds of documents. Google Docs works fine in an offline mode; you would be better off investigating whether you can exploit their technology using a local cloud, instead of the Google cloud. – Tim Roberts Dec 11 '21 at 00:58

0 Answers0