hi nathan,
a new app version is online now, pdf generation works
http://wicked.heroku.com/projects.pdf
But still the same problem in development mode on my pc.
I' have tested it also on 3 other computers. I have checked the source
code of wicked_pdf and the problem is in the pdf_from_file method into
the :
(
https://github.com/mileszs/wicked_pdf/blob/master/lib/wicked_pdf.rb)
def pdf_from_string(string, options={})
command_for_stdin_stdout = "#{@exe_path} #{parse_options(options)}
-q - - " # -q for no errors on stdout
p "*"*15 + command_for_stdin_stdout + "*"*15 unless defined?
(Rails) and Rails.env != 'development'
pdf, err = begin
Open3.popen3(command_for_stdin_stdout) do |stdin, stdout,
stderr|
stdin.write(string)
stdin.close
[stdout.read, stderr.read]
end
rescue Exception => e
raise "Failed to execute #{@exe_path}: #{e}"
end
raise "PDF could not be generated!\n#{err}" if pdf and pdf.length
== 0
pdf
end
I always using thin to start rails apps on my local machine, but
because I did some code changes in the plugin I used shotgun gem.
I started my app with shotgun and got the pdf with only 2 of 4 images
total.
That's the output in the console of shotgun:
"***************/home/neo/Projekte/wicked/bin/wkhtmltopdf-i386 -q
- - ***************"
(eval):3: [BUG] Segmentation fault
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
[2011-01-31 19:05:43] ERROR EOFError: end of file reached
So, I think it's not a wicked_pdf or dragonfly error? But a server
issue?
Any thoughts?
PS: And thats the output in the browser view by checking stdin of
Open3.popen3.
RuntimeError in ProjectsController#index
PDF could not be generated!
Loading pages (1/5)
[> ] 0%
[======> ] 10%
[======> ] 11%
[======> ] 11%
[========> ] 14%
[=========> ] 16%
[==========> ] 18%
[============> ] 20%
[=============> ] 23%
That is the output of wkhtmltopdf in the command, so the tool can't
get all resources of the pdf.