Opening MS Word/Excel/PPT and PDF in Flex
I am looking for a solution, preferably a 3rd party component, to open/display MS Word/Exc开发者_如何学JAVAel/Powerpoint and PDF documents into Flex.
The flow is like this:
The user uploads any of the file types .doc
, .docx
, .pdf
, .ppt
, etc. This file is then displayed in Flex area, without requiring the user to get MS Office.
Office WEB Component is ruled out because it requires Office to be installed.
print2flash.com sounds good, but the problem is they are on Windows; my setup is LAMP (I am using PHP and MySQL on Linux).
Ok, this is not as clean as straight flex solution, but it should work if you just want the user to be able to view the documents not edit them.
Flex CAN easily display PDF files as long as the user has the Adobe Reader installed (most people do). There is also FlexPaper (which was the answer to this previous question) which will display PDFs in Flex even if the user does not have Adobe Acrobat Reader.
JODConverter is a Java api/cli for converting the office formats you mentioned and many others to pdfs. This can be run as a command line. There is also a Python script available.
User uploads file, php runs jodconverter command to convert to pdf, Flex displays PDF.
Should work cross-platform.
I assume you mean opening the office formats for viewing only... Have you thought of installing office 2007 on your server and using your backend to open the file and save it as PDF? Then, just return the file/name or a URL and use flex to naigatetourl or ... We do just that and it works very nicely.
精彩评论