Flexpaper is an open-source lightweight component used to display various documents in a browser. It is designed to be used with ipv2swf to display PDF in flex, this process does not require the support of the PDF software environment. It can be used as a flex library.
In addition, you can convert documents such as Word and PPT into PDF files for online browsing.
I. Prepare your documents using ipv2swf
First, convert the PDF file to SwF. This step can be automatically completed using the open-source swftools.
1. Download and install swftools. The latest version is 0.9.
2. If the conversion is switched to SwF, you can use the command line. For example, convert paper3.swf to paper3.swf.
C: \ swftools \ ipv2swf paper3.pdf-O paper3.swf
Official Address: http://www.swftools.org/download.html
Download
Swftools-2010-02-06-1900.exe
Swftools-2010-02-06-1900.rar
Pdf2swf detailed usage: View
2. Use the compiled flexpaper flash version to browse your documents
1.2.4 flash version (release notes)
1. Download and decompress the compiled flexpaper
2. the ZIP file contains an example file called flexpaperviewer.html, which shows you the basic parameters that need to be passed to flexpaper.
- VaR Params={
-
- Swffile:"Paper.swf",
-
- Scale:0.6
-
- }
- Swfobject . Embedswf ( " Flexpaperviewer.swf " , " CB " , " 500 " , " 500 " , " 9.0.0 " , " JS/swfobject/expressinstall.swf " , Params ) ;
-
- // The swffile parameter is the file you want to display. scale is the number between 0 and 1, indicating the displayed amplification parameter.
3. Copy the created SWF and ipv2swf to the same directory as the decompressed one.
4. You must have copied flexpaperviewer.swf.
Iii. Use flexpaper In Flex
1.2.4 flex version (release notes)
1. Download flexpaper SWC and add it to your flex project libs.
2. Copy the SWF you created with ipv2swfto your bin-debugdirectory, such as paper3.swf, and add the flexpaper group to your flexCodeXML code in
- XML version = " 1.0 " encoding = " UTF-8 " ?>
- <MX:Application Xmlns:MX="Http://www.adobe.com/2006/mxml"
-
- Layout="Absolute"
- Width="800" Height="500"
-
- Xmlns:Flexpaper="Com. devaldi. Controls. flexpaper .*">
-
- flexpaper : flexpaperviewer width = " 800 " height = " 500 "
- Scale="1" Swffile="Paper3.swf" />
-
-
- </MX:Application>