My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 46: Doesn't work with python 2.7.1 (Fedora 15)
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  pts...@gmail.com
Closed:  Jun 2011


 
Reported by mstar...@wcs.org, Jun 30, 2011

Using your test file 5176.CFF.pdf:

[user@localhost pdfsizeopt]$ python pdfsizeopt.py --use-pngout=true --use-jbig2=true --use-multivalent=true 5176.CFF.pdf 
info: This is pdfsizeopt.py rUNKNOWN size=278997.
info: loading PDF from: 5176.CFF.pdf
info: loaded PDF of 521909 bytes
info: separated to 567 objs + xref + trailer
Traceback (most recent call last):
  File "pdfsizeopt.py", line 6963, in <module>
    main(sys.argv)
  File "pdfsizeopt.py", line 6936, in main
    ).Load(file_name)
  File "pdfsizeopt.py", line 3239, in Load
    do_ignore_generation_numbers=self.do_ignore_generation_numbers)
  File "pdfsizeopt.py", line 396, in __init__
    i = self.FindEndOfObj(other, skip_obj_number_idx, len(other))
  File "pdfsizeopt.py", line 839, in FindEndOfObj
    data=data, start=match.start(1), end_ofs_out=end_ofs_out)
  File "pdfsizeopt.py", line 2093, in RewriteToParsable
    ' <%s>' % eval(''.join(string_output), {}).encode('hex'))
  File "<string>", line 1
    '/space/C/o/p/y/r/i/g/h/t/one/nine/six/endash/eight/comma/two/zero/three/b/A/d/e/S/s/m/I/n/c/a/period/l/v/N/f/u/hyphen/w/P/k/x/T/quoteright/quotedblleft/quotedblright/parenleft/parenright/j/M/Q/D/W/L/H/G/slash/U/F/q/numbersign/five/seven/colon/registered/E
                                                                                                                                                                                                                                                                   ^
SyntaxError: EOL while scanning string literal

Jun 30, 2011
Project Member #1 pts...@gmail.com
Thank you for reporting this problem in detail. Fixed it in r166.

Please note that this issue was specific to Python 2.7. In Python 2.6 it worked even before the fix.
Jun 30, 2011
Project Member #2 pts...@gmail.com
(No comment was entered for this change.)
Status: Fixed

Powered by Google Project Hosting