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 21: zlib.error: Error -3 while decompressing: unknown compression method
2 people starred this issue and may be notified of changes. Back to list
Status:  Duplicate
Owner:  pts...@gmail.com
Closed:  Apr 2012


 
Reported by lev.bishop, Nov 16, 2009
What command do you run to optimize the PDF?
user@ubuntu804server:~/manypdfs/fail2$ ~/pdfsizeopt/pdfsizeopt.py --use-
pngout=false --use-multivalent=true ../fail/pci64_board_ds.pdf kl.pdf

What does pdfsizeopt display when running the command above?
info: This is pdfsizeopt.py r132.
info: loading PDF from: ../fail/pci64_board_ds.pdf
info: loaded PDF of 112045 bytes
info: separated to 58 objs
info: found 0 Type1 fonts loaded
info: found 0 Type1C fonts loaded
Traceback (most recent call last):
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 6141, in ?
    main(sys.argv)
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 6127, in main
    pdf.OptimizeImages(use_pngout=use_pngout, use_jbig2=use_jbig2)
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 4827, in OptimizeImages
    colorspace, colorspace_has_changed = PdfObj.ResolveReferences(
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 2082, in 
ResolveReferences
    data = cls.PDF_REF_RE.sub(Replacement, data)
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 2059, in Replacement
    new_data = cls.PDF_REF_RE.sub(Replacement, new_data)
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 2069, in Replacement
    return obj.EscapeString(obj.GetUncompressedStream(objs=objs))
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 1962, in 
GetUncompressedStream
    return PermissiveZlibDecompress(self.stream)
  File "/home/user/pdfsizeopt/pdfsizeopt.py", line 120, in 
PermissiveZlibDecompress
    uncompressed = zlib.decompressobj().decompress(data)
zlib.error: Error -3 while decompressing: unknown compression method

What's wrong with the optimized PDF?

What should be there in the optimized PDF instead?

pci64_board_ds.pdf
109 KB   Download
Nov 17, 2009
Project Member #1 pts...@gmail.com
This is an encrypted PDF (with an /Encrypt dictionary in its trailer). pdfsizeopt.py
cannot read encrypted PDFs. I'll add a more informative error message and some
documentation soon.
Status: Accepted
Apr 15, 2012
Project Member #2 pts...@gmail.com
Merged to issue 51.
Status: Duplicate

Powered by Google Project Hosting