[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
Tue Feb 16 10:41:02 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=81760
--- Comment #23 from Adrian Johnson <ajohnson at redneon.com> ---
Comment on attachment 121582
--> https://bugs.freedesktop.org/attachment.cgi?id=121582
patch to add LZW and Flate compression
Review of attachment 121582:
-----------------------------------------------------------------
The LZW and Flate compression should be in two separate commits in order to
preserve the provenance of the code since the LZW code was copied from xpdf
while Flate is new code. The Glyph & Cog copyright dates in the source files,
poppler-config.h and man pages need updating.
::: .gitignore
@@ +36,4 @@
> *.exe
> +*.pdf
> +*.ps
> +*.eps
I don't think we want to add these to gitignore.
::: poppler/FlateEncoder.h
@@ +60,5 @@
> + virtual GBool isEncoder() { return gTrue; }
> +
> +private:
> +
> + enum FlateEncoderEnum { inBufSize = 16384, outBufSize = inBufSize };
Why use enums to define constants? The rest of the code uses #define or static
const.
::: poppler/Gfx.cc
@@ +2130,5 @@
> + if (fabs(det) < 0.000001) {
> + error(errSyntaxError, getPos(), "Singular matrix in tiling pattern fill");
> + return;
> + }
> + det = 1 / det;
What are the Gfx.cc changes for?
::: poppler/PSOutputDev.cc
@@ +3010,5 @@
> + if (useFlate) {
> + str = new FlateEncoder(str);
> + } else
> +#endif
> + if (useLZW) {
I would prefer to avoid using multiple "#if ENABLE_ZLIB" checks in this file.
In some places the flate code is wrapped in both the #if and "if (useFlate)".
In other places it just has the "if (useFlate)". It is not clear to anyone
modifying this file is there is a reason for the distinction.
It would be better to have just one
#ifndef ENABLE_ZLIB
useFlate = gFalse;
#endif
and rely on checking useFlate in the rest of the code.
--
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/20160216/7a4b0759/attachment-0001.html>
More information about the Poppler-bugs
mailing list