Obviously, operations such as zipping / unZipping a document or saving a document cannot be performed on the client side and with pure javascript.
However, if you want to do such things, I believe that there are Linux packages that take strings as input and give you a ready-to-use Office document as output.
If you are not comfortable with Linux packages, if you want to save this as a Word 2007 document:
<?xml version="1.0" encoding="utf-8"?> <w:document xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"> <w:body> <w:p> <w:pPr> <w:pStyle w:val="MyHeading1" /> </w:pPr> <w:r> <w:t>This is Heading</w:t> </w:r> </w:p> </w:body> </w:document>
You can create this line on the client side. then send it to the server via AJAX and let your server handle it. in particular, I have used these APIs several times. let PHP handle this. save the result somewhere or force the client browser to load it (stream results)
Sepehr
source share