当前位置:首页 > 开发 > 互联网 > 正文

PDF在线阅读

发表于: 2012-11-28   作者:sunjing   来源:转载   浏览次数:
摘要: 一 、FlexPaper      FlexPaper是一个开源轻量级的文档浏览组件,可以与PDF2SWF一起使用,其中显示的文档应被转换为SWF格式。 FlexPaper可以使用在web页面或Flex中。      FlexPaper主页http://flexpaper.devaldi.com 。 在页

一 、FlexPaper

     FlexPaper是一个开源轻量级的文档浏览组件,可以与PDF2SWF一起使用,其中显示的文档应被转换为SWF格式。 FlexPaper可以使用在web页面或Flex中。

     FlexPaper主页http://flexpaper.devaldi.com

在页面中嵌入 FlexPaper

<script type="text/javascript" src="js/flexpaper_flash.js"></script>

<div style="position:absolute;left:10px;top:10px;">
<a id="viewerPlaceHolder" style="width:660px;height:480px;display:block"></a>

       <script type="text/javascript">
                var fp = new FlexPaperViewer(

'FlexPaperViewer',
'viewerPlaceHolder', { config : {
SwfFile : 'Paper.swf',
Scale : 0.6,
ZoomTransition : 'easeOut',
ZoomTime : 0.5,
ZoomInterval : 0.2,
FitPageOnLoad : true,
FitWidthOnLoad : false,
PrintEnabled : true,
FullScreenAsMaxWindow : false,
ProgressiveLoading : false,
MinZoomSize : 0.2,
MaxZoomSize : 5,
SearchMatchAll : false,
InitViewMode : 'Portrait',
ViewModeToolsVisible : true,
ZoomToolsVisible : true,
NavToolsVisible : true,
CursorToolsVisible : true,
SearchToolsVisible : true,

localeChain: 'en_US'
}});

    </script>
</div>

在Flex中使用

 <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="100%" height="100%" xmlns:fp="com.devaldi.controls.flexpaper.*">
<fp:FlexPaperViewer width="520" height="450" Scale="0.6" SwfFile="Paper.swf" />
</mx:Application>

二、SWFTools

     SWFTools 是处理SWF文件的工具集。

     SWFTools主页http://www.swftools.org ,当前最新版本为0.9.2,其中包含以下工具:

PDF2SWF A PDF to SWF Converter. Generates one frame per page. Enables you to have fully formatted text, including tables, formulas, graphics etc. inside your Flash Movie. It's based on the xpdf PDF parser from Derek B. Noonburg.
SWFCombine A multi-function tool for inserting SWFs into Wrapper SWFs, contatenating SWFs, stacking SWFs or for basic parameter manipulation (e.g. changing size).
SWFStrings Scans SWFs for text data.
SWFDump Prints out various informations about SWFs, like contained images/fonts/sounds, disassembly of contained code as well as cross-reference and bounding box data.
JPEG2SWF Takes one or more JPEG pictures and generates a SWF slideshow from them. Supports motion estimation compression (h.263) for better compression of video sequences.
PNG2SWF Like JPEG2SWF, only for PNGs.
GIF2SWF Converts GIFs to SWF. Also able to handle animated gifs.
WAV2SWF Converts WAV audio files to SWFs, using the L.A.M.E. MP3 encoder library.
AVI2SWF Converts AVI animation files to SWF. It supports Flash MX H.263 compression. Some examples can be found at examples.html. (Notice: this tool is not included anymore in the latest version, as ffmpeg or mencoder do a better job nowadays)
Font2SWF Converts font files (TTF, Type1) to SWF.
SWFBBox Allows to read out, optimize and readjust SWF bounding boxes.
SWFC A tool for creating SWF files from simple script files. Includes support for both ActionScript 2.0 as well as ActionScript 3.0.
SWFExtract Allows to extract Movieclips, Sounds, Images etc. from SWF files.
AS3Compile A standalone ActionScript 3.0 compiler. Mostly compatible with Flex.

     SWFTools还提供了图形化PDF转换工具 gpdf2swf ,选择pdf文件直接保存就可以生成swf文件。

