Convert word to pdf to swf to preview word files online

Source: Internet
Author: User
Tags php session automake
: This article describes how to convert word to pdf to swf to preview word files online. For more information about PHP tutorials, see. # Ifconfig
-- Check the IP address of the virtual machine and perform the following operations on the local software.
-- Upload all my compressed files to the/root directory.
# Yum-y update
# Init 6
-- Restart
# Yum-y install vim
-- Install vim
# Yum-y install wget
-- Install the download tool
# Wget http://pkgs.repoforge.org/unoconv/unoconv-0.5-1.el6.rf.noarch.rpm
-- Download the file unoconv
# Yum-y install openoffice *
-- Install openoffice, including all plug-ins
# Yum install unoconv-0.5-1.el6.rf.noarch.rpm
-- Install the downloaded unoconv
# Mkdir-p/usr/share/fonts/truetype/droid
# Cp DroidSansFallbackFull. ttf/usr/share/fonts/truetype/droid/
-- Create a folder
-- Copy the font to this folder.
# Unoconv-f pdf 123.docx
-- If the first execution fails, it will be executed again.
# Unoconv-f pdf 123.docx
-- Execute another certificate 123.pdf to check whether it is correct.
-- Upload nginx, php, and libmcrypt software packages
# Tar zxf nginx-1.9.2.tar.gz
# Tar zxf php-5.6.10.tar.gz
# Tar zxf libmcrypt-2.5.8.tar.gz
-- Extract
# Yum-y install gcc-c ++ autoconf automake libtool make zlib-devel openssl-devel pcre-devel
-- Install nginx dependencies
# Cd nginx-1.9.2
-- Enter the Directory
# Groupadd-r www
# Useradd-s/sbin/nologin-g www-r www
-- Create www users and user groups
#./Configure -- prefix =/usr/local/nginx -- user = www -- group = www
-- Configure nginx
# Make & make install
-- Install nginx
-- Copy the nginx and php-fpm of the installation package to the/etc/init. d/directory.
# Cp ~ /Nginx/etc/init. d/nginx
# Cp ~ /Php-fpm/etc/init. d/php-fpm
# Chmod a + x/etc/init. d/nginx
# Chmod a + x/etc/init. d/php-fpm
-- Grant the execution permission of two files
# Cd ../libmcrypt-2.5.8
-- Enter the libmcrypt Directory
#./Configure
-- Configure libmcrypt
# Make & make install
-- Compile and install libmcrypt
# Ln-s/usr/local/lib/libmcrypt. la/usr/lib/libmcrypt. la
# Ln-s/usr/local/lib/libmcrypt. so/usr/lib/libmcrypt. so
# Ln-s/usr/local/lib/libmcrypt. so.4/usr/lib/libmcrypt. so.4
# Ln-s/usr/local/lib/libmcrypt. so.4.4.8/usr/lib/libmcrypt. so.4.4.4.8
-- Create a shortcut
# Cd ../php-5.6.10
-- Enter the php installation directory
# Yum-y install libxml2-devel bzip2 bzip2-devel curl-devel gd-devel
-- Install php dependencies
#. /Configure -- prefix =/usr/local/php -- with-config-file-path =/usr/local/php/etc -- enable-fpm -- with-fpm-user = www -- with-fpm-group = www -- enable-sockets -- enable-mbstring -- enable-sysvsem -- enable-sysvshm -- enable-gd-native-ttf -- enable-mbregex -- enable-zip -- enable-pcntl -- enable-inline-optimization -- disable-debug -- with-mhash -- with-mcrypt -- with-mysql -- with-mysqli -- with-pdo-mysql -- with-curl -- with-bz2 -- with-zlib -- with-pcre-regex -- with-openssl-dir =/usr/lib/openssl -- with-gd --- jpeg-dir -- with-png-dir -- with-freetype-dir -- with-png-dir
-- Configure php
# Make & make install
-- Compile and install php
# Cp ~ // Php-fpm.conf/usr/local/php/etc/
# Cp ~ /Php. ini/usr/local/php/etc/
# Vim/usr/local/nginx/conf/nginx. conf
Location ~ \. Php $ {
Root html;
Fastcgi_pass unix:/tmp/php-cgi.sock;
Fastcgi_index index. php;
Fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;
# Fastcgi_param SCRIPT_FILENAME/scripts $ fastcgi_script_name;
Include fastcgi_params;
}
# Vim/usr/local/nginx/conf/fastcgi_params
-- Modify the nginx configuration file and fastcgi_params configuration mainly to modify the nginx execution user and pathinfo support.
Set $ script $ uri;
Set $ path_info "";
If ($ uri ~ "^ (. + \. Php) (/. + )"){
Set $ script $1;
Set $ path_info $2;
}
Fastcgi_param SCRIPT_NAME $ script;
Fastcgi_param PATH_INFO $ path_info;
# Mkdir-p/tmp/session
-- Create the php session storage directory
# Chown-R www. www/tmp/session
-- Grant www user permissions
# Service php-fpm start
# Service php-fpm restart
-- Start and restart php
# Service nginx start
# Service nginx restart
-- Start and restart nginx
# Vim/etc/sysconfig/iptables
-- Adjust the firewall to modify port 80 to allow access ------- contact me -------
# Service iptables restart
-- Restart the firewall to use the edited rules
# Vim/usr/local/nginx/html/index. php
-- Create an index. php file and write it to the phpinfo () browser for access.
# Cd/usr/local/nginx/html/
-- Enter the webpage Directory
# Rm-rf ./*
-- Delete all files in the current directory
# Cp ~ /123.docx ./
-- Copy the just 123.docx to the current directory
# Vim index. php
-- The content is shown in index. php
# Ln-s/usr/local/php/bin/php/usr/bin/php
-- Put php in the system directory so that php can be directly used.
# Vim/etc/sudoers
-- Edit this file
-- Add
Www ALL = (ALL) NOPASSWD: ALL

-- Add a # sign before Defaults requiretty modification.

Swftools
Download path
Http://www.swftools.org/download.html
1. install required libraries and components. The machine has been installed before. the main installation is the following components. If you do not install the tool, the system prompts machine 'x86 _ 64-unknown-linux 'not recognized.
Yum install gcc * automake zlib-devel libjpeg-devel giflib-devel freetype-devel
2. download, compile, and install swftools.
Wget http://www.swftools.org/swftools-0.9.2.tar.gz
Tar vxzf swftools-0.9.2.tar.gz
Cd swftools-0.9.2
./Configure -- prefix =/usr/swftools
Make
Make install
3. set the swftools environment variable to make iis2swf an executable command.
Vim/etc/profile
Export PATH = $ PATH:/usr/swftools/bin/
4. install the xpdf language pack. Download the xpdf-chinese-simplified.tar.gz file, decompress it to/usr/share/xpdf, and edit the add-to-xpdfrc file,

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

The above describes how to convert word to pdf to swf to enable online preview of word files, including some content. if you are interested in PHP tutorials, you can help.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.