ralsina / pdfrw

Automatically exported from code.google.com/p/pdfrw
Other
0 stars 0 forks source link

errors decoding pdf files #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm developing a Python's application using pdfrw and all seems ok, but i 
discovered that when i run my application with optimizations activated (python 
-OO) pdfrw can't decode any pdf and raises Exceptions.

By a quickly inspection of pdfrw's source code i found in pdfreader.py rows as 
these:
  assert source.next() == 'R'
  assert source.next() == '<<'
  assert source.next() == 'startxref' and source.floc > startloc

calling .next() in an assert will change the program working flow if 
optimizations are on or off.

Giuseppe

Original issue reported on code.google.com by gius.d...@gmail.com on 14 Sep 2012 at 7:48

GoogleCodeExporter commented 9 years ago
I'm busy removing the asserts.

Thanks,
Pat

Original comment by pmaupin on 18 Sep 2012 at 2:52

GoogleCodeExporter commented 9 years ago
I believe this has been fixed in subversion.  Please see if it works for you.

Thanks,
Pat

Original comment by pmaupin on 18 Sep 2012 at 3:32