| Issue 12: | expected endstream+endobj,seems new bug | |
| Back to list |
F:\2009\pdfsizeopt\win32>python pdfsizeopt.py cube.pdf
info: This is pdfsizeopt.py rUNKNOWN.
info: loading PDF from: cube.pdf
info: loaded PDF of 14208 bytes
info: separated to 5 objs
info: found 0 Type1 fonts loaded
info: found 0 Type1C fonts loaded
info: writing Multivalent input PDF: pso.conv.mi.tmp.pdf
info: saving PDF with 4 objs to: pso.conv.mi.tmp.pdf
info: generated 14203 bytes (100%)
info: executing Multivalent to optimize PDF: java -cp Multivalent.jar
tool.pdf.C
ompress pso.conv.mi.tmp.pdf
file:/F:/2009/pdfsizeopt/win32/pso.conv.mi.tmp.pdf, 14203 bytes
additional compression may be possible with:
-compact
=> new length = 14042, saved 1%, elapsed time = 0 sec
info: Multivalent generated pso.conv.mi.tmp-o.pdf of 421 bytes (3%)
Traceback (most recent call last):
File "pdfsizeopt.py", line 6121, in <module>
main(sys.argv)
File "pdfsizeopt.py", line 6114, in main
pdf.SaveWithMultivalent(output_file_name)
File "pdfsizeopt.py", line 5948, in SaveWithMultivalent
data = self.FixPdfFromMultivalent(data)
File "pdfsizeopt.py", line 5722, in FixPdfFromMultivalent
obj_num_by_ofs_out=obj_num_by_in_ofs)
File "pdfsizeopt.py", line 5475, in ParseSequentially
objs=length_objs)
File "pdfsizeopt.py", line 450, in __init__
(endstream_str, file_ofs + stream_end_idx))
__main__.PdfTokenParseError: expected endstream+endobj in '' at 13911
Oct 31, 2009
Project Member
#1
pts...@gmail.com
Status:
Started
Nov 1, 2009
yes, in windows, need open(filename,'rb'), it is a bug of windows. it works on my Linux environment.
Feb 10, 2011
Although there is still no official port of pdfsizeopt to Win32, in r148 I made it a bit easier to use pdfsizeopt on Windows: now it opens every file and pipe in binary mode. Feel free to volunteer to write a Windows port. Maybe the post complicated part would be making Ghostscript invocations work with os.popen.
Status:
Fixed
|