poppler issueshttps://gitlab.freedesktop.org/poppler/poppler/-/issues2018-12-23T22:48:09Zhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/701heap buffer overflow in ArthurOutputDev::drawChar2018-12-23T22:48:09ZAlbert Astals Cidheap buffer overflow in ArthurOutputDev::drawCharsecond page of this file [bug-poppler51369.pdf](/uploads/b4d29179a66167674e3a901e507917f5/bug-poppler51369.pdf) gives a heap buffer overflow issue on an asan build of poppler master
```
==8318==ERROR: AddressSanitizer: heap-buffer-overf...second page of this file [bug-poppler51369.pdf](/uploads/b4d29179a66167674e3a901e507917f5/bug-poppler51369.pdf) gives a heap buffer overflow issue on an asan build of poppler master
```
==8318==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200107259c at pc 0x7f01ee52866a bp 0x7ffd485f7090 sp 0x7ffd485f7088
READ of size 4 at 0x60200107259c thread T0
#0 0x7f01ee528669 in ArthurOutputDev::drawChar(GfxState*, double, double, double, double, double, double, unsigned int, int, unsigned int*, int) /home/tsdgeos/devel/poppler/qt5/src/ArthurOutputDev.cc:943:42
#1 0x7f01ecc3ef78 in Gfx::doShowText(GooString const*) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4041:14
#2 0x7f01ecbea4df in Gfx::opShowSpaceText(Object*, int) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:3859:7
#3 0x7f01ecc02de8 in Gfx::execOp(Object*, Object*, int) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:876:3
#4 0x7f01ecc01b15 in Gfx::go(bool) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:752:7
#5 0x7f01ecc01289 in Gfx::display(Object*, bool) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:714:3
#6 0x7f01ece3112a in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/tsdgeos/devel/poppler/poppler/Page.cc:548:10
#7 0x7f01ece445a5 in PDFDoc::displayPageSlice(OutputDev*, int, double, double, int, bool, bool, bool, int, int, int, int, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:664:20
#8 0x7f01ee4df03b in Poppler::renderToArthur(Poppler::QImageDumpingArthurOutputDev*, QPainter*, Poppler::PageData*, double, double, int, int, int, int, Poppler::Page::Rotation, QFlags<Poppler::Page::PainterFlag>) /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:491:25
#9 0x7f01ee4dd8c6 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation, void (*)(QImage const&, QVariant const&), bool (*)(QVariant const&), bool (*)(QVariant const&), QVariant const&) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:622:7
#10 0x7f01ee4dc351 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation, void (*)(QImage const&, QVariant const&), bool (*)(QVariant const&), QVariant const&) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:519:10
#11 0x7f01ee4dc1c7 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:514:10
0x60200107259c is located 5 bytes to the right of 7-byte region [0x602001072590,0x602001072597)
freed by thread T0 here:
#0 0x55e0328c1fe1 in free (/home/tsdgeos/devel/poppler/build-asan-ubsan/qt5/tests/test-render-to-file-qt5+0xf4fe1)
#1 0x7f01ece131eb in gfree(void*) /home/tsdgeos/devel/poppler/goo/gmem.h:61:5
#2 0x7f01ece131eb in Object::free() /home/tsdgeos/devel/poppler/poppler/Object.cc:102
#3 0x7f01ece38b91 in Object::~Object() /home/tsdgeos/devel/poppler/poppler/Object.h:153:15
#4 0x7f01ece38b91 in Parser::~Parser() /home/tsdgeos/devel/poppler/poppler/Parser.cc:58
#5 0x7f01ecf8045d in XRef::fetch(int, int, int) /home/tsdgeos/devel/poppler/poppler/XRef.cc:1133:5
#6 0x7f01ece12fc1 in Object::fetch(XRef*, int) const /home/tsdgeos/devel/poppler/poppler/Object.cc:92:16
#7 0x7f01ecc6f76e in GfxFont::readEmbFontFile(XRef*, int*) /home/tsdgeos/devel/poppler/poppler/GfxFont.cc:822:22
#8 0x7f01ee51ea16 in ArthurOutputDev::updateFont(GfxState*) /home/tsdgeos/devel/poppler/qt5/src/ArthurOutputDev.cc:551:29
#9 0x7f01ecbea116 in Gfx::opShowSpaceText(Object*, int) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:3838:10
#10 0x7f01ecc02de8 in Gfx::execOp(Object*, Object*, int) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:876:3
#11 0x7f01ecc01b15 in Gfx::go(bool) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:752:7
#12 0x7f01ecc01289 in Gfx::display(Object*, bool) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:714:3
#13 0x7f01ece3112a in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/tsdgeos/devel/poppler/poppler/Page.cc:548:10
#14 0x7f01ece445a5 in PDFDoc::displayPageSlice(OutputDev*, int, double, double, int, bool, bool, bool, int, int, int, int, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:664:20
#15 0x7f01ee4df03b in Poppler::renderToArthur(Poppler::QImageDumpingArthurOutputDev*, QPainter*, Poppler::PageData*, double, double, int, int, int, int, Poppler::Page::Rotation, QFlags<Poppler::Page::PainterFlag>) /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:491:25
#16 0x7f01ee4dd8c6 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation, void (*)(QImage const&, QVariant const&), bool (*)(QVariant const&), bool (*)(QVariant const&), QVariant const&) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:622:7
#17 0x7f01ee4dc351 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation, void (*)(QImage const&, QVariant const&), bool (*)(QVariant const&), QVariant const&) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:519:10
#18 0x7f01ee4dc1c7 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:514:10
previously allocated by thread T0 here:
#0 0x55e0328c23c9 in __interceptor_malloc (/home/tsdgeos/devel/poppler/build-asan-ubsan/qt5/tests/test-render-to-file-qt5+0xf53c9)
#1 0x7f01eca33ffc in gmalloc(unsigned long, bool) /home/tsdgeos/devel/poppler/goo/gmem.h:41:17
#2 0x7f01eca33ffc in copyString(char const*) /home/tsdgeos/devel/poppler/goo/gmem.h:169
#3 0x7f01ecad9b57 in Object::Object(ObjType, char const*) /home/tsdgeos/devel/poppler/poppler/Object.h:166:93
#4 0x7f01ecdf386f in Lexer::getObj(int) /home/tsdgeos/devel/poppler/poppler/Lexer.cc
#5 0x7f01ece3be85 in Parser::shift(char const*, int) /home/tsdgeos/devel/poppler/poppler/Parser.cc:348:19
#6 0x7f01ece3b012 in Parser::makeStream(Object&&, unsigned char*, CryptAlgorithm, int, int, int, int, bool) /home/tsdgeos/devel/poppler/poppler/Parser.cc:264:3
#7 0x7f01ece39b7d in Parser::getObj(bool, unsigned char*, CryptAlgorithm, int, int, int, int, bool) /home/tsdgeos/devel/poppler/poppler/Parser.cc:134:34
#8 0x7f01ecf80447 in XRef::fetch(int, int, int) /home/tsdgeos/devel/poppler/poppler/XRef.cc:1131:26
#9 0x7f01ece12fc1 in Object::fetch(XRef*, int) const /home/tsdgeos/devel/poppler/poppler/Object.cc:92:16
#10 0x7f01ecc6f76e in GfxFont::readEmbFontFile(XRef*, int*) /home/tsdgeos/devel/poppler/poppler/GfxFont.cc:822:22
#11 0x7f01ee51ea16 in ArthurOutputDev::updateFont(GfxState*) /home/tsdgeos/devel/poppler/qt5/src/ArthurOutputDev.cc:551:29
#12 0x7f01ecbea116 in Gfx::opShowSpaceText(Object*, int) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:3838:10
#13 0x7f01ecc02de8 in Gfx::execOp(Object*, Object*, int) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:876:3
#14 0x7f01ecc01b15 in Gfx::go(bool) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:752:7
#15 0x7f01ecc01289 in Gfx::display(Object*, bool) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:714:3
#16 0x7f01ece3112a in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/tsdgeos/devel/poppler/poppler/Page.cc:548:10
#17 0x7f01ece445a5 in PDFDoc::displayPageSlice(OutputDev*, int, double, double, int, bool, bool, bool, int, int, int, int, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:664:20
#18 0x7f01ee4df03b in Poppler::renderToArthur(Poppler::QImageDumpingArthurOutputDev*, QPainter*, Poppler::PageData*, double, double, int, int, int, int, Poppler::Page::Rotation, QFlags<Poppler::Page::PainterFlag>) /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:491:25
#19 0x7f01ee4dd8c6 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation, void (*)(QImage const&, QVariant const&), bool (*)(QVariant const&), bool (*)(QVariant const&), QVariant const&) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:622:7
#20 0x7f01ee4dc351 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation, void (*)(QImage const&, QVariant const&), bool (*)(QVariant const&), QVariant const&) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:519:10
#21 0x7f01ee4dc1c7 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:514:10
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/700Heap use after free in ArthurType3Font::getGlyph2018-12-23T18:38:44ZAlbert Astals CidHeap use after free in ArthurType3Font::getGlyphWhen rendering https://bugs.freedesktop.org/attachment.cgi?id=137757
```
==13443==ERROR: AddressSanitizer: heap-use-after-free on address 0x62100004d978 at pc 0x7f0719edff99 bp 0x7ffe12602e70 sp 0x7ffe12602e68
READ of size 8 at 0x621000...When rendering https://bugs.freedesktop.org/attachment.cgi?id=137757
```
==13443==ERROR: AddressSanitizer: heap-use-after-free on address 0x62100004d978 at pc 0x7f0719edff99 bp 0x7ffe12602e70 sp 0x7ffe12602e68
READ of size 8 at 0x62100004d978 thread T0
#0 0x7f0719edff98 in ArthurType3Font::getGlyph(int) const /home/tsdgeos/devel/poppler/qt5/src/ArthurOutputDev.cc:117:22
#1 0x7f0719ef378d in ArthurOutputDev::drawChar(GfxState*, double, double, double, double, double, double, unsigned int, int, unsigned int*, int) /home/tsdgeos/devel/poppler/qt5/src/ArthurOutputDev.cc:925:68
#2 0x7f071860af78 in Gfx::doShowText(GooString const*) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4041:14
#3 0x7f07185b7f12 in Gfx::opShowText(Object*, int) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:3771:3
#4 0x7f07185cede8 in Gfx::execOp(Object*, Object*, int) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:876:3
#5 0x7f07185cdb15 in Gfx::go(bool) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:752:7
#6 0x7f07185cd289 in Gfx::display(Object*, bool) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:714:3
#7 0x7f07187fd12a in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/tsdgeos/devel/poppler/poppler/Page.cc:548:10
#8 0x7f07188105a5 in PDFDoc::displayPageSlice(OutputDev*, int, double, double, int, bool, bool, bool, int, int, int, int, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:664:20
#9 0x7f0719eab03b in Poppler::renderToArthur(Poppler::QImageDumpingArthurOutputDev*, QPainter*, Poppler::PageData*, double, double, int, int, int, int, Poppler::Page::Rotation, QFlags<Poppler::Page::PainterFlag>) /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:491:25
#10 0x7f0719ea98c6 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation, void (*)(QImage const&, QVariant const&), bool (*)(QVariant const&), bool (*)(QVariant const&), QVariant const&) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:622:7
#11 0x7f0719ea8351 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation, void (*)(QImage const&, QVariant const&), bool (*)(QVariant const&), QVariant const&) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:519:10
#12 0x7f0719ea81c7 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:514:10
0x62100004d978 is located 120 bytes inside of 4600-byte region [0x62100004d900,0x62100004eaf8)
freed by thread T0 here:
#0 0x560fcb6a3731 in operator delete(void*) (/home/tsdgeos/devel/poppler/build-asan-ubsan/qt5/tests/test-render-to-file-qt5+0x133731)
#1 0x7f0718648d37 in Gfx8BitFont::~Gfx8BitFont() /home/tsdgeos/devel/poppler/poppler/GfxFont.cc:1407:29
#2 0x7f0718635580 in GfxFont::decRefCnt() /home/tsdgeos/devel/poppler/poppler/GfxFont.cc:272:5
#3 0x7f071865b652 in GfxFontDict::~GfxFontDict() /home/tsdgeos/devel/poppler/poppler/GfxFont.cc:2429:17
#4 0x7f07185c791e in GfxResources::~GfxResources() /home/tsdgeos/devel/poppler/poppler/Gfx.cc:372:3
#5 0x7f07185ccebb in Gfx::popResources() /home/tsdgeos/devel/poppler/poppler/Gfx.cc:5388:3
#6 0x7f07185d1b5d in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4870:3
#7 0x7f071861702a in Gfx::doForm(Object*) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4764:3
#8 0x7f07185b07d7 in Gfx::opXObject(Object*, int) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4181:2
#9 0x7f07185cede8 in Gfx::execOp(Object*, Object*, int) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:876:3
#10 0x7f07185cdb15 in Gfx::go(bool) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:752:7
#11 0x7f07185cd289 in Gfx::display(Object*, bool) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:714:3
#12 0x7f07187fd12a in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/tsdgeos/devel/poppler/poppler/Page.cc:548:10
#13 0x7f07188105a5 in PDFDoc::displayPageSlice(OutputDev*, int, double, double, int, bool, bool, bool, int, int, int, int, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:664:20
#14 0x7f0719eab03b in Poppler::renderToArthur(Poppler::QImageDumpingArthurOutputDev*, QPainter*, Poppler::PageData*, double, double, int, int, int, int, Poppler::Page::Rotation, QFlags<Poppler::Page::PainterFlag>) /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:491:25
#15 0x7f0719ea98c6 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation, void (*)(QImage const&, QVariant const&), bool (*)(QVariant const&), bool (*)(QVariant const&), QVariant const&) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:622:7
#16 0x7f0719ea8351 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation, void (*)(QImage const&, QVariant const&), bool (*)(QVariant const&), QVariant const&) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:519:10
#17 0x7f0719ea81c7 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:514:10
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/697Crash in ArthurOutputDev::drawImage2018-12-29T19:32:10ZAlbert Astals CidCrash in ArthurOutputDev::drawImageWhen rendering this file [bug338925.pdf](/uploads/63a62d23816e4c3f578f854351cf0342/bug338925.pdf)
```
#0 0x00007ffff7c783e3 in ?? () from /usr/lib/libQt5Gui.so.5
#1 0x00007ffff7c9a235 in ?? () from /usr/lib/libQt5Gui.so.5
#2 0x00007f...When rendering this file [bug338925.pdf](/uploads/63a62d23816e4c3f578f854351cf0342/bug338925.pdf)
```
#0 0x00007ffff7c783e3 in ?? () from /usr/lib/libQt5Gui.so.5
#1 0x00007ffff7c9a235 in ?? () from /usr/lib/libQt5Gui.so.5
#2 0x00007ffff7ca218f in ?? () from /usr/lib/libQt5Gui.so.5
#3 0x00007ffff7ca08a1 in ?? () from /usr/lib/libQt5Gui.so.5
#4 0x00007ffff7d23167 in ?? () from /usr/lib/libQt5Gui.so.5
#5 0x00007ffff7ccf628 in ?? () from /usr/lib/libQt5Gui.so.5
#6 0x00007ffff7ce9ab0 in QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags<Qt::ImageConversionFlag>) () from /usr/lib/libQt5Gui.so.5
#7 0x00007ffff7fb0dd5 in QPainter::drawImage (image=..., r=..., this=0x7fffe7ffe5f8) at /usr/include/qt/QtCore/qrect.h:269
#8 ArthurOutputDev::drawImage (this=0x7fffe7ffe650, state=<optimized out>, ref=<optimized out>, str=<optimized out>, width=<optimized out>, height=14, colorMap=0x7fffe7ffdb30, interpolate=false, maskColors=0x0, inlineImg=false)
at /home/tsdgeos/devel/poppler/qt5/src/ArthurOutputDev.cc:1105
#9 0x00007ffff6f2038c in Gfx::doImage (this=this@entry=0x7fffe0008cd0, ref=ref@entry=0x7fffe7ffe080, str=0x7fffe0032450, inlineImg=inlineImg@entry=false) at /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4593
#10 0x00007ffff6f25193 in Gfx::opXObject (this=0x7fffe0008cd0, args=<optimized out>, numArgs=<optimized out>) at /home/tsdgeos/devel/poppler/poppler/Object.h:259
#11 0x00007ffff6f1a75f in Gfx::go (this=this@entry=0x7fffe0008cd0, topLevel=topLevel@entry=true) at /home/tsdgeos/devel/poppler/poppler/Gfx.cc:752
#12 0x00007ffff6f1ab4f in Gfx::display (this=this@entry=0x7fffe0008cd0, obj=obj@entry=0x7fffe7ffe450, topLevel=topLevel@entry=true) at /home/tsdgeos/devel/poppler/poppler/Gfx.cc:714
#13 0x00007ffff6f70d69 in Page::displaySlice (this=0x7fffe0005920, out=0x7fffe7ffe650, out@entry=0x4052000000000000, hDPI=hDPI@entry=72, vDPI=vDPI@entry=0, rotate=0, rotate@entry=32767, useMediaBox=useMediaBox@entry=8, crop=crop@entry=255, sliceX=-1,
sliceX@entry=32767, sliceY=-1, sliceW=-1, sliceH=-1, printing=false, abortCheckCbk=0x0, abortCheckCbkData=0x7fffe7ffe9f8, annotDisplayDecideCbk=0x0, annotDisplayDecideCbkData=0x0, copyXRef=true) at /home/tsdgeos/devel/poppler/poppler/Page.cc:548
#14 0x00007ffff6f75549 in PDFDoc::displayPageSlice (this=<optimized out>, out=0x4052000000000000, out@entry=0x7fffe7ffe650, page=-114309528, hDPI=hDPI@entry=72, vDPI=0, vDPI@entry=72, rotate=32767, rotate@entry=0, useMediaBox=useMediaBox@entry=false,
crop=crop@entry=true, printing=<optimized out>, sliceX=<optimized out>, sliceY=<optimized out>, sliceW=<optimized out>, sliceH=<optimized out>, abortCheckCbk=<optimized out>, abortCheckCbkData=<optimized out>, annotDisplayDecideCbk=<optimized out>,
annotDisplayDecideCbkData=<optimized out>, copyXRef=true) at /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:664
#15 0x00007ffff7fa3895 in Poppler::renderToArthur (arthur_output=arthur_output@entry=0x7fffe7ffe650, painter=painter@entry=0x7fffe7ffe5f8, xres=xres@entry=72, yres=yres@entry=72, x=x@entry=-1, y=y@entry=-1, w=-1, h=-1, rotate=Poppler::Page::Rotate0, flags=...,
page=<optimized out>, page=<optimized out>) at /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:491
#16 0x00007ffff7fa42fc in Poppler::Page::renderToImage (this=0x7fffe00054b0, xres=72, yres=72, x=-1, y=-1, w=-1, h=-1, rotate=Poppler::Page::Rotate0, partialUpdateCallback=0x0, shouldDoPartialUpdateCallback=0x0, shouldAbortRenderCallback=0x0, payload=...)
at /usr/include/qt/QtCore/qflags.h:120
#17 0x00007ffff7fa47b0 in Poppler::Page::renderToImage (this=<optimized out>, xres=<optimized out>, yres=<optimized out>, x=<optimized out>, y=<optimized out>, w=<optimized out>, h=<optimized out>, rotate=Poppler::Page::Rotate0, partialUpdateCallback=0x0,
shouldDoPartialUpdateCallback=0x0, payload=...) at /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:519
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/696Memory leak in ArthurOutputDev::beginTransparencyGroup2018-12-23T18:25:52ZAlbert Astals CidMemory leak in ArthurOutputDev::beginTransparencyGroupRunning https://bugs.kde.org/attachment.cgi?id=20680 with an asan compiled poppler
```
=================================================================
==11234==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 32 byte(s) in ...Running https://bugs.kde.org/attachment.cgi?id=20680 with an asan compiled poppler
```
=================================================================
==11234==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 32 byte(s) in 1 object(s) allocated from:
#0 0x564a56f2fb71 in operator new(unsigned long) (/home/tsdgeos/devel/poppler/build-asan-ubsan/qt5/tests/test-render-to-file-qt5+0x14bb71)
#1 0x7fd9304fcfb9 in ArthurOutputDev::beginTransparencyGroup(GfxState*, double const*, GfxColorSpace*, bool, bool, bool) /home/tsdgeos/devel/poppler/qt5/src/ArthurOutputDev.cc:1190:20
#2 0x7fd92ebd5537 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4828:10
#3 0x7fd92ebd4062 in Gfx::doSoftMask(Object*, bool, GfxColorSpace*, bool, bool, Function*, GfxColor*) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:1357:3
#4 0x7fd92ebc33a6 in Gfx::opSetExtGState(Object*, int) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:1226:4
#5 0x7fd92ebd2de8 in Gfx::execOp(Object*, Object*, int) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:876:3
#6 0x7fd92ebd1b15 in Gfx::go(bool) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:752:7
#7 0x7fd92ebd1289 in Gfx::display(Object*, bool) /home/tsdgeos/devel/poppler/poppler/Gfx.cc:714:3
#8 0x7fd92ee0112a in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/tsdgeos/devel/poppler/poppler/Page.cc:548:10
#9 0x7fd92ee145a5 in PDFDoc::displayPageSlice(OutputDev*, int, double, double, int, bool, bool, bool, int, int, int, int, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:664:20
#10 0x7fd9304af03b in Poppler::renderToArthur(Poppler::QImageDumpingArthurOutputDev*, QPainter*, Poppler::PageData*, double, double, int, int, int, int, Poppler::Page::Rotation, QFlags<Poppler::Page::PainterFlag>) /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:491:25
#11 0x7fd9304ad8c6 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation, void (*)(QImage const&, QVariant const&), bool (*)(QVariant const&), bool (*)(QVariant const&), QVariant const&) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:622:7
#12 0x7fd9304ac351 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation, void (*)(QImage const&, QVariant const&), bool (*)(QVariant const&), QVariant const&) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:519:10
#13 0x7fd9304ac1c7 in Poppler::Page::renderToImage(double, double, int, int, int, int, Poppler::Page::Rotation) const /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:514:10
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/695File crashes in ArthurOutputDev::stroke2020-03-26T21:44:21ZAlbert Astals CidFile crashes in ArthurOutputDev::strokeWhen rendering with arthur i get a crash in this file https://bugs.kde.org/attachment.cgi?id=13823
```
#0 0x00007ffff7c638ae in ?? () from /usr/lib/libQt5Gui.so.5
#1 0x00007ffff7c69ebb in ?? () from /usr/lib/libQt5Gui.so.5
#2 0x00007...When rendering with arthur i get a crash in this file https://bugs.kde.org/attachment.cgi?id=13823
```
#0 0x00007ffff7c638ae in ?? () from /usr/lib/libQt5Gui.so.5
#1 0x00007ffff7c69ebb in ?? () from /usr/lib/libQt5Gui.so.5
#2 0x00007ffff7cd5e17 in QRasterPaintEngine::stroke(QVectorPath const&, QPen const&) () from /usr/lib/libQt5Gui.so.5
#3 0x00007ffff7ce6815 in QPainter::strokePath(QPainterPath const&, QPen const&) () from /usr/lib/libQt5Gui.so.5
#4 0x00007ffff7fabe55 in ArthurOutputDev::stroke (this=0x7fffe77fd650, state=<optimized out>) at /home/tsdgeos/devel/poppler/poppler/GfxState.h:1508
#5 0x00007ffff6f1de36 in Gfx::opStroke (this=0x7fffd800d350, args=<optimized out>, numArgs=<optimized out>) at /home/tsdgeos/devel/poppler/poppler/Gfx.cc:1774
#6 0x00007ffff6f1a75f in Gfx::go (this=this@entry=0x7fffd800d350, topLevel=topLevel@entry=false) at /home/tsdgeos/devel/poppler/poppler/Gfx.cc:752
#7 0x00007ffff6f1ab4f in Gfx::display (this=this@entry=0x7fffd800d350, obj=obj@entry=0x7fffd803f2b8, topLevel=topLevel@entry=false) at /home/tsdgeos/devel/poppler/poppler/Gfx.cc:714
#8 0x00007ffff6f1afcc in Gfx::drawForm (this=0x7fffd800d350, str=0x7fffd803f2b8, resDict=<optimized out>, matrix=<optimized out>, bbox=0x7fffd803f248, transpGroup=<optimized out>, softMask=false, blendingColorSpace=0x0, isolated=false, knockout=false, alpha=false,
transferFunc=0x0, backdropColor=0x0) at /home/tsdgeos/devel/poppler/poppler/Gfx.cc:4841
#9 0x00007ffff6f1d93d in Gfx::doTilingPatternFill (this=0x7fffd800d350, tPat=0x7fffd803f230, stroke=<optimized out>, eoFill=<optimized out>, text=<optimized out>) at /home/tsdgeos/devel/poppler/poppler/GfxState.h:807
#10 0x00007ffff6f1dc7a in Gfx::opFill (this=0x7fffd800d350, args=<optimized out>, numArgs=<optimized out>) at /home/tsdgeos/devel/poppler/poppler/Gfx.cc:1809
#11 0x00007ffff6f1a75f in Gfx::go (this=this@entry=0x7fffd800d350, topLevel=topLevel@entry=true) at /home/tsdgeos/devel/poppler/poppler/Gfx.cc:752
#12 0x00007ffff6f1ab4f in Gfx::display (this=this@entry=0x7fffd800d350, obj=obj@entry=0x7fffe77fd450, topLevel=topLevel@entry=true) at /home/tsdgeos/devel/poppler/poppler/Gfx.cc:714
#13 0x00007ffff6f70d69 in Page::displaySlice (this=0x7fffd8006730, out=0x7fffe77fd650, out@entry=0x4052000000000000, hDPI=hDPI@entry=72, vDPI=vDPI@entry=0, rotate=0, rotate@entry=32767, useMediaBox=useMediaBox@entry=8, crop=crop@entry=255, sliceX=-1,
sliceX@entry=32767, sliceY=-1, sliceW=-1, sliceH=-1, printing=false, abortCheckCbk=0x0, abortCheckCbkData=0x7fffe77fd9f8, annotDisplayDecideCbk=0x0, annotDisplayDecideCbkData=0x0, copyXRef=true) at /home/tsdgeos/devel/poppler/poppler/Page.cc:548
#14 0x00007ffff6f75549 in PDFDoc::displayPageSlice (this=<optimized out>, out=0x4052000000000000, out@entry=0x7fffe77fd650, page=-1910907934, hDPI=hDPI@entry=72, vDPI=0, vDPI@entry=72, rotate=32767, rotate@entry=0, useMediaBox=useMediaBox@entry=false,
crop=crop@entry=true, printing=<optimized out>, sliceX=<optimized out>, sliceY=<optimized out>, sliceW=<optimized out>, sliceH=<optimized out>, abortCheckCbk=<optimized out>, abortCheckCbkData=<optimized out>, annotDisplayDecideCbk=<optimized out>,
annotDisplayDecideCbkData=<optimized out>, copyXRef=true) at /home/tsdgeos/devel/poppler/poppler/PDFDoc.cc:664
#15 0x00007ffff7fa3895 in Poppler::renderToArthur (arthur_output=arthur_output@entry=0x7fffe77fd650, painter=painter@entry=0x7fffe77fd5f8, xres=xres@entry=72, yres=yres@entry=72, x=x@entry=-1, y=y@entry=-1, w=-1, h=-1, rotate=Poppler::Page::Rotate0, flags=...,
page=<optimized out>, page=<optimized out>) at /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:491
#16 0x00007ffff7fa42fc in Poppler::Page::renderToImage (this=0x7fffd8005030, xres=72, yres=72, x=-1, y=-1, w=-1, h=-1, rotate=Poppler::Page::Rotate0, partialUpdateCallback=0x0, shouldDoPartialUpdateCallback=0x0, shouldAbortRenderCallback=0x0, payload=...)
at /usr/include/qt/QtCore/qflags.h:120
#17 0x00007ffff7fa47b0 in Poppler::Page::renderToImage (this=<optimized out>, xres=<optimized out>, yres=<optimized out>, x=<optimized out>, y=<optimized out>, w=<optimized out>, h=<optimized out>, rotate=Poppler::Page::Rotate0, partialUpdateCallback=0x0,
shouldDoPartialUpdateCallback=0x0, payload=...) at /home/tsdgeos/devel/poppler/qt5/src/poppler-page.cc:519
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/694Fonts rendered with broken kerning2019-04-11T17:19:08ZGeorgi BoikoFonts rendered with broken kerningThe image speaks for itself. Output from Evince and Adobe Reader compared:
![reader](/uploads/413d10fdda9dc58d066729614c6af8cd/reader.png)
Running `pdftocairo -png ...` on the same file results in identical result.
It seems that this ...The image speaks for itself. Output from Evince and Adobe Reader compared:
![reader](/uploads/413d10fdda9dc58d066729614c6af8cd/reader.png)
Running `pdftocairo -png ...` on the same file results in identical result.
It seems that this ticket for Evince is about the same issue: https://gitlab.gnome.org/GNOME/evince/issues/930https://gitlab.freedesktop.org/poppler/poppler/-/issues/693Display issues with lists and linux biolinum font2018-12-23T12:47:13Z8FordPrefect8Display issues with lists and linux biolinum fontHello,
currently I am using Fedora 29 with gnome. I have some problem with some files that were created with libreoffice using the font linux biolinum and that contain lists, in this case dotted lists.
To my surprise most pdf readers ca...Hello,
currently I am using Fedora 29 with gnome. I have some problem with some files that were created with libreoffice using the font linux biolinum and that contain lists, in this case dotted lists.
To my surprise most pdf readers can't display this correctly. Evince can't even display the pages anymore. It causes even glitches to the evince window. Okular can display most of it. But for example in italic the m's are replaced by spaced or not displayed properly.
The pdfs contain the font or at least a subset of it. They are displayed correctly within libreoffice draw and firefox on my machine. On other systems android, Windows my old ubuntu 16.04 they are shown correctly. This holds for both, new files created on the fedora system but also files created on ubuntu 16.04.
I don't know whether this belongs here but I was adviced on the fedora subreddit to come here and after reading about poppler it sounded logically.https://gitlab.freedesktop.org/poppler/poppler/-/issues/692null pointer dereference in XRef::getEntry2018-12-31T09:57:35Zskysidernull pointer dereference in XRef::getEntrypdfdetach crashes when it's feeded with a specific pdf file.
The command I run with is `pdfdetach -save 1 test.pdf`.
The backtrace is here:
```
Program received signal SIGSEGV, Segmentation fault.
0x082994de in XRefEntry::setFlag (this=0...pdfdetach crashes when it's feeded with a specific pdf file.
The command I run with is `pdfdetach -save 1 test.pdf`.
The backtrace is here:
```
Program received signal SIGSEGV, Segmentation fault.
0x082994de in XRefEntry::setFlag (this=0xe0, flag=XRefEntry::Parsing, value=false) at /work/poppler/poppler/XRef.h:85
85 flags &= ~mask;
(gdb) bt
#0 0x082994de in XRefEntry::setFlag (this=0xe0, flag=XRefEntry::Parsing, value=false) at /work/poppler/poppler/XRef.h:85
#1 0x08295fd1 in Parser::makeStream(Object&&, unsigned char*, CryptAlgorithm, int, int, int, int, bool) (this=0x8651ff8,
dict=<unknown type in /work/poppler/build/utils/pdfdetach, CU 0x225680, DIE 0x23466c>, fileKey=0x0, encAlgorithm=cryptNone, keyLength=1211043104, objNum=7, objGen=0, recursion=3,
strict=false) at /work/poppler/poppler/Parser.cc:303
#2 0x08296cd8 in Parser::getObj (this=0x8651ff8, simpleOnly=false, fileKey=0x0, encAlgorithm=cryptNone, keyLength=1211043104, objNum=7, objGen=0, recursion=2, strict=false)
at /work/poppler/poppler/Parser.cc:134
#3 0x08296ab8 in Parser::getObj (this=0x8651ff8, simpleOnly=false, fileKey=0x0, encAlgorithm=cryptNone, keyLength=1211043104, objNum=7, objGen=0, recursion=1, strict=false)
at /work/poppler/poppler/Parser.cc:93
#4 0x08296fa6 in Parser::getObj (this=0x8651ff8, simpleOnly=false, fileKey=0x0, encAlgorithm=cryptNone, keyLength=1211043104, objNum=7, objGen=0, recursion=0, strict=false)
at /work/poppler/poppler/Parser.cc:120
#5 0x083895fe in XRef::fetch (this=0x8652328, num=7, gen=0, recursion=0) at /work/poppler/poppler/XRef.cc:1132
#6 0x0838b199 in XRef::getCatalog (this=0x8652328) at /work/poppler/poppler/XRef.cc:1064
#7 0x08121c54 in Catalog::Catalog (this=0x8652820, docA=0x8652148) at /work/poppler/poppler/Catalog.cc:94
#8 0x082b6280 in PDFDoc::setup (this=0x8652148, ownerPassword=0x0, userPassword=0x0) at /work/poppler/poppler/PDFDoc.cc:292
#9 0x082b663a in PDFDoc::PDFDoc (this=0x8652148, fileNameA=0x8652038, ownerPassword=0x0, userPassword=0x0, guiDataA=0x0) at /work/poppler/poppler/PDFDoc.cc:170
#10 0x084f9eda in LocalPDFDocBuilder::buildPDFDoc (this=0x86520b0, uri=..., ownerPassword=0x0, userPassword=0x0, guiDataA=0x0) at /work/poppler/poppler/LocalPDFDocBuilder.cc:31
#11 0x08113a6a in main (argc=4, argv=0xffffd7a4) at /work/poppler/utils/pdfdetach.cc:150
```
I analyse the code and find in some situation, entry is null:
```(gdb) bt
#0 XRef::getEntry (this=0x8652328, i=7, complainIfMissing=false) at /work/poppler/poppler/XRef.cc:1552
#1 0x08295f8b in Parser::makeStream(Object&&, unsigned char*, CryptAlgorithm, int, int, int, int, bool) (this=0x8651ff8,
dict=<unknown type in /work/poppler/build/utils/pdfdetach, CU 0x225680, DIE 0x23466c>, fileKey=0x0, encAlgorithm=cryptNone, keyLength=1211043104, objNum=7, objGen=0, recursion=3,
strict=false) at /work/poppler/poppler/Parser.cc:301
#2 0x08296cd8 in Parser::getObj (this=0x8651ff8, simpleOnly=false, fileKey=0x0, encAlgorithm=cryptNone, keyLength=1211043104, objNum=7, objGen=0, recursion=2, strict=false)
at /work/poppler/poppler/Parser.cc:134
#3 0x08296ab8 in Parser::getObj (this=0x8651ff8, simpleOnly=false, fileKey=0x0, encAlgorithm=cryptNone, keyLength=1211043104, objNum=7, objGen=0, recursion=1, strict=false)
at /work/poppler/poppler/Parser.cc:93
#4 0x08296fa6 in Parser::getObj (this=0x8651ff8, simpleOnly=false, fileKey=0x0, encAlgorithm=cryptNone, keyLength=1211043104, objNum=7, objGen=0, recursion=0, strict=false)
at /work/poppler/poppler/Parser.cc:120
#5 0x083895fe in XRef::fetch (this=0x8652328, num=7, gen=0, recursion=0) at /work/poppler/poppler/XRef.cc:1132
#6 0x0838b199 in XRef::getCatalog (this=0x8652328) at /work/poppler/poppler/XRef.cc:1064
#7 0x08121c54 in Catalog::Catalog (this=0x8652820, docA=0x8652148) at /work/poppler/poppler/Catalog.cc:94
#8 0x082b6280 in PDFDoc::setup (this=0x8652148, ownerPassword=0x0, userPassword=0x0) at /work/poppler/poppler/PDFDoc.cc:292
#9 0x082b663a in PDFDoc::PDFDoc (this=0x8652148, fileNameA=0x8652038, ownerPassword=0x0, userPassword=0x0, guiDataA=0x0) at /work/poppler/poppler/PDFDoc.cc:170
#10 0x084f9eda in LocalPDFDocBuilder::buildPDFDoc (this=0x86520b0, uri=..., ownerPassword=0x0, userPassword=0x0, guiDataA=0x0) at /work/poppler/poppler/LocalPDFDocBuilder.cc:31
#11 0x08113a6a in main (argc=4, argv=0xffffd7a4) at /work/poppler/utils/pdfdetach.cc:150
(gdb) p entries
$19 = (XRefEntry *) 0x0
```
The problem is in XRef::getEntry
```
XRefEntry *XRef::getEntry(int i, bool complainIfMissing)
{
if (i >= size || entries[i].type == xrefEntryNone) {
if ((!xRefStream) && mainXRefEntriesOffset) {
if (!parseEntry(mainXRefEntriesOffset + 20*i, &entries[i])) {
error(errSyntaxError, -1, "Failed to parse XRef entry [{0:d}].", i);
}
```
There is lack of check where size is 0 and entries is null[nullpointerdereference.pdf](/uploads/b208588c92e16539930e2cc630775033/nullpointerdereference.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/691Okular misses some dotted lines in a pdf file2018-12-27T17:59:49ZJae-hyeon ParkOkular misses some dotted lines in a pdf fileThe dotted lines in the attached pdf file are not shown by okular while they are displayed correctly by evince. Images rendered by both apps are attached.
* poppler version: 0.71.0
* okular version: 1.6.0 / 18.12.0
* KDE Frameworks ...The dotted lines in the attached pdf file are not shown by okular while they are displayed correctly by evince. Images rendered by both apps are attached.
* poppler version: 0.71.0
* okular version: 1.6.0 / 18.12.0
* KDE Frameworks Version: 5.43.0
* Qt Version: 5.9.4
* originally reported at http://bugs.kde.org/show_bug.cgi?id=402349
* specimen pdf file
[plots.pdf](/uploads/cb6ba5e0a0aa3fe30529bcf3d59ab7e3/plots.pdf)
* render by evince
![plots-evince](/uploads/e8aacb2d9d0779d87f8de64575807c45/plots-evince.png)
* render by okular
![plots-okular](/uploads/0144a24fa99e8a4fa75cc86c3288a55e/plots-okular.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/690evince fails reading pdf with AESV3 256 encryption2018-12-18T21:14:15ZScott Moserevince fails reading pdf with AESV3 256 encryptionHi. This is created as suggested from [evince issue 446](https://gitlab.gnome.org/GNOME/evince/issues/446).
Evince is unable to open PDFs encrypted with 256 bit AES (AESv3) encryption.
I'm seeing this problem with evince 3.30.2 runnin...Hi. This is created as suggested from [evince issue 446](https://gitlab.gnome.org/GNOME/evince/issues/446).
Evince is unable to open PDFs encrypted with 256 bit AES (AESv3) encryption.
I'm seeing this problem with evince 3.30.2 running on Ubuntu (disco).
1. **Show some info on qpdf and evince versions.**
$ dpkg-query --show evince
evince 3.30.2-1
$ evince --version
GNOME Document Viewer 3.30.2
$ qpdf --version
qpdf version 8.2.1
2. **Download a PDF to work with.**
$ wget https://www.adobe.com/support/products/enterprise/knowledgecenter/media/c4611_sample_explain.pdf -q -O plain.pdf
$ md5sum plain.pdf
88bb00da1e9bab21e9cb13248b8770b1 plain.pdf
3. **Encrypt it using qpdf and AES 256.**
$ rm -f encrypted-256.pdf encrypted-128.pdf
$ qpdf --encrypt user-secret owner-secret 256 -- plain.pdf encrypted-256.pdf
$ egrep -a AES encrypted-256.pdf
<< /CF << /StdCF << /AuthEvent /DocOpen /CFM /AESV3 /Length 32 >> >> /Filter /Standard /Length 256 /O <a868eeb995f6ff82543b1f38ab35f99cd9fd3611ddcfbb93f845b895fe64633fbf4e2714dd4dae142ccb602a50ede355> /OE <95e714077d596a65fecf766c94144c09341c9ddedc6f4237852960de7fc6d417> /P -4 /Perms <f708e990e02ae1ddc85b5a120731edc1> /R 6 /StmF /StdCF /StrF /StdCF /U <f972aa5c9877fd6d6650ca7b2705e12141f9d9d711a3378cd5e51c77c5dbc291e5270b54a36015d38b111c1c562a0749> /UE <435b9bd03432ad84261eb3bf19e00ce236e3acc26d831359fa8d2bacf758d1d0> /V 5 >>
$ qpdf --password=user-secret --show-encryption encrypted-256.pdf
R = 6
P = -4
User password = user-secret
extract for accessibility: allowed
extract for any purpose: allowed
print low resolution: allowed
print high resolution: allowed
modify document assembly: allowed
modify forms: allowed
modify annotations: allowed
modify other: allowed
modify anything: allowed
stream encryption method: AESv3
string encryption method: AESv3
file encryption method: AESv3
4. **Attempt to view with evince.** supplying either user or owner password does not work.
5. **For comparision, try with AES 128 bit.**. evince works fine here.
$ qpdf --encrypt user-secret owner-secret 128 --use-aes=y -- plain.pdf encrypted-128.pdf
$ qpdf --password=owner-secret --show-encryption encrypted-128.pdf
R = 4
P = -4
User password = user-secret
extract for accessibility: allowed
extract for any purpose: allowed
print low resolution: allowed
print high resolution: allowed
modify document assembly: allowed
modify forms: allowed
modify annotations: allowed
modify other: allowed
modify anything: allowed
stream encryption method: AESv2
string encryption method: AESv2
file encryption method: AESv2https://gitlab.freedesktop.org/poppler/poppler/-/issues/688Text node broken into multiple parts2018-12-19T08:28:49Zclark knøsenText node broken into multiple partsIn this PDF file a text node is broken into two parts and a character is left out
This string is found in the first invoice line
`0,89MM TRÅD - 6 MASKER PR. TOMME`
The string is broken into two and the `Å` is left out
- `0,89MM TR`
-...In this PDF file a text node is broken into two parts and a character is left out
This string is found in the first invoice line
`0,89MM TRÅD - 6 MASKER PR. TOMME`
The string is broken into two and the `Å` is left out
- `0,89MM TR`
- `D - 6 MASKER PR. TOMME`
The same happens with this text node `NSH BINDETRÅD-VINDSELTR�D 0,55`
`pdftohtml -s -i -nodrm -xml test.pdf out.xml`
`poppler 0.72`
[022.pdf](/uploads/924465aaec3f16feafd3e392bd1d6719/022.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/687Expose method for setting poppler-data location in C++ frontend2018-12-25T22:26:28ZJeroen OomsExpose method for setting poppler-data location in C++ frontendThe R bindings are exclusively using the C++ frontend, except for the part below where we need to set the location of the poppler-data files (which we ship with the application):
```c
#include <GlobalParams.h>
void find_poppler_data(){
...The R bindings are exclusively using the C++ frontend, except for the part below where we need to set the location of the poppler-data files (which we ship with the application):
```c
#include <GlobalParams.h>
void find_poppler_data(){
static bool initiated = false;
if (!initiated && strlen(poppler_data)){
globalParams = new GlobalParams(poppler_data);
initiated = true;
}
}
```
It would be great if this can be exposed in the C++ API so we don't need the legacy API.https://gitlab.freedesktop.org/poppler/poppler/-/issues/686poppler-data needs updating2020-09-26T21:39:41ZAlbert Astals Cidpoppler-data needs updatingThere's new versions of
https://github.com/adobe-type-tools/cmap-resources/releases
https://github.com/adobe-type-tools/mapping-resources-pdf/releasesThere's new versions of
https://github.com/adobe-type-tools/cmap-resources/releases
https://github.com/adobe-type-tools/mapping-resources-pdf/releaseshttps://gitlab.freedesktop.org/poppler/poppler/-/issues/685File generated with PDFsharp 1.31.1789-g does not display2018-12-13T20:58:36ZStephan HelmaFile generated with PDFsharp 1.31.1789-g does not displayI received a file, which was generated with `PDFsharp 1.31.1789-g`. It does not display in `Xreader 1.8.5` and `PDFShuffler 0.6.0` on a Linux Mint 19 system.
`libpoppler` version is 0.62.0-2ubuntu
PDF file in question:
[PRDDET.pdf](/up...I received a file, which was generated with `PDFsharp 1.31.1789-g`. It does not display in `Xreader 1.8.5` and `PDFShuffler 0.6.0` on a Linux Mint 19 system.
`libpoppler` version is 0.62.0-2ubuntu
PDF file in question:
[PRDDET.pdf](/uploads/4992d5bbc0deb89d55bba8208a000957/PRDDET.pdf)
Screenshot:
![Screenshot](/uploads/3a9aab3bee0c4825a5541e087a7f5a80/Screenshot_from_2018-12-13_21-41-09.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/684Support 3D extensions2018-12-14T03:37:07ZAnton KochkovSupport 3D extensions- PRC https://www.pdfa.org/new/prc-now-published-as-iso-14739-12014/
- U3D http://www.ecma-international.org/publications/standards/Ecma-363.htm- PRC https://www.pdfa.org/new/prc-now-published-as-iso-14739-12014/
- U3D http://www.ecma-international.org/publications/standards/Ecma-363.htmhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/683Support animation and media files (GIF, MP4/MP3)2018-12-14T03:36:55ZAnton KochkovSupport animation and media files (GIF, MP4/MP3)PDF can embed either GIF/APNG/WebP object, for example see:
- https://stackoverflow.com/questions/9009771/is-it-possible-to-embed-animated-gifs-in-pdfs
- https://tex.stackexchange.com/questions/5396/is-there-any-way-to-include-an-ani...PDF can embed either GIF/APNG/WebP object, for example see:
- https://stackoverflow.com/questions/9009771/is-it-possible-to-embed-animated-gifs-in-pdfs
- https://tex.stackexchange.com/questions/5396/is-there-any-way-to-include-an-animated-gif-directly/5397#5397
- https://tex.stackexchange.com/questions/1574/embedding-videos-and-animationshttps://gitlab.freedesktop.org/poppler/poppler/-/issues/681Permission Error: Copying of text from this document is not allowed.2018-12-12T10:04:13Zclark knøsenPermission Error: Copying of text from this document is not allowed.```
pdftohtml -s -i -zoom 100 -xml test.pdf pdf.xml
```
Have tried this but then all files get the error
```
pdftohtml -s -i --no-drm -zoom 100 -xml test.pdf pdf.xml
```
[12440_DEKO_DEKORATION.pdf](/uploads/0a9b8438ed3abd45caaf90bc0678e...```
pdftohtml -s -i -zoom 100 -xml test.pdf pdf.xml
```
Have tried this but then all files get the error
```
pdftohtml -s -i --no-drm -zoom 100 -xml test.pdf pdf.xml
```
[12440_DEKO_DEKORATION.pdf](/uploads/0a9b8438ed3abd45caaf90bc0678e4fb/12440_DEKO_DEKORATION.pdf)
```
poppler 0.72
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/679Build on macOS failed.2020-09-15T00:28:54ZQian WangBuild on macOS failed.Hi there, I'm using macOS Mojave.
I followed instructions in INSTALL:
```
mkdir build
cd build
cmake ..
make
make install
```
But it failed with
```
[ 77%] Linking CXX shared library libpoppler-glib.dylib
ld: library not found for -li...Hi there, I'm using macOS Mojave.
I followed instructions in INSTALL:
```
mkdir build
cd build
cmake ..
make
make install
```
But it failed with
```
[ 77%] Linking CXX shared library libpoppler-glib.dylib
ld: library not found for -lintl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [glib/libpoppler-glib.8.11.0.dylib] Error 1
make[1]: *** [glib/CMakeFiles/poppler-glib.dir/all] Error 2
make: *** [all] Error 2
```
Any suggestions please?https://gitlab.freedesktop.org/poppler/poppler/-/issues/678Compiler warnings on Windows (GCC-8)2019-01-12T20:55:18ZJeroen OomsCompiler warnings on Windows (GCC-8)```
[ 20%] Building CXX object CMakeFiles/poppler.dir/poppler/Gfx.cc.obj
C:/Users/Jeroen/Documents/rtools-packages/mingw-w64-poppler/src/poppler-0.71.0/poppler/Function.cc: In member function 'virtual void SampledFunction::transform(cons...```
[ 20%] Building CXX object CMakeFiles/poppler.dir/poppler/Gfx.cc.obj
C:/Users/Jeroen/Documents/rtools-packages/mingw-w64-poppler/src/poppler-0.71.0/poppler/Function.cc: In member function 'virtual void SampledFunction::transform(const double*, double*) const':
C:/Users/Jeroen/Documents/rtools-packages/mingw-w64-poppler/src/poppler-0.71.0/poppler/Function.cc:481:21: warning: 'e[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
idx0 = (idx0 + e[0]) * n;
~~~^
```
```
[ 23%] Building CXX object CMakeFiles/poppler.dir/poppler/JArithmeticDecoder.cc.obj
In file included from C:/Users/Jeroen/Documents/rtools-packages/mingw-w64-poppler/src/poppler-0.71.0/poppler/GlobalParams.cc:1012:
C:/Users/Jeroen/Documents/rtools-packages/mingw-w64-poppler/src/poppler-0.71.0/poppler/GlobalParamsWin.cc: In function 'void GetWindowsFontDir(char*, int)':
C:/Users/Jeroen/Documents/rtools-packages/mingw-w64-poppler/src/poppler-0.71.0/poppler/GlobalParamsWin.cc:181:70: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'HRESULT (*)(HWND, int, HANDLE, DWORD, LPSTR)' {aka 'long int (*)(HWND__*, int, void*, long unsigned int, char*)'} [-Wcast-function-type]
GetProcAddress(hLib, "SHGetFolderPathA");
^
C:/Users/Jeroen/Documents/rtools-packages/mingw-w64-poppler/src/poppler-0.71.0/poppler/GlobalParamsWin.cc:188:89: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'BOOL (*)(HWND, LPSTR, int, BOOL)' {aka 'int (*)(HWND__*, char*, int, int)'} [-Wcast-function-type]
GetProcAddress(hLib, "SHGetSpecialFolderPathA");
^
C:/Users/Jeroen/Documents/rtools-packages/mingw-w64-poppler/src/poppler-0.71.0/poppler/GlobalParamsWin.cc:201:70: warning: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'HRESULT (*)(HWND, int, HANDLE, DWORD, LPSTR)' {aka 'long int (*)(HWND__*, int, void*, long unsigned int, char*)'} [-Wcast-function-type]
GetProcAddress(hLib, "SHGetFolderPathA");
^
```
```
[ 23%] Building CXX object CMakeFiles/poppler.dir/poppler/JBIG2Stream.cc.obj
In function 'void GetWindowsFontDir(char*, int)',
inlined from 'void GlobalParams::setupBaseFonts(char*)' at C:/Users/Jeroen/Documents/rtools-packages/mingw-w64-poppler/src/poppler-0.71.0/poppler/GlobalParamsWin.cc:402:22:
C:/Users/Jeroen/Documents/rtools-packages/mingw-w64-poppler/src/poppler-0.71.0/poppler/GlobalParamsWin.cc:212:16: warning: 'char* strncat(char*, const char*, size_t)' specified bound 260 equals destination size [-Wstringop-overflow=]
strncat(winFontDir, FONTS_SUBDIR, cbWinFontDirLen);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/677Porting link extractor to poppler-cpp2018-12-12T10:04:45ZJeroen OomsPorting link extractor to poppler-cppFeature request: I'm very interested in extracting hyperlinks using the C++ API. Albert has previously suggested to copy the code from the
Qt frontend ([poppler-link.cc](https://gitlab.freedesktop.org/poppler/poppler/blob/master/qt5/src...Feature request: I'm very interested in extracting hyperlinks using the C++ API. Albert has previously suggested to copy the code from the
Qt frontend ([poppler-link.cc](https://gitlab.freedesktop.org/poppler/poppler/blob/master/qt5/src/poppler-link.cc) and [poppler-link-extractor.cc](https://gitlab.freedesktop.org/poppler/poppler/blob/master/qt5/src/poppler-link-extractor.cc)) and replace it by the C++ classes.
I'm not familiar enough myself with the code to write a patch but can help testing. Thanks!