pdf2swf 参数说明

example:

命令行 pdf2swf Paper.pdf -o Paper.swf -T 9 -f

java调用 Runtime.getRuntime().exec(cmd)

-h , --help Print short help message and exit

-V , --version Print version info and exit

-o , --output file.swf Direct output to file.swf. If file.swf contains '%' (file%.swf), then each page goes to a seperate file.

-p , --pages range Convert only pages in range with range e.g. 1-20 or 1,4,6,9-11

-P , --password password Use password for deciphering the pdf.

-v , --verbose Be verbose. Use more than one -v for greater effect.

-z , --zlib Use Flash 6 (MX) zlib compression.

-i , --ignore Allows pdf2swf to change the draw order of the pdf. This may make the generated

-j , --jpegquality quality Set quality of embedded jpeg pictures to quality. 0 is worst (small), 100 is best (big). (default:85)

-s , --set param=value Set a SWF encoder specific parameter. See pdf2swf -s help for more information.

-w , --samewindow When converting pdf hyperlinks, don't make the links open a new window.

-t , --stop Insert a stop() command in each page.

-T , --flashversion num Set Flash Version in the SWF header to num.

-F , --fontdir directory Add directory to the font search path.

-b , --defaultviewer Link a standard viewer to the swf file.

-l , --defaultloader Link a standard preloader to the swf file which will be displayed while the main swf is loading.

-B , --viewer filename Link viewer filename to the swf file.

-L , --preloader filename Link preloader filename to the swf file.

-q , --quiet Suppress normal messages. Use -qq to suppress warnings, also.

-S , --shapes Don't use SWF Fonts, but store everything as shape.

-f , --fonts Store full fonts in SWF. (Don't reduce to used characters).

-G , --flatten Remove as many clip layers from file as possible.

-I , --info Don't do actual conversion, just display a list of all pages in the PDF.

-Q , --maxtime n Abort conversion after n seconds. Only available on Unix.

三、 Microsoft Office 2007 插件: Microsoft Save as PDF or XPS

     该插件支持WordExcelAccessPowerPointInfoPathOneNotePublisher Visio 。将相应文档存储为PDF 格式或XPS 格式。 可惜excel转换后不能保持原有样式。
    下载地址http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=7

    Office 2010本身就支持保存为PDF格式,不需要安装插件。

PDF在线阅读

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

编辑推荐
优道PDF阅读控件(UUDoc PDF Control)是一款支持反截屏功能的PDF文档数字版权保护控件,支持对PDF
在线阅读 FineUI秘密花园(一) — 为什么选择FineUI? FineUI秘密花园(二) — 一切从头开始 Fine
Google Docs Viewer在线打开阅读PDF、Word、PPT、Excel等 免费网站 2009年10月19日 17:57 评论» 朋
1:工具准备 swftools.exe 下载 http://www.swftools.org/download.html 安装至D盘 SWFTools提供了
1:工具准备 swftools.exe 下载 http://www.swftools.org/download.html 安装至D盘 SWFTools提供了
1:工具准备 swftools.exe 下载 http://www.swftools.org/download.html 安装至D盘 SWFTools提供了
1:工具准备 swftools.exe 下载 http://www.swftools.org/download.html 安装至D盘 SWFTools提供了
这个技术原型主要用于在HTML5 平台上展示 PDF 文档,无需任何本地技术支持,但浏览器必须技持HTML5
FlexPaper 1.2.1 发布,支持简体中文FlexPaper是一个开源轻量级的在浏览器上显示各种文档的组件,被
FlexPaper+SWFTool+操作类=在线预览PDF 引言 由于客户有在线预览PDF格式的需求,在网上找了一下解决
版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号