How to make开发者_Python百科 a pdf viewer in flash?
The thing is that you can't open PDF files directly inside Flash player. So, a workaround that's usually done by Flash PDF viewers (flipbook, etc...) is to convert the PDF pages on the server to separate PNG images and load those into flash.
You can find a number of services that does this automatically, for example this PHP class might be useful if you want to implement such a solution on your own.
Use PDF 2 SWF Tool and then present the swf with Flexpaper.
Works Good in Flash not soo good in Air right now. They bring a different Library Package for Flex which must have some bugs.
http://flexpaper.devaldi.com/
This is an example of an HTML 5 web application that is a PDF viewer (you'll need to open it with the latest version of your browser):
- http://mozilla.github.com/pdf.js/web/viewer.html
It is based on the PDF.js project
- https://github.com/mozilla/pdf.js
and mainly uses javascript. Javascript and Actionscript are quite similar (both being derived from ecmascript). So if you can successfully port the PDF.js to Actionscript, you should be able to develop a PDF viwer in flash.
精彩评论