Rails Document Online Preview scheme

Source: Internet
Author: User
Tags support microsoft

Usage Scenarios: Non-PDF documents converted to PDF documents, using the new browser features or using the JS analog Document preview featureI. Non-PDF conversion PDF Document Technical Solution 1, Openoffic+jodconverter (with dependencies) OPENOFFIC3 only supports Microsoft Word 97/2000/XP,OPENOFFIC4       Requires GLIBC2 version 2.11, upgrade GLIBC2 may cause system crashes, 2, LibreOffice + unoconv (Python script) libreoffice3 only support Microsoft Word 97/2000/XP Libreoffice4 supports Microsoft Word 2003 and above conversions, but the effect of conversion is not very good
3, through a simple comparison, the efficiency of programme one is higher than the program II

II. implementation of the scheme 1, install openoffic (http://www.openoffice.org/download/index.html) decompression tar.gz package, switch to RPMs directory, with RPM-IVH--prefix installation directory *. RPM can be;
Start openofficsoffice-headless-accept= "SOCKET,HOST=127.0.0.1,PORT=8100;URP;"-nofirststartwizard
Rails leverages EncapsulationJodconverter plug-in for file conversion install plugin Rubyscript/plugin Install Git://github.com/amardaxini/convert_office.gitYou can passConvertoffice::convertofficeformat.new.convert (src_file,dest_file) for file conversion;

2.installationLibreoffice4 (http://download.documentfoundation.org/libreoffice/stable/) Unpack tar.gz package, execute install file, install RPMs directory Install directory start LibreOffice service soffice-headless-accept= "SOCKET,HOST=127.0.0.1,PORT=8100;URP;"-nofirststartwizard
DownloadUnoconv (https://github.com/dagwieers/unoconv/downloads) Copy Unoconv script to the project directory, execute script to convert file to Python unoconv-f pdf target file

Rails Document Online Preview scheme

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.