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 56: Optimization fails on long titles
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Apr 2012


 
Reported by TTSten...@gmail.com, Apr 1, 2012
What steps will reproduce the problem?
1. Download http://www.emotion.uni-kiel.de/fileadmin/emotion/team/kaernbach/publications/1987_kae_al_jasa.pdf (or attached file)
2. python pdfsizeopt.py 1987_kae_al_jasa.pdf

What is the expected output? What do you see instead?
info: This is pdfsizeopt.py rUNKNOWN size=281028.
info: loading PDF from: 1987_kae_al_jasa.pdf
info: loaded PDF of 320286 bytes
info: separated to 47 objs + xref + trailer
Traceback (most recent call last):
  File "/home/tristan/arbeit/pdfsizeopt/pdfsizeopt.py", line 7029, in <module>
    main(sys.argv)
  File "/home/tristan/arbeit/pdfsizeopt/pdfsizeopt.py", line 7002, in main
    ).Load(file_name)
  File "/home/tristan/arbeit/pdfsizeopt/pdfsizeopt.py", line 3275, in Load
    do_ignore_generation_numbers=self.do_ignore_generation_numbers)
  File "/home/tristan/arbeit/pdfsizeopt/pdfsizeopt.py", line 396, in __init__
    i = self.FindEndOfObj(other, skip_obj_number_idx, len(other))
  File "/home/tristan/arbeit/pdfsizeopt/pdfsizeopt.py", line 839, in FindEndOfObj
    data=data, start=match.start(1), end_ofs_out=end_ofs_out)
  File "/home/tristan/arbeit/pdfsizeopt/pdfsizeopt.py", line 2098, in RewriteToParsable
    ' <%s>' % eval(''.join(string_output), {}).encode('hex'))
  File "<string>", line 1
    'On Riccati Equations Describing Impedance Relations for Forward and Back
                                                                            ^
SyntaxError: EOL while scanning string literal


What version of the product are you using? On what operating system?
r173, Ubuntu Linux
1987_kae_al_jasa.pdf
312 KB   Download
Apr 2, 2012
Project Member #1 pts...@gmail.com
Thank you for your time and effort composing and submitting this bug report. Based on the information you provided I was able to diagnose and fix the problem in r174. Please download the latest pdfsizeopt.py and try again.

FYI I had to use Python 2.7 to reproduce the problem (it wasn't a SyntaxError in Python 2.6). It turned out that pdfsizeopt.py r173 didn't parse string literals with backslash-cr and backslash-cr-lf correctly.
Status: Fixed
Apr 2, 2012
#2 TTSten...@gmail.com
Works now, thanks!

Powered by Google Project Hosting