Display .pdf files in your browser using pdf2swf & Alfresco's WebPreview.swf

cancel
Showing results for 
Search instead for 
Did you mean: 

Display .pdf files in your browser using pdf2swf & Alfresco's WebPreview.swf

erikwinlof
Active Member
0 1 104
.


Hi,




.


There was a request in the forums for how to use the WebPreviewer (found on Share's document details page) outside of Alfresco.


I made a simple example that displays the current functionality that can be downloaded from here.


.


Note! The folder must be placed on a webserver, otherwise Flash Player will stop the external .swf from loading due to security violations.


Otherwise all you need to do is point your browser to the index.html file.


.


To test with your own documents simply generate a .swf from a .pdf by running pdf2swf with the following command ...




%> pdf2swf -T 9 -s poly2bitmap,subpixels=72 SomeFile.pdf -o SomeFile.swf.




... and don't forget to change the 'url' parameter in the 'index.html' example page ;-)


.


The pdf2swf utility can be downloaded from http://www.swftools.org/


.


PS. We will enhance the WebPreviewer to support text searches in the document & text selection w copy to clipboard in fortcoming versions.




.
1 Comment
blog_commenter
Active Member
Hey Erik,



great example, thanks for sharing! I particularly like the fact that scrolling with the mouse wheel works on the mac.



Cheers,

Nils