[Poppler-bugs] [Bug 81760] pdftops sometimes creates huge PS 3 files out of small PDFs

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Feb 8 05:51:27 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=81760

--- Comment #22 from William Bader <williambader at hotmail.com> ---
Created attachment 121582
  --> https://bugs.freedesktop.org/attachment.cgi?id=121582&action=edit
patch to add LZW and Flate compression

This patch adds LZW and Flate compression.

Flate should happen only with Level 3.
LZW should happen with Level 2 (and Level 3 when Flate is not enabled).

./configure has the options
--disable-zlib = disable flate compression (the default is enabled if zlib is
present)
--enable-zlib-uncompress = enable flate decompression using zlib instead of
poppler's built-in flate decompression. This corresponds to the old
--enable-zlib and is unsafe because zlib does not handle invalid streams as
well as poppler.

cmake has corresponding options -DENABLE_ZLIB=OFF -DENABLE_ZLIB_UNCOMPRESS=ON.
I tested configure more than cmake.

Errors in deflateInit() set the stream eof flag and print an error message with
error(errInternal).

I removed the -nolzw option in pdftops.

The LZW encoder is in Stream.cc and .h
The Flate encoder is in the new files FlateEncoder.cc and .h.
I didn't touch the copyrights except in FlateEncoder.
Since most of the LZW encoder came from xpdf-3.04, Derek should probably get
the credit for it.

Regards, William

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20160208/f5066126/attachment-0001.html>


More information about the Poppler-bugs mailing list