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 75: pdfsizeopt gives a traceback when processing the current pgf manual
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  pts...@gmail.com
Closed:  Feb 2013


 
Reported by rbr...@gmail.com, Feb 19, 2013
While trying to test pdfsizeopt, I had a problem with the current pgf manual (using revision 223 of pdfsizeopt):

----
./pdfsizeopt.py pgfmanual.pdf.1 
info: This is pdfsizeopt.py rUNKNOWN size=316511.
info: using Java for Multivalent: /usr/bin/java
info: loading PDF from: pgfmanual.pdf.1
info: loaded PDF of 5346838 bytes
Traceback (most recent call last):
  File "./pdfsizeopt.py", line 7846, in <module>
    main(sys.argv)
  File "./pdfsizeopt.py", line 7808, in main
    ).Load(file_name)
  File "./pdfsizeopt.py", line 3474, in Load
    data, do_ignore_generation_numbers=self.do_ignore_generation_numbers)
  File "./pdfsizeopt.py", line 3818, in ParseUsingXref
    xref_ofs, xref_obj_num, xref_generation)
  File "./pdfsizeopt.py", line 3626, in ParseUsingXrefStream
    w0, w1, w2, index, xref_data = xref_obj.GetAndClearXrefStream()
  File "./pdfsizeopt.py", line 1466, in GetAndClearXrefStream
    xref_tuple = self.GetXrefStream()
  File "./pdfsizeopt.py", line 1459, in GetXrefStream
    (len(xref_data), widths, index))
__main__.PdfXrefStreamError: data length does not match /Index: xref_data_size=186135 widths=[1, 3, 1] index=(0, 37226)
----

If you need any extra information, please let me know.


Thanks,

Rogério Brito.
Feb 19, 2013
Project Member #1 pts...@gmail.com
Fixed in r224.

Thank you for reporting this problem.

FYI The offending pgfmanual.pdf is invalid PDF (see attached), because its cross-reference stream was one item too long (compared to its /Index). To fix the file, the 2nd number in its `/Index [0 37226]' should be increased by 1. Feel free to report this bug to whoever has created pgfmanual.pdf. Anyway, pdfsizeopt, as of r224 is able to parse such invalid PDF.
pgfmanual.pdf
5.1 MB   Download
Status: Fixed

Powered by Google Project Hosting