Re: Get a PDF every 24 hours

36 views
Skip to first unread message

Andre Joseph Cubeta

unread,
Apr 27, 2013, 8:50:05 PM4/27/13
to prawn...@googlegroups.com
Hi,

Well you can do some of these to solve your problem.

- cronjob task for your rails app to run the script every 24 hours 

- in your Prawn document you can specify the path of which you can .render the file. May it be in the /tmp directory 
or you can create /private/assets/reports/pdf directory in your app to store your PDFs

- On your app you just call the PDF by calling the file define in your controller class.

- For Pie chart, Prawn only support image charting. I used Google Chart for image charting as Prawn only supports .png, .jpg .gif  images. You may play around
the google image chart and replace its values from your own styles.




On Apr 28, 2013, at 3:31 AM, Laura-Mihaela Craciun <laura.m...@gmail.com> wrote:

Hi all,

I'm new to Rails and I got Prawn to output a PDF file in my application. I've been wondering if it is possible to use Prawn to output  different PDF files every 24 hours and save all of them on the website so the users can access them at any time. Also, my PDF file should output a pie chart, any suggestions on how to get the pie chart to work? I've tried various things but nothing worked. I'd be very grateful if any of you could help me out! Thanks very much indeed!


--
You received this message because you are subscribed to the Google Groups "Prawn" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prawn-ruby+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Laura-Mihaela Craciun

unread,
Apr 28, 2013, 7:50:53 AM4/28/13
to prawn...@googlegroups.com

 Thank you ever so much for your help! I got it to work!
Reply all
Reply to author
Forward
0 new messages