gdelugre / origami

Origami is a pure Ruby library to parse, modify and generate PDF documents.
GNU Lesser General Public License v3.0
325 stars 110 forks source link

Can't get "pdfwalker" to work #22

Closed MegasAlexios closed 5 years ago

MegasAlexios commented 7 years ago

I installed Ruby 2.4.1-1 (x86), then I launched gem install origami and, as I wanted to use the gui version, also did gem install gtk2 (I'm on a Win 10 pro x64 machine) Everything fine so far (verified the gtk2 installation with ruby -rgtk2 -e "Gtk::Window.new.show;Gtk.main" and a window appeared). But still can't use "pdfwalker", this is the output I get: C:/Ruby24/lib/ruby/gems/2.4.0/gems/origami-2.0.3/bin/gui/treeview.rb:54:in <class:PDFTree>': 'Pango::WEIGHT_NORMAL' has been deprecated. Use 'Pango::Weight::NORMAL' or ':normal'. C:/Ruby24/lib/ruby/gems/2.4.0/gems/origami-2.0.3/bin/gui/treeview.rb:54:in': 'Pango::STYLE_NORMAL' has been deprecated. Use 'Pango::Style::NORMAL' or ':normal'. C:/Ruby24/lib/ruby/gems/2.4.0/gems/origami-2.0.3/bin/gui/treeview.rb:382:in reset_appearance': 'Pango::WEIGHT_BOLD' has been deprecated. Use 'Pango::Weight::BOLD' or ':bold'. C:/Ruby24/lib/ruby/gems/2.4.0/gems/origami-2.0.3/bin/gui/treeview.rb:391:inreset_appearance': 'Pango::STYLE_ITALIC' has been deprecated. Use 'Pango::Style::ITALIC' or ':italic'. C:/Ruby24/lib/ruby/gems/2.4.0/gems/origami-2.0.3/bin/gui/treeview.rb:396:in reset_appearance': 'Pango::STYLE_OBLIQUE' has been deprecated. Use 'Pango::Style::OBLIQUE' or ':oblique'. C:/Ruby24/lib/ruby/gems/2.4.0/gems/glib2-3.1.6-x86-mingw32/lib/glib2/deprecatable.rb:112:inconst_missing': uninitialized constant Pango::FontDescription::Weight (NameError) Did you mean? Pango::Weight from C:/Ruby24/lib/ruby/gems/2.4.0/gems/origami-2.0.3/bin/gui/treeview.rb:63:in initialize' from C:/Ruby24/lib/ruby/gems/2.4.0/gems/origami-2.0.3/bin/gui/treeview.rb:28:innew' from C:/Ruby24/lib/ruby/gems/2.4.0/gems/origami-2.0.3/bin/gui/treeview.rb:28:in create_treeview' from C:/Ruby24/lib/ruby/gems/2.4.0/gems/origami-2.0.3/bin/gui/walker.rb:202:ininit_interface' from C:/Ruby24/lib/ruby/gems/2.4.0/gems/origami-2.0.3/bin/gui/walker.rb:79:in initialize' from C:/Ruby24/lib/ruby/gems/2.4.0/gems/origami-2.0.3/bin/gui/walker.rb:59:innew' from C:/Ruby24/lib/ruby/gems/2.4.0/gems/origami-2.0.3/bin/gui/walker.rb:59:in start' from C:/Ruby24/lib/ruby/gems/2.4.0/gems/origami-2.0.3/bin/pdfwalker:6:in<top (required)>' from C:/Ruby24/bin/pdfwalker:22:in load' from C:/Ruby24/bin/pdfwalker:22:in

'

ghost commented 7 years ago

I am struggling with this same error. I suspect there is a dependency for specific version of ruby-gtk2, but the older versions of ruby-gtk2 won't compile on my system.

gdelugre commented 7 years ago

The API of ruby-gtk2 had changed, which caused a breakage.

I have adapted the code to their new version and moved pdfwalker to a separate gem / repository for better handling of dependencies and separating the issues.

The repository is now at https://github.com/gdelugre/pdfwalker and it can be installed separately with gem install pdfwalker.