Displaying PDF In Our Website
Ingredients:
Download both software
# yum -y install swftools # wget http://flexpaper.googlecode.com/files/FlexPaper_1.3.1_flash.zip
Go to http DocumentRoot, then unzip FlexPaper_1.3.1_flash.zip
# cd /var/www/html/ # unzip /path/to/FlexPaper_1.3.1_flash.zip
There’s example in FlexPaper_1.3.1_flash.zip distribution, We need to create our own swf file from existing pdf
# pdf2swf DNSSEC_in_6_minutes.pdf -o DNSSEC_in_6_minutes.swf -T 9 -f
Lots of NOTICE output there…
NOTICE Adding /usr/share/swftools/fonts to font directories Title: Slide 1 Author: Alan Clegg Creator: Impress Producer: OpenOffice.org 2.4 CreationDate: 20080715091448-04'00' Pages: 79 Linearized: no Encrypted: no NOTICE processing PDF page 1 (720x540:0:0) (move:0:0) NOTICE file contains jpeg pictures NOTICE file contains pbm pictures NOTICE processing PDF page 2 (720x540:0:0) (move:0:0) NOTICE processing PDF page 3 (720x540:0:0) (move:0:0) NOTICE File contains links NOTICE processing PDF page 4 (720x540:0:0) (move:0:0) NOTICE processing PDF page 5 (720x540:0:0) (move:0:0) NOTICE processing PDF page 6 (720x540:0:0) (move:0:0) NOTICE processing PDF page 7 (720x540:0:0) (move:0:0) NOTICE processing PDF page 8 (720x540:0:0) (move:0:0) NOTICE processing PDF page 9 (720x540:0:0) (move:0:0) NOTICE processing PDF page 10 (720x540:0:0) (move:0:0) NOTICE processing PDF page 11 (720x540:0:0) (move:0:0) NOTICE processing PDF page 12 (720x540:0:0) (move:0:0) NOTICE processing PDF page 13 (720x540:0:0) (move:0:0) NOTICE processing PDF page 14 (720x540:0:0) (move:0:0) NOTICE processing PDF page 15 (720x540:0:0) (move:0:0) NOTICE processing PDF page 16 (720x540:0:0) (move:0:0) --- cut --- NOTICE SWF written
Edit FlexPaperViewer.html file, find line containt:
SwfFile : escape("Paper.swf"),
Change to:
SwfFile : escape("DNSSEC_in_6_minutes.swf"),
Now we’re ready to go, point your browser to http://your.domain/FlexPaperViewer.html
I’f nothing goes wrong we’ll see nice PDF reader on our website 🙂
that’s it
I followed your instructions and it worked great! thanks!
Bagaimana cara mengganti swffile dengan pemrograman? misalnya dengan sebuah variabel?
maksudnya gimana pak?maaf, saya masih belum nangkap.
This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. Thanks for this great resource! gebäudereinigung frankfurt
I enjoyed reading your interesting yet very informative insights. I am looking forward to reading more of your most recent articles and blogs.