Directory
Baidu Library solution (I)-Overall Thinking
Baidu Library solution (2) -- use Jacob to call MS Office to convert the document to PDF
Baidu Library solution (3) -- use jcom to call MS Office or Acrobat API to convert the document to PDF
Similar to Baidu Library solution (4) -- use jodconverter to call OpenOffice.org to convert the document to PDF
Baidu Library solution (5)-use swftools to Convert PDF files to SwF
Baidu Library solution (6)-use flexpaper to display flash (SWF)
1. Introduction to flexpaper
Flexpaper is an open-source and lightweight Document Browsing component designed to work with libraries such as ipv2swf (including swftools), so that on the web page, it is possible to display and interact PDF files in Adobe Flex and other flash-based applications. That is, it is possible to browse the PDF file without installing the PDF Reader software. The flexpaper project also provides a flex library and an independent flash version.
2. Use flexpaper 2.1 to download flexpaper
The Project address of flexpaper on Google Code is http://code.google.com/p/flexpaper /. Currently, flexpaper's latest flashpoint is flexpaper_1.5.20.flash.zip.
After downloading and unzipping, you can see the 6-1 directory:
Figure 6-1 flexpaper compressed package directory
Main files and folders:
Examples Folder: An Example of storing FlexPaper
Js Folder: stores js files called by FlexPaper
Php Folder: Example of storing php FlexPaper
Index.html: Example Homepage
FlexPaperViewer.swf: Core FlexPaper File
PlayerProductInstall.swf: If the Flash Player version of the client browser is too low, this swf file is embedded.
2.2 flexpaper parameter description
SwfFile (String): Document to be opened using FlexPaper
Scale (Number): Initialize the scaling ratio. The parameter value must be an integer greater than zero (1 = 100%)
ZoomTransition (String): Scaling style in FlexPaper. It uses the same style as Tweener. The default parameter value is easeOut. Other optional values include easenone, easeout, linear, and easeoutquad.
ZoomTime (Number): the time required to change from one scaling ratio to another. The value of this parameter should be 0 or greater.
ZoomInterval (Number): interval between scaling ratios. The default value is 0.1. This value should be a positive Number.
FitPageOnLoad (Boolean): the Adaptive Page during initialization, which works the same way as the Adaptive Page button on the toolbar.
FitWidthOnLoad (Boolean): Adaptive Page width during initialization, same effect as the adaptive width button on the toolbar
LocaleChain (String): Set the region (language). Currently, the following languages are supported:
En_us (English)
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 (Finish)
Hu_HU (Hungarian)
FullScreenAsMaxWindow (Boolean): when it is set to true, clicking the "All-in-One" button will open a new window to maximize FlexPaper, instead of full screen. When the Flash Player is disabled for security reasons, when flexpaper is used as an independent Flash Player, setting true is a priority.
ProgressiveLoading (Boolean): When set to true, the entire document is not loaded when the document is displayed, but is loaded gradually, however, you need to convert the document to a version later than 9 (use the-T 9 label when using ipv2swf)
MaxZoomSize (Number): sets the maximum scaling ratio.
MinZoomSize (Number): sets the minimum scaling ratio.
SearchMatchAll (Boolean): when it is set to true, click search to highlight all matching places.
InitViewMode (String): Set the startup mode, such as "Portrait" or "TowPage"
ViewModeToolsVisible (Boolean): Specifies whether to display the style selection box on the toolbar.
ZoomToolsVisible (Boolean): The Zoom tool is displayed on the toolbar.
NavToolsVisible (Boolean): indicates whether the navigation tool is displayed on the toolbar.
CursorToolsVisible (Boolean): indicates whether the cursor tool is displayed on the toolbar.
SearchToolsVisible (Boolean): Indicates whether a search tool is displayed on the toolbar.
2.3 flexpaper example
Create the HTML page test.html with the following code:
<Html> </Div> </body>
The structure of the test.html file and the js file is 6-2:
Figure 6-2 structure of the test.html File
The effect of the paper.swf file is 6-3:
Figure 6-3 show paper.swf under flexpaper
Reprinted Description: This article is the author's original. When reposted, please indicate the source of the article: Sean also has a dream blog Park. Please respect the author's Labor achievements. Thank you!