mercredi 21 septembre 2016

downloading ppt format in rails using powerpoint ruby gem

1st Part: I Have implemented powerpoint gem in rails 3.2 and ruby 1.9.2

I am just trying to download a html.erb file in pptx format

My codes like this:

@filters = generate_filters_for_manual_report(params)

@deck = Powerpoint::Presentation.new

title = 'Bicycle Of the Mind'

subtitle = 'created by Steve Jobs'

@deck.add_intro title, subtitle

@deck.save('/home/sahil/test6.pptx')

send_data @deck, :filename => '/home/sahil/test6.pptx', :disposition => 'inline', :type => "multipart/related"

it is getting saved in local directory as a pptx file. but unbable to downlaod as as pptx file.

Part2

the above is for text how Can i implement so that html.erb file for customer details and customer image will be show in pptx slider.

Any help will be greatly appreciated. thanks

Aucun commentaire:

Enregistrer un commentaire