views:

13

answers:

0

Calendar in our app is displayed using Fullcalendar plugin by arshaw

Here it is: http://avatara.su/calendar

There is a need to export this page to pdf. I always used PDFkit gem to do this, but with fullcalendar it doesn't work. It just renders an empty calendar grid, without rendered events.

I tried to set 10 seconds for wkhtmltopdf to wait, while events fetched:

config.middleware.use "PDFKit::Middleware", :redirect_delay => "10000"

.. even 20, and 50.. And still empty grid.

I tried to sed callback event in fullcalendar configuration:

eventAfterRender: function( event, element, view ) { window.print() }

.. but it still just waits for :redirect_delay milliseconds to pass and renders an empty grid.

Maybe someone can help me with this? Or just suggest where to look for an elegant solution?