yob/pdf-reader — Issue #32: can't convert Symbol into Integer 
Author: lucasluitjes
Created: 2011-10-26 22:06:07+00:00
State: open

Hi! Been very happy with pdf-reader.

Noticed something odd: when calling .text on each page in the following pdf: http://www.tokyo-wako.com/site/menus/arcadia_dining.pdf I get the following error:

```
can't convert Symbol into Integer
/Users/lucas/.rvm/gems/ruby-1.9.2-p180/bundler/gems/pdf-reader-8a3dfe7a1f1d/lib/pdf/reader/page_text_receiver.rb:205:in `[]'
/Users/lucas/.rvm/gems/ruby-1.9.2-p180/bundler/gems/pdf-reader-8a3dfe7a1f1d/lib/pdf/reader/page_text_receiver.rb:205:in `invoke_xobject'
/Users/lucas/.rvm/gems/ruby-1.9.2-p180/bundler/gems/pdf-reader-8a3dfe7a1f1d/lib/pdf/reader/form_xobject.rb:62:in `block in callback'
/Users/lucas/.rvm/gems/ruby-1.9.2-p180/bundler/gems/pdf-reader-8a3dfe7a1f1d/lib/pdf/reader/form_xobject.rb:61:in `each'
/Users/lucas/.rvm/gems/ruby-1.9.2-p180/bundler/gems/pdf-reader-8a3dfe7a1f1d/lib/pdf/reader/form_xobject.rb:61:in `callback'
/Users/lucas/.rvm/gems/ruby-1.9.2-p180/bundler/gems/pdf-reader-8a3dfe7a1f1d/lib/pdf/reader/form_xobject.rb:73:in `content_stream'
/Users/lucas/.rvm/gems/ruby-1.9.2-p180/bundler/gems/pdf-reader-8a3dfe7a1f1d/lib/pdf/reader/form_xobject.rb:42:in `walk'
/Users/lucas/.rvm/gems/ruby-1.9.2-p180/bundler/gems/pdf-reader-8a3dfe7a1f1d/lib/pdf/reader/page_text_receiver.rb:212:in `invoke_xobject'
/Users/lucas/.rvm/gems/ruby-1.9.2-p180/bundler/gems/pdf-reader-8a3dfe7a1f1d/lib/pdf/reader/page.rb:144:in `block in callback'
/Users/lucas/.rvm/gems/ruby-1.9.2-p180/bundler/gems/pdf-reader-8a3dfe7a1f1d/lib/pdf/reader/page.rb:143:in `each'
/Users/lucas/.rvm/gems/ruby-1.9.2-p180/bundler/gems/pdf-reader-8a3dfe7a1f1d/lib/pdf/reader/page.rb:143:in `callback'
/Users/lucas/.rvm/gems/ruby-1.9.2-p180/bundler/gems/pdf-reader-8a3dfe7a1f1d/lib/pdf/reader/page.rb:130:in `content_stream'
/Users/lucas/.rvm/gems/ruby-1.9.2-p180/bundler/gems/pdf-reader-8a3dfe7a1f1d/lib/pdf/reader/page.rb:95:in `walk'
/Users/lucas/.rvm/gems/ruby-1.9.2-p180/bundler/gems/pdf-reader-8a3dfe7a1f1d/lib/pdf/reader/page.rb:65:in `text'
```

PDF seems to work fine with regular pdf readers. Personally I don't need it enough to free up time for digging in the pdf-reader source but maybe it's of interest.