1

I'm trying to generate a PDF using WickedPDF and all of my static HTML/CSS is loading. I have a few elements on the page that are populated using AJAX requests, but they are not showing up in the PDF.

I know :redirect_delay can be passed as a parameter, but this does not help in the case of waiting for my AJAX calls to finish. Since I didn't see any mention of Wicked PDF and pages generated from AJAX calls, I figured I'd ask:

Is what I'm trying to do possible with Wicked PDF (or other projects), or do I have to pass everything to the front end before generating a PDF?

ryan508
  • 152
  • 10

1 Answers1

1

This should work:

render :pdf => 'out.pdf',
       :javascript_delay => 5000
Unixmonkey
  • 18,485
  • 7
  • 55
  • 78
  • Thanks, I actually found this out shortly after. Should have written an answer myself, but alas, that works. – ryan508 Dec 11 '12 at 23:26