I want to generate pdf with css. I am using princely plugin.
This is code which I written
prince = Prince.new()
html_string = render_to_string(:template =>
:filename => ‘some_document.pdf’,
:type => ‘application/pdf’
But I am getting error of nil.size
You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.size
Application Trace | Framework Trace | Full Trace
I also used make_and_send_pdf function but got the same error.
I thought I am getting error in render_to_string function.
Can anyone tell me how can I solve this issues?
Thanks in advance