Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About
Login

Console View

Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

Albert Astals Cid
Poppler 21.08.0
Albert Astals Cid
Update (C)
Adrian Johnson
Date string may be in unicode
Oliver Sander
Use additional samples to test for constant parts of an axial gradient
The method doAxialShFill does adaptive sampling of gradients.
If the gradient color is found to be the same at two consecutive
sampling locations then the gradient is concluded to be constant
between the two locations.

Of course, this conclusion may be wrong; one instance of this
happening is

  https://gitlab.freedesktop.org/poppler/poppler/-/issues/938

This patch fixes rendering of the test file in issue 938 by doing
one more sampling when a part of the gradient is suspected to be
constant.  Of course it is easily possible to create gradients
also misrender with the additional sampling point.  Should such
gradients ever appear in actual non-synthetic documents the code
can now easily handle yet more sample points.

Fixes: https://gitlab.freedesktop.org/poppler/poppler/-/issues/938
  • runtests: 36 unexpected failures (0.64%) [36 cairo (100.00%)] -  stdio
Albert Astals Cid
Fix XRef::copy when we have modified objects
Albert Astals Cid
Support reading the Version from the Catalog
Fixes #1097
Albert Astals Cid
GfxCIDFont::getNextChar: Also set ox and oy to 0 on the non cmap case
Otherwise we may end up using uninitized values

oss-fuzz/36396
Hib Eris
Validate input from page offset hints table
Fixes: https://gitlab.freedesktop.org/poppler/poppler/-/issues/343
Albert Astals Cid
Update (C)
Oliver Sander
Replace a local bubble sort implementation by std::sort
This makes the code a bit shorter.
Albert Astals Cid
Update (C)
Oliver Sander
Make getPdfVersion return a dedicated version object
That's a bit more modern than the old way where pointers to two
integers had to be passed to the method.

With the new method you can write

  auto pdfVersion = doc->getPdfVersion();
  // access numbers as pdfVersion.major and pdfVersion.minor

instead of

  int major, minor;
  doc->getPdfVersion(&major, &minor);

With C++17 you can even write

  auto [major, minor] = doc->getPdfVersion();

The new method is put alongside the old one in the Qt5 interface.
It replaces the old one in the Qt6 interface.
Nelson Benítez León
glib: mimick TextSelectionDumper logic change for spaceAfter
Commit d6cccfb8d814d89c51c9e65563be2e475f46212b caused
issue #1100 because that change in the TextSelectionDumper
logic *must be mimicked* in poppler_page_get_text_layout_for_area()
and in poppler_page_get_text_attributes_for_area() because
all those functions must be consistent with each other in
the way they traverse and extract the text from the PDF.

Otherwise, wrong results may happen when using them
to map between graphical coordinates of text glyphs and
their corresponding positions in the text obtained from
poppler_page_get_text() (which uses TextSelectionDumper
to extract the text).

Fixes issue #1100
Nelson Benítez León
Add glib test for issue #1100
Albert Astals Cid
AnnotAppearanceBuilder::drawListBox: Fix memory leak on error condition
oss-fuzz/35996
Albert Astals Cid
Update (C)
Oliver Sander
Document that a document has to outlive its pages
Because the Page objects handed out by Document objects store a
pointer to the document.  If the Document object is deleted
before a Page object it handed out, that Page object will have
a stale pointer.
Albert Astals Cid
Update (C)
RM
Modify internal API to allow addition and modification of outlines into a PDF. Tests in the qt5/qt6 directories.
duplicate qt5 outline test in qt6 directory
Zachary Travis
Create fallback fonts as needed.
If a PDF form field value uses a font that is not in the resources dictionary, a warning is logged and the field value is ignored/not displayed. It's unclear whether this behavior is strictly valid based on the PDF spec (since typically font references, even to base fonts, require a corresponding font dictionary) but Acrobat seems to display the content anyway.
Albert Astals Cid
JBIG2Stream: Fix regression caused by 2b2808719d2c91283ae358381391bb0b37d9061d
Uli Schlachter
Better error messages when libopenjpeg2 is not found
When I run "cmake -DENABLE_DCTDECODER=none -DENABLE_BOOST=OFF" on my
system, I get the following output:

    -- Found Iconv: /usr/lib/x86_64-linux-gnu/libc.so
    CMake Warning at CMakeLists.txt:252 (find_package):
      By not providing "FindOpenJPEG.cmake" in CMAKE_MODULE_PATH this project has
      asked CMake to find a package configuration file provided by "OpenJPEG",
      but CMake did not find one.

      Could not find a package configuration file provided by "OpenJPEG" with any
      of the following names:

        OpenJPEGConfig.cmake
        openjpeg-config.cmake

      Add the installation prefix of "OpenJPEG" to CMAKE_PREFIX_PATH or set
      "OpenJPEG_DIR" to a directory containing one of the above files.  If
      "OpenJPEG" provides a separate development package or SDK, be sure it has
      been installed.

    CMake Error at CMakeLists.txt:255 (message):
      Install libopenjpeg2 before trying to build poppler.  You can also decide
      to use the internal unmaintained JPX decoder or none at all.

    -- Configuring incomplete, errors occurred!
    See also "/tmp/poppler/build/CMakeFiles/CMakeOutput.log".
    See also "/tmp/poppler/build/CMakeFiles/CMakeError.log".

