Since the customer has online preview of the PDF format of the demand, find a solution on the internet, think Flexpaper used to be quite convenient, Flexpaper is converted to PDF file in the format of the document preview, so Flexpaper General and Swftool with the use of Converts a PDF file to a SWF-formatted file while the program is running.
If Flexpaper does
Original Blog http://blog.csdn.net/zfw198787/article/details/48781357
Most detailed online preview of the file (openoffice+swftools+flexpaper) 1.1 I use the latest software packages, the version is shown in the following figure:
1.2 Loading Chinese file name is supported 1.3 Code Download
1. Overview
Main principles
1. Convert Word, Excel, PPT, TXT and other files to PDF files via third-party tool OpenOffi
--Put PHP in the system directory so that PHP can be used directly
# vim/etc/sudoers
--Edit this file
--Add the following line under Root all= (All)
www all= (All) Nopasswd:all
--Modify Defaults Requiretty front plus a # number
SwftoolsDownload pathHttp://www.swftools.org/download.html1. Install the required libraries and components. The machine has been installed before, the main installation is the following components. If you do not install it will prompt machine ' x86_64-unknown-linux ' no
Therefore, an HTMl file is saved when each file is uploaded, so that the online preview function can be realized. The main code is as follows:Copy codeThe Code is as follows:Using System;Using System. Collections;Using System. Configuration;Using System. Data;Using System. Web;Using System. Web. Security;Using System. Web. UI;Using System. Web. UI. HtmlControls;Using System. Web. UI. WebControls;Using Syste
This article is an example of how ASP.net implements the online preview of Word documents. Share to everyone for your reference. The implementation methods are as follows:
How to implement: Office documents to HTML, and then browse the browser online
1, first introduce the Office library in the COM component, and then introduce Word's DLL in the assembly extens
FileImageExtractor(new File(outPutFilePath + imageUrl))); options.setIgnoreStylesIfUnused(false); options.setFragment(true); options.URIResolver(new IURIResolver() {@Override rewrite the method, plus this error, you see what the problempublic string Resolve (string uri) {return imageUrl + URI;}}); Step 3:convert xwpfdocument to XHTML xhtmlconverter.getinstance (). Convert (document, out, options); }else{hwpfdocument worddocument = new Hwpfdocument (new FileInputStrea
Then consider the existence of an HTML file for each file when it is uploaded, so that the online preview function can be achieved. The main code is as follows
Copy Code code as follows:
Using System;
Using System.Collections;
Using System.Configuration;
Using System.Data;
Using System.Web;
Using System.Web.Security;
Using System.Web.UI;
Using System.Web.UI.HtmlControls;
Using System.We
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.