poppler issueshttps://gitlab.freedesktop.org/poppler/poppler/-/issues2022-01-05T19:02:28Zhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/1190pdfsig password error.2022-01-05T19:02:28ZMayank Guptapdfsig password error.My pdf is password protected and there is no way to enter password in arguments.
```
root@651c62d41905:/# pdfsig -help
pdfsig version 21.06.1
Copyright 2005-2021 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-201...My pdf is password protected and there is no way to enter password in arguments.
```
root@651c62d41905:/# pdfsig -help
pdfsig version 21.06.1
Copyright 2005-2021 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2011 Glyph & Cog, LLC
```
and the error i am getting
```
root@651c62d41905:/# pdfsig maya1999.pdf
Command Line Error: Incorrect password
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1185PDF digital signature box is missing certain non-ASCII characters from the ce...2021-12-07T00:10:32ZKryštof PíštěkPDF digital signature box is missing certain non-ASCII characters from the certificate's CNWhen I sign a PDF document with Okular, the generated box with the digital signature contains the CN of the certificate in two different places, but certain (but not all) non-ASCII characters are missing from the name. I am attaching an ...When I sign a PDF document with Okular, the generated box with the digital signature contains the CN of the certificate in two different places, but certain (but not all) non-ASCII characters are missing from the name. I am attaching an example PDF and the certificate used for signing it. From my investigation of the code, it appears that the actual signature box is generated by poppler, not by Okular, but I couldn't figure out a way to debug the issue myself (Okular didn't pick up the rebuilt library when I attempted to modify it, even after changing the LD_LIBRARY_PATH and various CMake variables). If there is a CLI tool for digital signatures included in poppler, I would be more than happy to attempt to reproduce the issue with it.
The issue existed in poppler 21.11.0, combined with Okular 21.11.90 (packaged in Arch Linux). Attempting to build the git version of the library and Okular did not fix anything.
Any help with this issue would be very much appreciated.
Attachments:
[examplepdf_signed.pdf](/uploads/512fd74d59e077b90e482f38f94d3d30/examplepdf_signed.pdf)
[signing-certificate.cer](/uploads/bd75dbdb802e284e57d95207f3a2a1a1/signing-certificate.cer)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1184Incorrect results produced by pottopm2021-12-09T06:25:31ZShaohua LiIncorrect results produced by pottopmHi there,
I compiled poppler with `clang -O0 and `clang -O2`. I found that for some inputs, the generated `popptom` would emit different results.
- Compile args: compile poppler twice. Once with _`CC=clang-13 CXX=clang++-13 CFLAGS="-O0...Hi there,
I compiled poppler with `clang -O0 and `clang -O2`. I found that for some inputs, the generated `popptom` would emit different results.
- Compile args: compile poppler twice. Once with _`CC=clang-13 CXX=clang++-13 CFLAGS="-O0" CXXFLAGS="-O0"`_. Another with _`CC=clang-13 CXX=clang++-13 CFLAGS="-O2" CXXFLAGS="-O2"`_.
- Reproduce: run **`./utils/pdftoppm -mono -cropbox diff.pdf`** with two `pdftoppm`, you may need to run `pdftoppm (clang -O2)` a few times to observe the difference.
- File: [diff.pdf](/uploads/649c2f8a85c75ecacc44a891fe06acf5/diff.pdf)
For `clang -O0` compiled one, the output would always be
```
P4
41 42
�@
```
But for `clang -O2` compiled one, the output sometimes change to
```
P4
41 42
>>@�@
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1183heap-use-after-free in Splash::pipeSetXY(SplashPipe*, int, int)2021-12-09T06:25:31ZShaohua Liheap-use-after-free in Splash::pipeSetXY(SplashPipe*, int, int)Hi there,
I found a heap-use-after-free when fuzzing `pdftoppm`.
- Compiler: clang-13
- Platform: Ubuntu 20.04.4 LTS, x86_64
- POC: [heap_use_after_free_pipeSetXY.poc](/uploads/d06080e811e844ed65a63b0211e6fe68/heap_use_after_free_pip...Hi there,
I found a heap-use-after-free when fuzzing `pdftoppm`.
- Compiler: clang-13
- Platform: Ubuntu 20.04.4 LTS, x86_64
- POC: [heap_use_after_free_pipeSetXY.poc](/uploads/d06080e811e844ed65a63b0211e6fe68/heap_use_after_free_pipeSetXY.poc)
- Reproduce: run `./utils/pdftoppm -mono -cropbox heap_use_after_free_pipeSetXY.poc`
Address Sanitizer report:
```
==2639985==ERROR: AddressSanitizer: heap-use-after-free on address 0x604000000c20 at pc 0x000000910995 bp 0x7fffe041d240 sp 0x7fffe041d238
READ of size 4 at 0x604000000c20 thread T0
#0 0x910994 in Splash::pipeSetXY(SplashPipe*, int, int) /pdftoppm/analysis/debug/asan/clang13-default/poppler/splash/Splash.cc:1194:21
#1 0x90709d in Splash::pipeInit(SplashPipe*, int, int, SplashPattern*, unsigned char*, unsigned char, bool, bool, bool, unsigned char) /pdftoppm/analysis/debug/asan/clang13-default/poppler/splash/Splash.cc:208:5
#2 0x88050a in Splash::fillWithPattern(SplashPath*, bool, SplashPattern*, double) /pdftoppm/analysis/debug/asan/clang13-default/poppler/splash/Splash.cc:2395:9
#3 0x885ca9 in Splash::fill(SplashPath*, bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/splash/Splash.cc:2279:12
#4 0x7840d8 in SplashOutputDev::fill(GfxState*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/SplashOutputDev.cc:2110:13
#5 0xdfd7a7 in Gfx::gouraudFillTriangle(double, double, GfxColor*, double, double, GfxColor*, double, double, GfxColor*, int, int, GfxState::ReusablePathIterator*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:3314:14
#6 0xdfe72b in Gfx::gouraudFillTriangle(double, double, GfxColor*, double, double, GfxColor*, double, double, GfxColor*, int, int, GfxState::ReusablePathIterator*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:3328:9
#7 0xdf5967 in Gfx::doGouraudTriangleShFill(GfxGouraudTriangleShading*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:3271:13
#8 0xde03b0 in Gfx::doShadingPatternFill(GfxShadingPattern*, bool, bool, bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:2318:9
#9 0xdc9fe4 in Gfx::doPatternFill(bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:1898:9
#10 0xd99b2d in Gfx::opFill(Object*, int) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:1758:17
#11 0xdc3271 in Gfx::execOp(Object*, Object*, int) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:804:5
#12 0xdc0f84 in Gfx::go(bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:681:13
#13 0xdc05d4 in Gfx::display(Object*, bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:642:5
#14 0xdc7fc7 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:4814:5
#15 0xe2b055 in Gfx::doForm(Object*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:4744:5
#16 0xd9843f in Gfx::opXObject(Object*, int) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:4132:17
#17 0xdc3271 in Gfx::execOp(Object*, Object*, int) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:804:5
#18 0xdc0f84 in Gfx::go(bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:681:13
#19 0xdc05d4 in Gfx::display(Object*, bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:642:5
#20 0x10f60a1 in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Page.cc:576:14
#21 0x5275ba in PDFDoc::displayPageSlice(OutputDev*, int, double, double, int, bool, bool, bool, int, int, int, int, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/PDFDoc.cc:675:24
#22 0x4dcc13 in savePageSlice(PDFDoc*, SplashOutputDev*, int, int, int, int, int, double, double, char*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/utils/pdftoppm.cc:290:10
#23 0x4db4f4 in main /pdftoppm/analysis/debug/asan/clang13-default/poppler/utils/pdftoppm.cc:690:9
#24 0x7f80b5eb70b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#25 0x42353d in _start (/shared/targets/pdftoppm/analysis/debug/asan/clang13-default/poppler/utils/pdftoppm+0x42353d)
0x604000000c20 is located 16 bytes inside of 48-byte region [0x604000000c10,0x604000000c40)
freed by thread T0 here:
#0 0x4d230d in operator delete(void*) (/shared/targets/pdftoppm/analysis/debug/asan/clang13-default/poppler/utils/pdftoppm+0x4d230d)
#1 0x8ef682 in Splash::gouraudTriangleShadedFill(SplashGouraudColor*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/splash/Splash.cc:5471:17
#2 0x7e6003 in SplashOutputDev::gouraudTriangleShadedFill(GfxState*, GfxGouraudTriangleShading*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/SplashOutputDev.cc:4426:33
#3 0xdf478b in Gfx::doGouraudTriangleShFill(GfxGouraudTriangleShading*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:3239:18
#4 0xde03b0 in Gfx::doShadingPatternFill(GfxShadingPattern*, bool, bool, bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:2318:9
#5 0xdc9fe4 in Gfx::doPatternFill(bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:1898:9
#6 0xd99b2d in Gfx::opFill(Object*, int) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:1758:17
#7 0xdc3271 in Gfx::execOp(Object*, Object*, int) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:804:5
#8 0xdc0f84 in Gfx::go(bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:681:13
#9 0xdc05d4 in Gfx::display(Object*, bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:642:5
#10 0xdc7fc7 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:4814:5
#11 0xe2b055 in Gfx::doForm(Object*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:4744:5
#12 0xd9843f in Gfx::opXObject(Object*, int) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:4132:17
#13 0xdc3271 in Gfx::execOp(Object*, Object*, int) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:804:5
#14 0xdc0f84 in Gfx::go(bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:681:13
#15 0xdc05d4 in Gfx::display(Object*, bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:642:5
#16 0x10f60a1 in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Page.cc:576:14
#17 0x5275ba in PDFDoc::displayPageSlice(OutputDev*, int, double, double, int, bool, bool, bool, int, int, int, int, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/PDFDoc.cc:675:24
#18 0x4dcc13 in savePageSlice(PDFDoc*, SplashOutputDev*, int, int, int, int, int, double, double, char*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/utils/pdftoppm.cc:290:10
#19 0x4db4f4 in main /pdftoppm/analysis/debug/asan/clang13-default/poppler/utils/pdftoppm.cc:690:9
#20 0x7f80b5eb70b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
previously allocated by thread T0 here:
#0 0x4d1aad in operator new(unsigned long) (/shared/targets/pdftoppm/analysis/debug/asan/clang13-default/poppler/utils/pdftoppm+0x4d1aad)
#1 0x7664da in SplashOutputDev::startPage(int, GfxState*, XRef*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/SplashOutputDev.cc:1350:18
#2 0xdbc431 in Gfx::Gfx(PDFDoc*, OutputDev*, int, Dict*, double, double, PDFRectangle const*, PDFRectangle const*, int, bool (*)(void*), void*, XRef*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Gfx.cc:480:10
#3 0x10f7c5f in Page::createGfx(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, XRef*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Page.cc:550:15
#4 0x10f5f6e in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/Page.cc:571:11
#5 0x5275ba in PDFDoc::displayPageSlice(OutputDev*, int, double, double, int, bool, bool, bool, int, int, int, int, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /pdftoppm/analysis/debug/asan/clang13-default/poppler/poppler/PDFDoc.cc:675:24
#6 0x4dcc13 in savePageSlice(PDFDoc*, SplashOutputDev*, int, int, int, int, int, double, double, char*) /pdftoppm/analysis/debug/asan/clang13-default/poppler/utils/pdftoppm.cc:290:10
#7 0x4db4f4 in main /pdftoppm/analysis/debug/asan/clang13-default/poppler/utils/pdftoppm.cc:690:9
#8 0x7f80b5eb70b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
SUMMARY: AddressSanitizer: heap-use-after-free /pdftoppm/analysis/debug/asan/clang13-default/poppler/splash/Splash.cc:1194:21 in Splash::pipeSetXY(SplashPipe*, int, int)
Shadow bytes around the buggy address:
0x0c087fff8130: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 00
0x0c087fff8140: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
0x0c087fff8150: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
0x0c087fff8160: fa fa fd fd fd fd fd fd fa fa 00 00 00 00 00 00
0x0c087fff8170: fa fa 00 00 00 00 00 00 fa fa fd fd fd fd fd fa
=>0x0c087fff8180: fa fa fd fd[fd]fd fd fd fa fa fd fd fd fd fd fd
0x0c087fff8190: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa
0x0c087fff81a0: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa
0x0c087fff81b0: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa
0x0c087fff81c0: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa
0x0c087fff81d0: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==2639985==ABORTING
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1181CVE-2021-43527 in NSS library2021-12-02T13:50:07ZGiuseppeCVE-2021-43527 in NSS libraryA critical vulnerability, causing memory corruption in NSS via DER-encoded DSA and RSA-PSS signatures [1], has been found in NSS project
Is poppler affected?
If yes, do you plan to upgrade the library and release a new version of poppl...A critical vulnerability, causing memory corruption in NSS via DER-encoded DSA and RSA-PSS signatures [1], has been found in NSS project
Is poppler affected?
If yes, do you plan to upgrade the library and release a new version of poppler?
https://www.mozilla.org/en-US/security/advisories/mfsa2021-51/https://gitlab.freedesktop.org/poppler/poppler/-/issues/1180New glib FD APIs in 21.12 do not build on MSVC2021-12-15T17:05:08ZPeter WilliamsNew glib FD APIs in 21.12 do not build on MSVCThe recent 21.12.0 release added new file-descriptor APIs to the glib module that don't build on MSVC. We're being bitten by these in the [conda-forge Poppler package][x]. The errors I've encountered are:
[x]: https://github.com/conda-f...The recent 21.12.0 release added new file-descriptor APIs to the glib module that don't build on MSVC. We're being bitten by these in the [conda-forge Poppler package][x]. The errors I've encountered are:
[x]: https://github.com/conda-forge/poppler-feedstock/pull/121
- (not directly related): in `poppler/ImageEmbeddingUtils.cc`, build failure due to redefinition of `INT32` in libjpeg, because the Windows system headers need to be included first. Can be solved by moving the libjpeg #include to the bottom of the file preamble
- in `glib/poppler-document.cc`, need to `#include <glib.h>` before the `#ifndef G_OS_WIN32` because otherwise it will never be defined!
- Unguarded use of `close()` in `poppler_ps_file_finalize`
- Use of various functions that on Windows are available with underscore-prefixed names; in the conda-forge build these yield deprecation warnings but not build failures: `strdup`, `dup`, `fileno`, `fdopen`, `stricmp`.
Note that the preexisting `poppler_document_new_from_fd` is guarded with `#ifndef G_OS_WIN32` so that on Windows the function just always fails. One option would be to do likewise for the new APIs. Also note that it looks like `_close` is available on MSVC, it just doesn't have the `close` compatibility wrapper unlike the other problematic FD functions.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1176Which glib2 version was required for poppler-0.89.02021-11-21T11:22:37ZGeneralizeWhich glib2 version was required for poppler-0.89.0I cross-compile poppler-0.89.0 on fedora35 mingw64 with mingw64-glib2 version 2.69.2-1.fc35 complie failed.I guess it's because the glib2 version is too new.So I want to know the glib2 version was required for poppler-0.89.0
[](<pre><b>/...I cross-compile poppler-0.89.0 on fedora35 mingw64 with mingw64-glib2 version 2.69.2-1.fc35 complie failed.I guess it's because the glib2 version is too new.So I want to know the glib2 version was required for poppler-0.89.0
[](<pre><b>/home/yun/pdf2htmlEX/poppler/glib/poppler-private.h:158:13:</b> <font color="#FF5555"><b>error: </b></font>argument 2 of '<b>__atomic_load</b>' must not be a pointer to a '<b>volatile</b>' type
158 | if (<font color="#FF5555"><b>g_once_init_enter</b></font> (&g_define_type_id__volatile)) { \
| <font color="#FF5555"><b>^~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:1625:1:</b> <font color="#55FFFF"><b>note: </b></font>in expansion of macro '<b>POPPLER_DEFINE_BOXED_TYPE</b>'
1625 | <font color="#55FFFF"><b>POPPLER_DEFINE_BOXED_TYPE</b></font> (PopplerRectangle, poppler_rectangle,
| <font color="#55FFFF"><b>^~~~~~~~~~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:</b> In function '<b>GType poppler_point_get_type()</b>':
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-private.h:158:13:</b> <font color="#FF5555"><b>error: </b></font>argument 2 of '<b>__atomic_load</b>' must not be a pointer to a '<b>volatile</b>' type
158 | if (<font color="#FF5555"><b>g_once_init_enter</b></font> (&g_define_type_id__volatile)) { \
| <font color="#FF5555"><b>^~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:1672:1:</b> <font color="#55FFFF"><b>note: </b></font>in expansion of macro '<b>POPPLER_DEFINE_BOXED_TYPE</b>'
1672 | <font color="#55FFFF"><b>POPPLER_DEFINE_BOXED_TYPE</b></font> (PopplerPoint, poppler_point,
| <font color="#55FFFF"><b>^~~~~~~~~~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:</b> In function '<b>GType poppler_quadrilateral_get_type()</b>':
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-private.h:158:13:</b> <font color="#FF5555"><b>error: </b></font>argument 2 of '<b>__atomic_load</b>' must not be a pointer to a '<b>volatile</b>' type
158 | if (<font color="#FF5555"><b>g_once_init_enter</b></font> (&g_define_type_id__volatile)) { \
| <font color="#FF5555"><b>^~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:1726:1:</b> <font color="#55FFFF"><b>note: </b></font>in expansion of macro '<b>POPPLER_DEFINE_BOXED_TYPE</b>'
1726 | <font color="#55FFFF"><b>POPPLER_DEFINE_BOXED_TYPE</b></font> (PopplerQuadrilateral, poppler_quadrilateral,
| <font color="#55FFFF"><b>^~~~~~~~~~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:</b> In function '<b>GType poppler_text_attributes_get_type()</b>':
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-private.h:158:13:</b> <font color="#FF5555"><b>error: </b></font>argument 2 of '<b>__atomic_load</b>' must not be a pointer to a '<b>volatile</b>' type
158 | if (<font color="#FF5555"><b>g_once_init_enter</b></font> (&g_define_type_id__volatile)) { \
| <font color="#FF5555"><b>^~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:1779:1:</b> <font color="#55FFFF"><b>note: </b></font>in expansion of macro '<b>POPPLER_DEFINE_BOXED_TYPE</b>'
1779 | <font color="#55FFFF"><b>POPPLER_DEFINE_BOXED_TYPE</b></font> (PopplerTextAttributes, poppler_text_attributes,
| <font color="#55FFFF"><b>^~~~~~~~~~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:</b> In function '<b>GType poppler_color_get_type()</b>':
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-private.h:158:13:</b> <font color="#FF5555"><b>error: </b></font>argument 2 of '<b>__atomic_load</b>' must not be a pointer to a '<b>volatile</b>' type
158 | if (<font color="#FF5555"><b>g_once_init_enter</b></font> (&g_define_type_id__volatile)) { \
| <font color="#FF5555"><b>^~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:1885:1:</b> <font color="#55FFFF"><b>note: </b></font>in expansion of macro '<b>POPPLER_DEFINE_BOXED_TYPE</b>'
1885 | <font color="#55FFFF"><b>POPPLER_DEFINE_BOXED_TYPE</b></font> (PopplerColor, poppler_color, poppler_color_copy, poppler_color_free)
| <font color="#55FFFF"><b>^~~~~~~~~~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:</b> In function '<b>GType poppler_link_mapping_get_type()</b>':
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-private.h:158:13:</b> <font color="#FF5555"><b>error: </b></font>argument 2 of '<b>__atomic_load</b>' must not be a pointer to a '<b>volatile</b>' type
158 | if (<font color="#FF5555"><b>g_once_init_enter</b></font> (&g_define_type_id__volatile)) { \
| <font color="#FF5555"><b>^~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:1932:1:</b> <font color="#55FFFF"><b>note: </b></font>in expansion of macro '<b>POPPLER_DEFINE_BOXED_TYPE</b>'
1932 | <font color="#55FFFF"><b>POPPLER_DEFINE_BOXED_TYPE</b></font> (PopplerLinkMapping, poppler_link_mapping,
| <font color="#55FFFF"><b>^~~~~~~~~~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:</b> In function '<b>GType poppler_image_mapping_get_type()</b>':
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-private.h:158:13:</b> <font color="#FF5555"><b>error: </b></font>argument 2 of '<b>__atomic_load</b>' must not be a pointer to a '<b>volatile</b>' type
158 | if (<font color="#FF5555"><b>g_once_init_enter</b></font> (&g_define_type_id__volatile)) { \
| <font color="#FF5555"><b>^~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:1989:1:</b> <font color="#55FFFF"><b>note: </b></font>in expansion of macro '<b>POPPLER_DEFINE_BOXED_TYPE</b>'
1989 | <font color="#55FFFF"><b>POPPLER_DEFINE_BOXED_TYPE</b></font> (PopplerImageMapping, poppler_image_mapping,
| <font color="#55FFFF"><b>^~~~~~~~~~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:</b> In function '<b>GType poppler_page_transition_get_type()</b>':
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-private.h:158:13:</b> <font color="#FF5555"><b>error: </b></font>argument 2 of '<b>__atomic_load</b>' must not be a pointer to a '<b>volatile</b>' type
158 | if (<font color="#FF5555"><b>g_once_init_enter</b></font> (&g_define_type_id__volatile)) { \
| <font color="#FF5555"><b>^~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:2033:1:</b> <font color="#55FFFF"><b>note: </b></font>in expansion of macro '<b>POPPLER_DEFINE_BOXED_TYPE</b>'
2033 | <font color="#55FFFF"><b>POPPLER_DEFINE_BOXED_TYPE</b></font> (PopplerPageTransition, poppler_page_transition,
| <font color="#55FFFF"><b>^~~~~~~~~~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:</b> In function '<b>GType poppler_form_field_mapping_get_type()</b>':
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-private.h:158:13:</b> <font color="#FF5555"><b>error: </b></font>argument 2 of '<b>__atomic_load</b>' must not be a pointer to a '<b>volatile</b>' type
158 | if (<font color="#FF5555"><b>g_once_init_enter</b></font> (&g_define_type_id__volatile)) { \
| <font color="#FF5555"><b>^~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:2082:1:</b> <font color="#55FFFF"><b>note: </b></font>in expansion of macro '<b>POPPLER_DEFINE_BOXED_TYPE</b>'
2082 | <font color="#55FFFF"><b>POPPLER_DEFINE_BOXED_TYPE</b></font> (PopplerFormFieldMapping, poppler_form_field_mapping,
| <font color="#55FFFF"><b>^~~~~~~~~~~~~~~~~~~~~~~~~</b></font>
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-page.cc:</b> In function '<b>GType poppler_annot_mapping_get_type()</b>':
<b>/home/yun/pdf2htmlEX/poppler/glib/poppler-private.h:158:13:</b> <font color="#FF5555"><b>error: </b></font>argument 2 of '<b>__atomic_load</b>' must not be a pointer to a '<b>volatile</b>' type
158 | if (<font color="#FF5555"><b>g_once_init_enter</b></font> (&g_define_type_id__volatile)) { \
| <font color="#FF5555"><b>^~~~~~~~~~~~~~~~~</b></font>
</pre>)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1174Invalid mathematical (cryptographic) symbols rendered in some PDF's (needs sy...2023-11-15T13:47:10ZJohannes KrottmayerInvalid mathematical (cryptographic) symbols rendered in some PDF's (needs symbol.ttf)Some cryptographic symbols will not be correctly rendered in some PDF's. For example in the official AES specification (XOR and Multiply). These two symbols will be replaced with one invalid symbol.
A Workaround is, to copy the **symbol...Some cryptographic symbols will not be correctly rendered in some PDF's. For example in the official AES specification (XOR and Multiply). These two symbols will be replaced with one invalid symbol.
A Workaround is, to copy the **symbol.ttf** from a Windows installation and add it to the local fonts collection. Seems these symbols are not supported in the default font collection from poppler.
I have attached the source PDF [(NIST.FIPS.197.pdf)](/uploads/48095e15bfaef7b8fc47478dee0378b5/NIST.FIPS.197.pdf) and the screenshots from the frontend viewer Okular which uses poppler as backend for the rendering of PDF's.
Rendering with the default font collection:
![default](/uploads/fc966700ec4c05ce3f2e26b5986a3684/default.png)
With the copied **symbol.ttf**:
![symbol](/uploads/356748b932c54dec9e0eed894b258210/symbol.png)
(Screenshots from page 7 from the original document.)
Have already reported this behavior first on the [openSUSE's bug tracker](https://bugzilla.opensuse.org/show_bug.cgi?id=1192774).https://gitlab.freedesktop.org/poppler/poppler/-/issues/1173Some unusual PDFs hang pdftotext indefinitely with growing memory usage2024-03-26T23:23:58ZAdam FontenotSome unusual PDFs hang pdftotext indefinitely with growing memory usageI occasionally have PDFs of data automatically generated from scripts.
One of these PDFs (linked below) is rather complex and a few minutes to load in a PDF viewer. It's effectively garbage, but as far as I know it's a legitimate PDF fi...I occasionally have PDFs of data automatically generated from scripts.
One of these PDFs (linked below) is rather complex and a few minutes to load in a PDF viewer. It's effectively garbage, but as far as I know it's a legitimate PDF file. Unfortunately, when pdftotext is used to try to extract text from it, it hangs indefinitely, and memory usage grows slowly. I've seen usage as high as 3 GB after about an hour.
I can appreciate that this PDF is probably very hard to parse, but hanging for that long and using that much memory for a PDF that contains virtually no text is probably unexpected?
You might reasonably ask - why try using pdftotext on this file? Why not simply *not* do that? The problem is that this issue shows up for downstream poppler users. I actually encountered this problem because KDE's file indexer (Baloo) hangs indefinitely when trying to index this file. Obviously, a file indexer is something that will try to extract text from every file, and in this case it's using poppler to do it.
----------------------------
Test file: https://ipfs.io/ipfs/QmVqWhPuQkE7reTN5F9TiSeA75z62VNaZUSFZz3FdWTLbC
Warning: I suggest downloading this file rather than trying to open it in your browser. If you have a virus scanner or file indexer that uses poppler (or any other affected program) and it tries to open the file automatically, the program may hang as a result.
I am placing the file linked above in the public domain. If this is not legally possible in your jurisdiction, I am licensing the file to you under (your choice of) CC0, Zero-Clause BSD, or GNU Free Documentation License.
----------------------------
Relevant system information:
Poppler: 21.10.0-1 \
Source: Distribution Package \
OS: Arch Linux x86_64https://gitlab.freedesktop.org/poppler/poppler/-/issues/1172Pdftoppm adds extra digits to page number string2022-11-07T10:17:05ZDzeri96Pdftoppm adds extra digits to page number stringWhen rasterizing a PDF file to images of its pages, pdftoppm will pad the page number (appended together with a '-' symbol to the original file name) depending on the total number of pages. For example, if a file only has pages in the si...When rasterizing a PDF file to images of its pages, pdftoppm will pad the page number (appended together with a '-' symbol to the original file name) depending on the total number of pages. For example, if a file only has pages in the single digits, an output like this will be produced.
```
my-pdf-1.png
my-pdf-2.png
```
However, if a file has more than 9 pages, we would see something like this:
```
my-pdf-01.png
my-pdf-02.png
...
my-pdf-10.png
```
I assume the same happens with more digits.
The problem is that this behavior seems somewhat unexpected to me. For example, I'm currently building an annotation tool that assumes a file can be referenced by taking the original name and appending the page number to it. In my case I already have the page number saved in a DB so I can predict how the final name will look like, but I believe for most cases this is not the desired behavior, as it requires building in extra parsing logic into program.
While I'm not a C++ expert, I have a feeling this can be solved fairly quickly, just please confirm that this can indeed be seen as undesired behavior. I'll give it a go tomorrow in fact.
_For reference, I'm using pdftoppm from the poppler-utils package v 21.02.0-1 on Ubuntu 21.04._https://gitlab.freedesktop.org/poppler/poppler/-/issues/1171[-Werror,-Wunused-parameter]: 'psLevel', 'indent' and 'last' in Stream.h2021-11-08T09:48:47ZKevin Suo[-Werror,-Wunused-parameter]: 'psLevel', 'indent' and 'last' in Stream.hObserved when compiling LibreOffice with the --enable-werror option:
```
/home/suokunlong/lo/source/core/workdir/UnpackedTarball/poppler/poppler/Stream.h:1238:32: error: unused parameter 'psLevel' [-Werror,-Wunused-parameter]
GooStri...Observed when compiling LibreOffice with the --enable-werror option:
```
/home/suokunlong/lo/source/core/workdir/UnpackedTarball/poppler/poppler/Stream.h:1238:32: error: unused parameter 'psLevel' [-Werror,-Wunused-parameter]
GooString *getPSFilter(int psLevel, const char *indent) override { return nullptr; }
^
/home/suokunlong/lo/source/core/workdir/UnpackedTarball/poppler/poppler/Stream.h:1238:53: error: unused parameter 'indent' [-Werror,-Wunused-parameter]
GooString *getPSFilter(int psLevel, const char *indent) override { return nullptr; }
^
/home/suokunlong/lo/source/core/workdir/UnpackedTarball/poppler/poppler/Stream.h:1371:32: error: unused parameter 'psLevel' [-Werror,-Wunused-parameter]
GooString *getPSFilter(int psLevel, const char *indent) override { return nullptr; }
^
/home/suokunlong/lo/source/core/workdir/UnpackedTarball/poppler/poppler/Stream.h:1371:53: error: unused parameter 'indent' [-Werror,-Wunused-parameter]
GooString *getPSFilter(int psLevel, const char *indent) override { return nullptr; }
^
/home/suokunlong/lo/source/core/workdir/UnpackedTarball/poppler/poppler/Stream.h:1372:24: error: unused parameter 'last' [-Werror,-Wunused-parameter]
bool isBinary(bool last = true) override { return true; }
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1170Empty PDF is generated on PDF export in Xournal++: Internal error at position...2021-11-09T20:39:41ZMichael KoganEmpty PDF is generated on PDF export in Xournal++: Internal error at position -1: cairo context error: invalid tag name, attributes, or nesting<0a>When exporting the annotations of a PDF file into a new PDF file in Xournal++, with some files I get an empty file of less than 1kB file size. Xournal++ reports:
```
Poppler-INFO: 06:34:14.058: Internal error at position -1: cairo conte...When exporting the annotations of a PDF file into a new PDF file in Xournal++, with some files I get an empty file of less than 1kB file size. Xournal++ reports:
```
Poppler-INFO: 06:34:14.058: Internal error at position -1: cairo context error: invalid tag name, attributes, or nesting<0a>
Poppler-INFO: 06:34:14.073: Internal error at position -1: cairo context error: invalid tag name, attributes, or nesting<0a>
Poppler-INFO: 06:34:14.095: Internal error at position -1: cairo context error: invalid tag name, attributes, or nesting<0a>
Poppler-INFO: 06:34:14.099: Internal error at position -1: cairo context error: invalid tag name, attributes, or nesting<0a>
```
I attach the original PDF file, my annotations in .xopp format and the broken file which has been generated as exported PDF:
[Original_PDF_file.pdf](/uploads/f0bc22223382cf835044b9d575eee9cc/bmt8_2017_aufgaben_gruppe_a.pdf)
[Xournal++_annotations.xopp](/uploads/8f58bc9fbcddb5ed82f563cd01177acb/bmt8_2017_aufgaben_gruppe_a.xopp)
[Broken_PDF_export.pdf](/uploads/193bf23b5fdb434bc7698c918b38a821/bmt8_2017_aufgaben_gruppe_a_export.pdf)
See also
https://github.com/xournalpp/xournalpp/issues/3394
https://github.com/xournalpp/xournalpp/issues/3388
https://bugs.kde.org/show_bug.cgi?id=442975
I am using Poppler 21.10.0 on Manjaro Linux.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1169Question: Font Config file for Windows2021-11-01T10:09:47ZHakan UsakliQuestion: Font Config file for WindowsHello,
I have a binary poppler release 21.03 for Windows 64 bit and most functions work fine. I want to embed fonts to a pdf file using command line pdftocairo.exe -pdf input.pdf output.pdf
At the moment the command line responds with...Hello,
I have a binary poppler release 21.03 for Windows 64 bit and most functions work fine. I want to embed fonts to a pdf file using command line pdftocairo.exe -pdf input.pdf output.pdf
At the moment the command line responds with messages similar to
```
Syntax Error: No display font for 'ArialUnicode'
Syntax Error: Couldn't find a font for 'CourierStd', subst is 'Helvetica'
```
I have read https://www.freedesktop.org/software/fontconfig/fontconfig-user.html and prepared an XML file with some font mapping but I cannot make pdftocairo read and use that file.
1-
What is the expected file name for the font config on a windows system ? I tried fonts.conf, fonts.dtd, local.conf
2-
I placed the font config file into the same path as the pdftocairo executable. Where is the config file supposed to be located ?
3-
Can someone provide a complete font config file that would map 'CourierStd' to Courier New TrueType font on Windows ?
thank you kindlyhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/1168pdftotext for quotations generates double closure marks2021-10-30T19:43:01ZAdam Reviczkypdftotext for quotations generates double closure marksWhen creating a PDF with quotations (delimited text), the text extract with poppler (and evince) creates double quotation marks at the end.
Rendering it with evince does not show the marks twice.
Example PDF (GNOME Document Viewer 40.4)...When creating a PDF with quotations (delimited text), the text extract with poppler (and evince) creates double quotation marks at the end.
Rendering it with evince does not show the marks twice.
Example PDF (GNOME Document Viewer 40.4):
[quotation.pdf](/uploads/e0e2f52b5a1fb2e5b1c9266015d43069/quotation.pdf)
`“Hello world!”`
Extracted text with pdftotext version 21.06.1 (showing double quotes):
[quotation.txt](/uploads/2f36e25e61d6ec6793771bbe13238252/quotation.txt)
`“Hello world!””`
Extracted text with mupdf 1.17.0 (no double quotes):
[mupdf.txt](/uploads/af6f4874520b6547b5763d46a7ef29f8/mupdf.txt)
`“Hello world!”`
I am not sure whether this could also be an issue with the generated PDF, which can be reproduced with:
> \starttext
> \startquotation
> Hello world!
> \stopquotation
> \stoptext
at https://live.contextgarden.net/https://gitlab.freedesktop.org/poppler/poppler/-/issues/1167Squiggly highlight lines appear above text line; should be below2021-10-29T10:22:37Zrgreen5Squiggly highlight lines appear above text line; should be belowI direct you to https://github.com/linuxmint/xreader/issues/347 for a description of the issue in Xreader.
When squiggly highlight is applied to text, it appears ABOVE the text line when it should be UNDER the line.I direct you to https://github.com/linuxmint/xreader/issues/347 for a description of the issue in Xreader.
When squiggly highlight is applied to text, it appears ABOVE the text line when it should be UNDER the line.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1164Out of bounds read in JBIG2Bitmap::combine(JBIG2Bitmap*, int, int, unsigned int)2021-10-29T11:54:54ZSamuel AnttilaOut of bounds read in JBIG2Bitmap::combine(JBIG2Bitmap*, int, int, unsigned int)Hi friends! I've been doing some fuzzing and found an out-of-bounds read in JBIG2Bitmap::combine(JBIG2Bitmap*, int, int, unsigned int) through ASAN.
Full stack trace:
```
AddressSanitizer:DEADLYSIGNAL
=================================...Hi friends! I've been doing some fuzzing and found an out-of-bounds read in JBIG2Bitmap::combine(JBIG2Bitmap*, int, int, unsigned int) through ASAN.
Full stack trace:
```
AddressSanitizer:DEADLYSIGNAL
=================================================================
==104077==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000a8c0 (pc 0x000000a8ae17 bp 0x7fff01a8a970 sp 0x7fff01a8a500 T0)
==104077==The signal is caused by a READ memory access.
#0 0xa8ae17 in JBIG2Bitmap::combine(JBIG2Bitmap*, int, int, unsigned int) /home/xen/Fuzz/poppler-21.09.0/poppler/JBIG2Stream.cc:819:24
#1 0xa993c9 in JBIG2Stream::readTextRegionSeg(unsigned int, bool, bool, unsigned int, unsigned int*, unsigned int) /home/xen/Fuzz/poppler-21.09.0/poppler/JBIG2Stream.cc:2188:25
#2 0xa8f6ff in JBIG2Stream::readSegments() /home/xen/Fuzz/poppler-21.09.0/poppler/JBIG2Stream.cc:1352:13
#3 0xa8e3a5 in JBIG2Stream::reset() /home/xen/Fuzz/poppler-21.09.0/poppler/JBIG2Stream.cc:1177:5
#4 0x774269 in ImageStream::reset() /home/xen/Fuzz/poppler-21.09.0/poppler/Stream.cc:616:10
#5 0x882b0c in SplashOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, bool, int const*, bool) /home/xen/Fuzz/poppler-21.09.0/poppler/SplashOutputDev.cc:3259:21
#6 0x5ce42e in Gfx::doImage(Object*, Stream*, bool) /home/xen/Fuzz/poppler-21.09.0/poppler/Gfx.cc:4563:22
#7 0x58eaca in Gfx::opXObject(Object*, int) /home/xen/Fuzz/poppler-21.09.0/poppler/Gfx.cc:4105:13
#8 0x5a4cf9 in Gfx::execOp(Object*, Object*, int) /home/xen/Fuzz/poppler-21.09.0/poppler/Gfx.cc:804:5
#9 0x5a3b88 in Gfx::go(bool) /home/xen/Fuzz/poppler-21.09.0/poppler/Gfx.cc:681:13
#10 0x5a3479 in Gfx::display(Object*, bool) /home/xen/Fuzz/poppler-21.09.0/poppler/Gfx.cc:642:5
#11 0x6cdadf in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/xen/Fuzz/poppler-21.09.0/poppler/Page.cc:576:14
#12 0x6e1fa6 in PDFDoc::displayPageSlice(OutputDev*, int, double, double, int, bool, bool, bool, int, int, int, int, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/xen/Fuzz/poppler-21.09.0/poppler/PDFDoc.cc:662:24
#13 0x512d2e in poppler::page_renderer::render_page(poppler::page const*, double, double, int, int, int, int, poppler::rotation_enum) const /home/xen/Fuzz/poppler-21.09.0/cpp/poppler-page-renderer.cpp:280:13
#14 0x4d33fc in main /home/xen/Fuzz/poppler-21.09.0/cpp/utils/pdffuzz_verify.cc:121:24
#15 0x7f4a65e360b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#16 0x4234cd in _start (/home/xen/Fuzz/poppler-21.09.0/fuzz/pdffuzz_verify+0x4234cd)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/xen/Fuzz/poppler-21.09.0/poppler/JBIG2Stream.cc:819:24 in JBIG2Bitmap::combine(JBIG2Bitmap*, int, int, unsigned int)
==104077==ABORTING
```
Attached is the [PDF file](/uploads/a627b521df2bab243343ad336a5238cb/id_000056_sig_11_src_000030_time_1956434_op_havoc_rep_16) which generates the issue along with the [source](/uploads/ac5e6fbeec7f0d0ac27c49b47765b76a/pdffuzz_verify.cc) of the test program I used to generate above ASAN stacktrace.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1161Qt API: Document::page(const QString &label) not working in some documents2021-12-09T06:25:31ZValentin BruchQt API: Document::page(const QString &label) not working in some documentsWhen using the Qt 5/6 API of poppler, for some documents pages cannot be found by their label.
Given an affected PDF document this means that for any Poppler::Page* page in the document:
```c++
document->page(page->label()) == NULL
```
a...When using the Qt 5/6 API of poppler, for some documents pages cannot be found by their label.
Given an affected PDF document this means that for any Poppler::Page* page in the document:
```c++
document->page(page->label()) == NULL
```
although the pages do have valid labels.
A code snipplet to test this issue and two test documents (one which shows the bug and one which doesn't) are attached:
[poppler_pagelabels.tar.gz](/uploads/b6f1ad8ed3d3fb6ac57a2dd7be4cbda2/poppler_pagelabels.tar.gz)
The problem is found in the qt5 and qt6 API of poppler 21.10.0, but also in older versions at least since 21.07.0.
This might be related to the way how page labels are defined in the PDF. In the attached `baddocment.pdf` all page labels are defined entirely via the prefix (`/P`) of the page label and the page label object does not include a numbering style (`/S`).https://gitlab.freedesktop.org/poppler/poppler/-/issues/1160How to install poppler 0.73.0 and pdftools in Debian?2021-10-22T21:01:15ZAndres Mora-GomezHow to install poppler 0.73.0 and pdftools in Debian?Hello to all.
I apoligize in advance if this isnt the right place to post. I have been tirelessly trying to install a more recent version of poppler on my Debian (9.13 stretch) machine. Even though im able to compile it, for some reaso...Hello to all.
I apoligize in advance if this isnt the right place to post. I have been tirelessly trying to install a more recent version of poppler on my Debian (9.13 stretch) machine. Even though im able to compile it, for some reason installing pdftools package in R ends with errors. I will appreciate any help given.
running `sudo apt-get install libpoppler-cpp-dev` will install version 0.48.0 on my system
Here is what i have done so far, according to [these ](https://askubuntu.com/a/1112947/1493271) instructions
```
sudo apt purge libpoppler-cpp-dev
sudo apt-get install libopenjp2-7-dev libgdk-pixbuf2.0-dev cmake checkinstall
sudo apt-get build-dep libpoppler-cpp-dev
cd
wget https://poppler.freedesktop.org/poppler-0.73.0.tar.xz
tar -xf poppler-0.73.0.tar.xz
cd poppler-0.73.0
mkdir build
cd build
cmake ..
sudo checkinstall make install
```
the above returns
```
Done. The new package has been installed and saved to
/home/admonda/poppler-0.73.0/build/poppler_0.73.0-1_amd64.deb
You can remove it from your system anytime using:
dpkg -r poppler
```
then i execute
`echo "export R_LD_LIBRARY_PATH=\$R_LD_LIBRARY_PATH:/usr/local/lib" >> .bashrc`
which returns nothing
then i go to my R console and run the pdftools package installation which fails
```
> install.packages("pdftools")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
probando la URL 'https://cloud.r-project.org/src/contrib/pdftools_3.0.1.tar.gz'
Content type 'application/x-gzip' length 935692 bytes (913 KB)
==================================================
downloaded 913 KB
* installing *source* package ‘pdftools’ ...
** package ‘pdftools’ successfully unpacked and MD5 sums checked
** using staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/local/include/poppler/cpp -I/usr/local/include/poppler
Using PKG_LIBS=-L/usr/local/lib -lpoppler-cpp
** libs
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include/poppler/cpp -I/usr/local/include/poppler -I"/usr/local/lib/R/site-library/Rcpp/include" -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/stretch/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/local/include/poppler/cpp -I/usr/local/include/poppler -I"/usr/local/lib/R/site-library/Rcpp/include" -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/home/jranke/git/r-backports/stretch/r-base-3.6.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c bindings.cpp -o bindings.o
g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-z,relro -o pdftools.so RcppExports.o bindings.o -L/usr/local/lib -lpoppler-cpp -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/00LOCK-pdftools/00new/pdftools/libs
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘pdftools’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/local/lib/R/site-library/00LOCK-pdftools/00new/pdftools/libs/pdftools.so':
libpoppler-cpp.so.0: cannot open shared object file: No such file or directory
Error: loading failed
Ejecución interrumpida
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/pdftools’
The downloaded source packages are in
‘/tmp/RtmpAXvNGB/downloaded_packages’
Warning message:
In install.packages("pdftools") :
installation of package ‘pdftools’ had non-zero exit status
```
My R session info
```
> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)
Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.7.0
LAPACK: /usr/lib/lapack/liblapack.so.3.7.0
locale:
[1] LC_CTYPE=es_CO.UTF-8 LC_NUMERIC=C LC_TIME=es_CO.UTF-8 LC_COLLATE=es_CO.UTF-8 LC_MONETARY=es_CO.UTF-8
[6] LC_MESSAGES=es_CO.UTF-8 LC_PAPER=es_CO.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=es_CO.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.3 tools_3.6.3 Rcpp_1.0.6 tinytex_0.32 qpdf_1.1 xfun_0.23 askpass_1.1
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1159poppler-cpp build by cmake problem2021-10-22T11:47:40ZLukasz Kowolpoppler-cpp build by cmake problemI build poppler 0.68 with BUILD_SHARED_LIBS = OFF and ENABLE_CPP = ON. The poppler-cpp.lib isn't build ok. Where is the problem? I have errors (look at attached file). When I set BUILD_SHARED_LIBS = ON then is all OK. But I want static l...I build poppler 0.68 with BUILD_SHARED_LIBS = OFF and ENABLE_CPP = ON. The poppler-cpp.lib isn't build ok. Where is the problem? I have errors (look at attached file). When I set BUILD_SHARED_LIBS = ON then is all OK. But I want static lib.
![image](/uploads/08e85d6b74d382beb435abec40da46c4/image.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1158poppler-cpp as static?2021-10-22T09:35:36ZLukasz Kowolpoppler-cpp as static?I build poppler-cpp (ver. 0.68) by msvc 2013. Is there any way to build poppler-cpp.lib as fully static? Because now my project need to work a poppler-cpp.dll and jpeg.dll files.I build poppler-cpp (ver. 0.68) by msvc 2013. Is there any way to build poppler-cpp.lib as fully static? Because now my project need to work a poppler-cpp.dll and jpeg.dll files.