Hi List,

That code, running on my headless (no X) server, is crashing pathetically:

chloe@ayodhya:~/pdfparser$ cat test.rb
begin
require 'gtk2'
rescue Gtk::InitError
end
require "poppler"

buf = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, true, 8, 1024, 768)

# copy the rendered buffer into an pixmap for further editing
map = Gdk::Pixmap.new(nil, 1024, 768, 24)
map.draw_pixbuf(nil, buf, 0, 0, 0, 0, -1, -1, Gdk::RGB::DITHER_NONE, 0, 0)

Like that:
chloe@ayodhya:~/pdfparser$ ruby  test.rb
test.rb: line 10
   Gdk-CRITICAL **:IA__gdk_screen_get_root_window: assertion `GDK_IS_SCREEN (screen)' failed
test.rb: line 10
   Gdk-CRITICAL **:IA__gdk_drawable_get_depth: assertion `GDK_IS_DRAWABLE (drawable)' failed
Segmentation fault

I don't like much the idea of running an X server just for running that piece of software but feel like I'll have to.

Any insight?

Thanks
Chloé