Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating pdf using wickedpdf and wkhtmltopdf in rails 2.3 #291

Open
mayararajesh opened this issue Mar 21, 2014 · 5 comments
Open

Generating pdf using wickedpdf and wkhtmltopdf in rails 2.3 #291

mayararajesh opened this issue Mar 21, 2014 · 5 comments

Comments

@mayararajesh
Copy link

I am working with rails 2.3 with wickedpdf and wkhtmltopdf. While generating pdf it works fine at first time. When i am generating the pdf at second time onwards it generates RunTime Error.
It shows the error like below.

RuntimeError in XXXXXController#xxxxxx_pdf

--PDF could not be generated!
--Error: Failed loading page file:///tmp/wicked_header_pdf_3705_0.html?page=1&section=&
subsection=&frompage=1&subsubsection=&topage=1&webpage=foobar&time=10:55 AM&date=20/03/14
(sometimes it will work just to ignore this error with --ignore-load-errors)
--Error: Failed loading page file:///tmp/wicked_footer_pdf_3705_0.html?page=1&section=&
subsection=&frompage=1&subsubsection=&topage=1&webpage=foobar&time=10:55 AM&date=20/03/14
(sometimes it will work just to ignore this error with --ignore-load-errors)
--QPaintDevice: Cannot destroy paint device that is being painted
--Segmentation fault (core dumped)

Please help me to solve the above issue
Thanks
Rajesh

@unixmonkey
Copy link
Collaborator

Are you using the wkhtmltopdf_binary gem?
What version of wkhtmltopdf?
What operating system?

@mayararajesh
Copy link
Author

Yes using wkhtmltopdf_binary
version 0.9.6
Ubuntu 12.04

@unixmonkey
Copy link
Collaborator

It looks like your issue may be the same, or related to this one:

https://code.google.com/p/wkhtmltopdf/issues/detail?id=656

Does removing the headers and footers stop the issue from happening?

@mayararajesh
Copy link
Author

Hi

Thanks for your resonse. But it was working on some other pages which was
already developed application i am just enhancing the same application but
it was not working for me.

Mayara Rajesh

@unixmonkey
Copy link
Collaborator

@mayararajesh Can you be more specific?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants