flexpaper for rails
can someone out there help me out with understanding how to use flexpaper for my ra开发者_如何转开发ils application? it needs swf formats, and our rails wud converted any supported file type to pdf. i'm clueless on how to proceed further with converting pdf to swf on the fly and displaying it via the flexpaper app. if any1s aware of this, ur help is needed. thanks
- You can generate pdf files with prawn( or other tools available in rails) .Or maybe you can use your pdf files
Then you can use pdf2swf tool to convert the pdf to swf from your controller(or model) in your rails applicatoin. Here is the snippet I have used :
system("usr/local/bin/pdf2swf #{Rails.root}/public/#{pdffilename} -o #{Rails.root}/public/#{swffilename}.swf -f -T 9 -t -s storeallcharacters")
Now your swf will be generated .Now you can flexpaper for more details .
Hope this helps .
You could also try this gem rather than shelling out directly: https://github.com/Krule/pdf_to_swf-paperclip-processor
精彩评论