yumorgans / origami-pdf

Automatically exported from code.google.com/p/origami-pdf
GNU Lesser General Public License v3.0
0 stars 0 forks source link

ACSII85 encoding bug #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. unzip attached file
2. run bug.rb
3. it attempts to create a new PDF file with a JScript stream, ACSII85 filter 
used.
4. Origami crashes with a "block in encode" error.

What is the expected output? What do you see instead?
Origami crahes every time if I use ASCII85 filter (for JScript stream or for 
attached file).

origami/filters.rb:337:in `block in encode': undefined method `/' for 
#<String:0x1674f60> (NoMethodError)
        from origami/filters.rb:336:in `times'
        from origami/filters.rb:336:in `encode'
        from origami/filters.rb:246:in `encode'
        from origami/stream.rb:341:in `encode_data'
        from origami/stream.rb:246:in `encode!'
        from origami/stream.rb:85:in `pre_build'
        from origami/pdf.rb:847:in `build'
        from origami/pdf.rb:857:in `block in build'
        from origami/dictionary.rb:115:in `call'
        from origami/dictionary.rb:115:in `block in map!'
        from origami/dictionary.rb:114:in `each_pair'
        from origami/dictionary.rb:114:in `map!'
        from origami/pdf.rb:851:in `build'
        from origami/pdf.rb:866:in `block in build'
        from origami/pdf.rb:865:in `each_value'
        from origami/pdf.rb:865:in `build'
        from origami/pdf.rb:878:in `block in physicalize'
        from origami/pdf.rb:877:in `each'
        from origami/pdf.rb:877:in `physicalize'
        from origami/pdf.rb:488:in `compile'
        from origami/pdf.rb:241:in `save'
        from origami/pdf.rb:260:in `saveas'
        from scripts/myscripts/bug.rb:21:in `<main>'

What version of the product are you using? On what operating system?
- Origami downloaded at 05/01/2011
- Ruby 1.9.2-p0 on Windows XP

Please provide any additional information below.
This error appears only with ASCII85 filter, if use any other filter everething 
works fine.

Original issue reported on code.google.com by reapedbr...@bk.ru on 20 Jan 2011 at 11:41

Attachments:

GoogleCodeExporter commented 9 years ago
It was a compatibility problem with 1.9 version of Ruby. Origami has not been 
very tested on 1.9, thanks for reporting this issue.

It should work now.

Original comment by guilla...@security-labs.org on 2 Feb 2011 at 3:36