5

Are there bindings for layout engines like Gecko or WebKit for Perl? I found Gtk2-Webkit on CPAN but I would like to know if there are other options.

My idea is to use one of those engines to create thumbnails of web pages from a Perl script.

Sinan Ünür
  • 116,958
  • 15
  • 196
  • 339
munissor
  • 3,755
  • 22
  • 24

4 Answers4

8

I haven't tried it myself, but the documentation for WWW::Mechanize::FireFox looks pretty impressive.

Update:

Tried it now. This rocks. You can indeed remote-control Firefox whatever way you want and create screen-shots easily.

innaM
  • 47,505
  • 4
  • 67
  • 87
3

XUL::Gui allows you to create GUI applications using Firefox. I am not sure if this corresponds to your needs, but it would be an interesting module to examine.

Update: XUL::Gui indeed is an interesting module to examine, but I did not realize how far WWW::Mechanize::Firefox had come.

Sinan Ünür
  • 116,958
  • 15
  • 196
  • 339
  • But I think that XUL::Gui supports only a subset of HTML and there is no way to have an image of the rendered content. – munissor Nov 13 '09 at 15:31
  • 1
    XUL::Gui supports all of HTML, all of XUL, and any other tag you want (created at runtime with the 'tag' and 'object' functions). @munissor => speaking as the author, was there anything in the XUL::Gui documentation that implied a limited subset? if so I'll be sure to fix it. – Eric Strom Nov 17 '09 at 21:43
  • I agree with Sinan though that WWW::Mechanize::Firefox is probably a better fit for this task. – Eric Strom Nov 17 '09 at 22:10
2

Also Gtk2::MozEmbed

Alexandr Ciornii
  • 7,346
  • 1
  • 25
  • 29
1

There's also Wx and just plain Gtk

mpeters
  • 4,737
  • 3
  • 27
  • 41