shenario
shenario

Reputation: 11

flexpaper for rails

can someone out there help me out with understanding how to use flexpaper for my rails 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

Upvotes: 1

Views: 1009

Answers (2)

micapam
micapam

Reputation: 763

You could also try this gem rather than shelling out directly: https://github.com/Krule/pdf_to_swf-paperclip-processor

Upvotes: 1

Prabesh Shrestha
Prabesh Shrestha

Reputation: 2742

  • 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 .

Upvotes: 3

Related Questions