Flexpaper implement online preview of document

Source: Internet
Author: User

After converting the document format to SWF format, it's time to implement an online preview. There are two ways to preview online. The first: The online preview of the document is implemented through Flashpaper. The second is to implement an online preview of the document through Flexpaper. The second approach is used in blogs. Here we have a look at what is flexpaper.

Introduction to 1 Flexpaper

Flexpaper is a component designed to be used with pdf2swf to display a variety of documents on a browser, making it possible to display PDFs in Flex, without the support of a PDF software environment. It can be used as a library for flex. You can also convert some documents such as word, PPT, etc. into PDF, and then realize online browsing.

The Flexpaper version used in this article is: Flexpaper_1.4.5_flash,

Download Address: http://download.csdn.net/download/yali1990515/4443796

After downloading the direct pressure on it, the following is the file screenshot after decompression:

Primary file, folder description:

Examples folder: Storing examples of flexpaper use

JS folder: Store the Flexpaper call JS file

PHP Folder: Example of storing PHP using Flexpaper

Index.html: Example Homepage

FlexPaperViewer.swf:FlexPaper's core document

PLAYERPRODUCTINSTALL.SWF: If the Flashplayer version of the client browser is too low, this SWF file will be embedded

2 Flexpaper of the parameter meaning

Swffile (String) need to use Flexpaper open document

Scale (number) Initializes the scale, the parameter value should be an integer greater than 0

Zoomtransition (String) Flexpaper, which uses the same style as Tweener, and the default parameter value is easeout. Other optional values include: Easenone, Easeout, Linear, Easeoutquad

Zoomtime (number) The time it takes to change from one zoom scale to another, which should be 0 or greater.

Zoominterval (number) scaling interval, the default value is 0.1, the value is positive.

Fitpageonload (Boolean) Initializes an adaptive page with the same effect as using the Fit page button on the toolbar.

Fitwidthonload (Boolean) when initialized, adaptive page width, the same effect as the Fit Width button on the toolbar.

Localechain (String) sets the locale (language) and currently supports the following languages.

en_US (中文版)

FR_FR (French)

ZH_CN (Chinese, simple)

Es_es (Spanish)

PT_BR (Brazilian Portugese)

Ru_ru (Russian)

FI_FN (Finnish)

De_de (German)

NL_NL (Netherlands)

TR_TR (Turkish)

Se_se (Swedish)

Pt_pt (Portugese)

El_el (Greek)

DA_DN (Danish)

Cz_cs (Czech)

IT_IT (Italian)

PL_PL (Polish)

PV_FN (Finnish)

Hu_hu (Hungarian)

Fullscreenasmaxwindow (Boolean) When set to True, clicking the Full Screen button opens a new Flexpaper maximized window instead of full screen, and when the Flash Player is not full screen because of security, Setting to True when using Flexpaper as a standalone Flash player is a priority choice.

Progressiveloading (Boolean) When set to True, the document is displayed without loading the entire document, but is gradually loaded, but the document needs to be converted to more than 9 flash versions (use the-T 9 tag when using pdf2swf).

Maxzoomsize (number) sets the maximum scaling ratio.

Minzoomsize (number) the smallest scaling ratio.

When Searchmatchall (Boolean) is set to True, click to search all qualifying places to highlight.

Initviewmode (String) sets the startup mode such as "Portrait" or "Twopage".

Whether the style selection box is displayed on the viewmodetoolsvisible (Boolean) toolbar.

Whether the zoom tool is displayed on the zoomtoolsvisible (Boolean) toolbar.

Whether navigation tools are displayed on the navtoolsvisible (Boolean) toolbar.

Whether the cursor tool is displayed on the cursortoolsvisible (Boolean) toolbar.

Whether the search is displayed on the searchtoolsvisible (Boolean) toolbar

3 Use examples of Flexpaper [HTML]  View plain copy print? <span style= "COLOR: #009900;" ><%@ page language= "java"  import= "java.util.*"  pageencoding= "UTF-8"%>   <%       string path = request.getcontextpath ();       string basepath = request.getscheme ()  +  "://"                + request.getservername ()  +   ":"  + request.getserverport ()                 + path +  "/";  %>      <! doctype html public  "-//w3c//dtd html 4.01 transitional//en" >   < html>       

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.