Skip to content
This repository was archived by the owner on Nov 29, 2019. It is now read-only.

error: undefined method `ascent' #34

Open
amitpatelx opened this issue Mar 28, 2016 · 2 comments
Open

error: undefined method `ascent' #34

amitpatelx opened this issue Mar 28, 2016 · 2 comments

Comments

@amitpatelx
Copy link

Getting this error for all PDFs I have

amit@amit:~/projects/testapps/pdf/Untitled Folder/pdfs$ pdf-extract extract --references --titles --trace AUSTIN.pdf
/home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/font_metrics.rb:42:in `initialize': undefined method `ascent' for #<PDF::Reader::Font:0x000000030d97d0> (NoMethodError)
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/model/characters.rb:134:in `new'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/model/characters.rb:134:in `block in build_fonts'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/model/characters.rb:131:in `each'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/model/characters.rb:131:in `build_fonts'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/model/characters.rb:163:in `block (2 levels) in include_in'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/pdf.rb:81:in `call'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/pdf.rb:81:in `block (2 levels) in expand_listeners_to_callback_methods'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/pdf.rb:170:in `block in invoke_calls'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/pdf.rb:169:in `each'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/pdf.rb:169:in `invoke_calls'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/pdf-extract.rb:42:in `block in parse'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/pdf-extract.rb:38:in `each'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/pdf-extract.rb:38:in `parse'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/lib/pdf-extract.rb:53:in `view'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/bin/pdf-extract:115:in `block (4 levels) in <top (required)>'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/bin/pdf-extract:112:in `each'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/pdf-extract-0.1.1/bin/pdf-extract:112:in `block (3 levels) in <top (required)>'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/commander-4.4.0/lib/commander/command.rb:178:in `call'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/commander-4.4.0/lib/commander/command.rb:178:in `call'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/commander-4.4.0/lib/commander/command.rb:153:in `run'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/commander-4.4.0/lib/commander/runner.rb:444:in `run_active_command'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/commander-4.4.0/lib/commander/runner.rb:68:in `run!'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/commander-4.4.0/lib/commander/delegates.rb:15:in `run!'
    from /home/amit/.rvm/gems/ruby-2.2.2@magnificent/gems/commander-4.4.0/lib/commander/import.rb:5:in `block in <top (required)>'

@jlegewie
Copy link

Duplicate of #23, I think. #23 also discusses a temporary solution.

@johncant
Copy link

Looks like this is fixed in master

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

No branches or pull requests

3 participants