I wonder is it possible to read data from doc and xls files and put the readed content into image files(create page samples of the document). For example I have documents that I want my customers to buy. So I need automatically to create little images like samples of mine documents.
Your help would be appreciated.
For reading from xls files I can really recommend PHPExcel whic is a really simple, but powerful tool:) As for doc I unfortunatly got no good recommandation for you. But I'm sure there's something good out there.
Edit: Found a quick little solution to reading doc-files with one line of code using terminal commands, might not cover all your needs, but thought it was worth a mention. Note that this is only for doc, not docx. Read doc from PHP
from the below link download
excelreader.zip
this is the best for reading..
Although this would be very cool and very handy, unfortunately not. There might be a way to do it with the Google Docs API, but I doubt it :-(
James
Providing your are on Linux you can use Antiword to get just the text of a Word 2000 doc. To get the text content of a Word 2007 document you need to unzip it and read the XML contained with in. Like this http://www.webcheatsheet.com/PHP/reading_the_clean_text_from_docx_odt.php
To get a screenshot of the actual word doc with all its formatting however would probably require running a version of Word on the server and screenshotting it like Litmus does with browsers.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.