To figure out what exactly to do now, I have to read some
CMakeLists.txt. This commit improves the situation by producing the
following output instead:

    -- Found Iconv: /usr/lib/x86_64-linux-gnu/libc.so
    CMake Warning at CMakeLists.txt:254 (find_package):
      By not providing "FindOpenJPEG.cmake" in CMAKE_MODULE_PATH this project has
      asked CMake to find a package configuration file provided by "OpenJPEG",
      but CMake did not find one.

      Could not find a package configuration file provided by "OpenJPEG" with any
      of the following names:

        OpenJPEGConfig.cmake
        openjpeg-config.cmake

      Add the installation prefix of "OpenJPEG" to CMAKE_PREFIX_PATH or set
      "OpenJPEG_DIR" to a directory containing one of the above files.  If
      "OpenJPEG" provides a separate development package or SDK, be sure it has
      been installed.

    -- Could NOT find openjpeg2.
    CMake Error at CMakeLists.txt:258 (message):
      Install libopenjpeg2 before trying to build poppler.  You can also decide
      to use the internal unmaintained JPX decoder or none at all.

      Possible options are: -DENABLE_LIBOPENJPEG=openjpeg2,
      -DENABLE_LIBOPENJPEG=none, -DENABLE_LIBOPENJPEG=unmaintained,

    -- Configuring incomplete, errors occurred!
    See also "/tmp/poppler/build/CMakeFiles/CMakeOutput.log".
    See also "/tmp/poppler/build/CMakeFiles/CMakeError.log".

Signed-off-by: Uli Schlachter <psychon@znc.in>
Uli Schlachter
Better error message when libjpeg is not found
When I run cmake on my system, I get the following output:

    -- Checking for module 'nss>=3.19'
    --  Package 'nss', required by 'virtual:world', not found
    -- Could NOT find NSS3 (missing: NSS3_LIBRARIES NSS3_CFLAGS)
    CMake Error at CMakeLists.txt:149 (message):
      Install libjpeg before trying to build poppler.  You can also decide to use
      the internal unmaintained DCT decoder or none at all.

    -- Configuring incomplete, errors occurred!
    See also "/tmp/poppler/build/CMakeFiles/CMakeOutput.log".
    See also "/tmp/poppler/build/CMakeFiles/CMakeError.log".

Being (badly) trained in CMake errors, I see "Could NOT find NSS3" and
conclude that this is the problem. I do not even read the actual error
message.

This commit improves the situation by producing the following output
instead:

    -- Checking for module 'nss>=3.19'
    --  Package 'nss', required by 'virtual:world', not found
    -- Could NOT find NSS3 (missing: NSS3_LIBRARIES NSS3_CFLAGS)
    -- Could NOT find libjpeg.
    CMake Error at CMakeLists.txt:150 (message):
      Install libjpeg before trying to build poppler.  You can also decide to use
      the internal unmaintained DCT decoder or none at all.

      Possible options are: -DENABLE_DCTDECODER=libjpeg,
      -DENABLE_DCTDECODER=none, -DENABLE_DCTDECODER=unmaintained

    -- Configuring incomplete, errors occurred!
    See also "/tmp/poppler/build/CMakeFiles/CMakeOutput.log".
    See also "/tmp/poppler/build/CMakeFiles/CMakeError.log".

This also explicitly lists the possible values for the parameter that I
figured out by reading the code around CMakeLists.txt:151.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Albert Astals Cid
poppler 21.07.0
Albert Astals Cid
Update (C)
Oliver Sander
JBIG2Stream: Do not abort if size-0 allocations returns nullptr
The JBIG2SymbolDict constructor gets a size parameter, and it allocates
memory for a bitmap of that size.  Bug report 535

  https://gitlab.freedesktop.org/poppler/poppler/-/issues/535

has a file where this size is 0.  In that case, the call to
gmallocn_checkoverflow returns nullptr, and subsequent calls to
JBIG2SymbolDict::isOk return false.  This is then interpreted
as an error, and the JBIG2 processing is aborted.  For the
test file mentioned above this happens in line 1807.

I don't know whether such a file with a size-0 symbol dict
is malformed or not.  However, the test file renders just fine
if the 'failing' allocation is simply ignored.  This patch
therefore relaxes the isOk method a little.  A JBIG2SymbolDict
object is now deemed 'ok' either if it holds a bitmap (that was
the previous test) *or if it has size 0*.

This fixes

  https://gitlab.freedesktop.org/poppler/poppler/-/issues/535
  • runtests: 16 unexpected failures (0.29%) [8 cairo (50.00%), 8 splash (50.00%)] -  stdio
Uli Schlachter
~CairoOutputDev(): Free textClipPath
The textClipPath member is set in CairoOutputDev::endString() and freed
in CairoOutputDev::endTextObject(). However, if endTextObject() is not
called for whatever reason, the path will just be leaked.

This adds code to the destructor to free this.

This fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32326

Testing done:

$ wget -O testcase 'https://oss-fuzz.com/download?testcase_id=6659952325296128'
[...]
$ cmake .. -G Ninja -DENABLE_DCTDECODER=unmaintained -DENABLE_BOOST=OFF -DENABLE_LIBOPENJPEG=unmaintained && ninja
[...]
$ git describe
poppler-21.06.1-5-gb7c40059
$ valgrind --leak-check=full ./utils/pdftocairo testcase -png foo
[...]
==104075==
==104075== HEAP SUMMARY:
==104075==    in use at exit: 28,292 bytes in 55 blocks
==104075==  total heap usage: 6,114 allocs, 6,059 frees, 1,617,444 bytes allocated
==104075==
==104075== 24 bytes in 1 blocks are definitely lost in loss record 4 of 37
==104075==    at 0x483877F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==104075==    by 0x48AE748: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11600.0)
==104075==    by 0x118995: endString (CairoOutputDev.cc:1474)
==104075==    by 0x118995: CairoOutputDev::endString(GfxState*) (CairoOutputDev.cc:1412)
==104075==    by 0x4B97295: Gfx::doShowText(GooString const*) (Gfx.cc:4010)
==104075==    by 0x4B97CB4: Gfx::opShowSpaceText(Object*, int) (Gfx.cc:3793)
==104075==    by 0x4B8D866: Gfx::go(bool) (Gfx.cc:681)
==104075==    by 0x4B8DCFA: display (Gfx.cc:642)
==104075==    by 0x4B8DCFA: Gfx::display(Object*, bool) (Gfx.cc:622)
==104075==    by 0x4BE1A83: Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) (Page.cc:576)
==104075==    by 0x11317C: renderPage (pdftocairo.cc:669)
==104075==    by 0x11317C: main (pdftocairo.cc:1183)
==104075==
==104075== LEAK SUMMARY:
==104075==    definitely lost: 24 bytes in 1 blocks
==104075==    indirectly lost: 0 bytes in 0 blocks
==104075==      possibly lost: 0 bytes in 0 blocks
==104075==    still reachable: 28,268 bytes in 54 blocks
==104075==        suppressed: 0 bytes in 0 blocks
==104075== Reachable blocks (those to which a pointer was found) are not shown.
==104075== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==104075==
==104075== For lists of detected and suppressed errors, rerun with: -s
==104075== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
$ git checkout cairo-leak-textClipPath && git describe && ninja
Zu Branch 'cairo-leak-textClipPath' gewechselt
poppler-21.06.1-6-g8df6f8d2
$ valgrind --leak-check=full ./utils/pdftocairo testcase -png foo
[...]
==104263==
==104263== HEAP SUMMARY:
==104263==    in use at exit: 28,268 bytes in 54 blocks
==104263==  total heap usage: 6,114 allocs, 6,060 frees, 1,617,444 bytes allocated
==104263==
==104263== LEAK SUMMARY:
==104263==    definitely lost: 0 bytes in 0 blocks
==104263==    indirectly lost: 0 bytes in 0 blocks
==104263==      possibly lost: 0 bytes in 0 blocks
==104263==    still reachable: 28,268 bytes in 54 blocks
==104263==        suppressed: 0 bytes in 0 blocks
==104263== Reachable blocks (those to which a pointer was found) are not shown.
==104263== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==104263==
==104263== For lists of detected and suppressed errors, rerun with: -s
==104263== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

As you (might) see, before this commit, there is a "definitely lost"
leak of 24 bytes with this test case. After this commit, this leak is
gone.

Signed-off-by: Uli Schlachter <psychon@znc.in>
Albert Astals Cid
cmake: set C standard to 11 without extensions
Albert Astals Cid
Update (C) of previous commits
Hubert Figuiere
Remove ENABLE_SPLASH and HAVE_SPLASH (always true)
Philipp Knechtges
PSOutputDev: fix off-by-one error for image masking in L1/L2 output
Fixes issue #1088
Albert Astals Cid
Form: make sure quadding has a valid value
Albert Astals Cid
CI: switch mingw CI to fedora 33
fedora 34 is giving weird errors around libjpeg
Albert Astals Cid
poppler 21.06.1
Nelson Benítez León
glib: fix poppler_rectangle_free() regression
Regression from e3fed321f230a4a91df873e6d9a213ba8dad6694

Fixes issue #1087
Albert Astals Cid
poppler 21.06.0
Albert Astals Cid
Move the ownerKey/userKey padding to the correct place
Albert Astals Cid
pad ownerKey/userKey if < 32
Inspired by xpdf
Albert Astals Cid
Don't force ownerKey and userKey to be exacly 32 chars long
The spec says that they have to be this long, but then when calculating
the hashes says "if it is longer, cut it, if it is shorter, add these
characters" (and we implement that) so it's a bit of spec mismatch.

Fixes issue #1083
Albert Astals Cid
uintx -> uintx_t
The non _t types were provided by libtiff and are now deprecated