poppler issueshttps://gitlab.freedesktop.org/poppler/poppler/-/issues2020-06-07T16:07:58Zhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/924CURL::libcurl target not found2020-06-07T16:07:58ZederagCURL::libcurl target not foundFor information:
While building from source, cmake failed with
```cmake
CMake Error at CMakeLists.txt:535 (add_library):
Target "poppler" links to target "CURL::libcurl" but the target was not
found. Perhaps a find_package() call i...For information:
While building from source, cmake failed with
```cmake
CMake Error at CMakeLists.txt:535 (add_library):
Target "poppler" links to target "CURL::libcurl" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
```
`CURL::libcurl` appeared first in [cmake-3.12](https://cmake.org/cmake/help/v3.12/module/FindCURL.html),
[about 2 years old](https://github.com/Kitware/CMake/releases/tag/v3.12.4).
Mine was 3.10.2 (from the latest openSUSE Leap release: 15.1).
`poppler-0.89.0` built fine. The first failure came with bf7e84cc2399969cc6a98bbcc689a90e20095f39.https://gitlab.freedesktop.org/poppler/poppler/-/issues/925Questionable Fallbacks and Rendering Errors with Microsoft PS/MT Fonts2021-02-26T10:01:17ZAdam HirstQuestionable Fallbacks and Rendering Errors with Microsoft PS/MT FontsAffected file: [2020_General_Information_Handbook.pdf](/uploads/a6146d9214599713af0f190f12eea722/2020_General_Information_Handbook.pdf)
Also available at: http://jetprogramme.org/wp-content/MAIN-PAGE/COMMON/publications/2020GIH_e.pdf
T...Affected file: [2020_General_Information_Handbook.pdf](/uploads/a6146d9214599713af0f190f12eea722/2020_General_Information_Handbook.pdf)
Also available at: http://jetprogramme.org/wp-content/MAIN-PAGE/COMMON/publications/2020GIH_e.pdf
Two sections with obviously incorrect rendering, when using evince. I was recommended in #evince over at GIMPNet to report these issues here. I believe the issues stem from the same cause, so I'll first summarise the symptoms, then talk about my system setup, and then what I **think** the problem might be.
## 1) The macron diacritic, e.g. in words like jūsho. Look at the bottom-left of page 2.
How it looks in evince:
![2-evince](/uploads/f3af4f53562cc98071b6cdc5f41c40ce/2-evince.png)
How it looks in Firefox (pdf.js) or mupdf:
![1-firefox](/uploads/5a5414ff7620ee63869109d87d25d1a5/1-firefox.png)
As far as it's possible to tell, the firefox/mupdf rendering is essentially correct.
I ran pdftoppm on the affected page and it exhibits the same issue: [page-02.ppm](/uploads/3ea2b3db88956036f020df3ee97d606f/page-02.ppm) This is also the case when using pdftocairo, though I'm not sure what output format would be most useful.
## 2) The section header "Overview of the JET Programme" on the top of page 92 / 94 (depending on how you count the pages) consists of the same text overlaid twice for visual emphasis.
How it looks in evince:
![evince-bold](/uploads/e68725a58fd87ebc8a6b46eb5707b79c/evince-bold.png)
How it looks in Firefox (pdf.js) or mupdf:
![firefox-bold](/uploads/8a830a2e61b9d0f8dad3a97b2e1a88a1/firefox-bold.png)
The evince rendering is **obviously wrong** - the firefox/mupdf rendering is obviously not what the document creator intended but **is** obviously better.
I ran pdftoppm on the affected page and it exhibits the same issue: [page-94.ppm](/uploads/9a6649bfc5b9b065f3f739a258880b1a/page-94.ppm) This is also the case when using pdftocairo, though I'm not sure what output format would be most useful.
---
I'm running Arch Linux with the ttf-ms-win10 fonts package installed - all the fonts were sourced from a Windows 10 install on another machine I own.
```
poppler 0.88.0-1
evince 3.36.4-1
firefox 77.0.1-1
mupdf-gl 1.17.0-1
```
---
I think the problem comes down to how some of the fonts in the PDF are not embedded, and that the fonts are being resolved to alternatives that are not sensible.
```
TimesNewRomanPSMT -> Times New Roman [looks good]
TimesNewRomanPS-BoldMT -> Verdana Bold [very silly, one is serif and the other is sans-serif]
TimesNewRomanPS-ItalicMT -> Verdana Italic [same problem]
TimesNewRomanPS-BoldItalicMT -> Verdana Bold Italic [same problem]
```
As far as I can tell, this substitution isn't coming from the fontconfig sections that are on my system or provided by the ttf-ms-win10 package; and it also doesn't seem possible to force-override these substitutions to just point to Times New Roman (though I would appreciate any assistance on IRC with trying to achieve this).
The issue looks very similar to this old unresolved one with fontconfig: https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/1693709
---
I would be more than happy to provide more details either here or on IRC (Freenode #poppler) as `aphirst`.https://gitlab.freedesktop.org/poppler/poppler/-/issues/926Characters from Zapf Dingbats in PDF are not rendered2020-08-04T20:35:36ZMathnerd314Characters from Zapf Dingbats in PDF are not renderedThis is the file, it's the check / X marks ✓ ✗ used on pages 84-87:
https://web.archive.org/web/20160818132612if_/http://thyer.name/phd-thesis/thesis-thyer.pdf
Chrome, Firefox, Adobe Reader, and mupdf all render fine, but Evince draws ▯...This is the file, it's the check / X marks ✓ ✗ used on pages 84-87:
https://web.archive.org/web/20160818132612if_/http://thyer.name/phd-thesis/thesis-thyer.pdf
Chrome, Firefox, Adobe Reader, and mupdf all render fine, but Evince draws ▯ boxes and Okular draws nothing, so it seems to be poppler-related.
Investigating the properties in Okular/evince it seems that the glyphs are probably from ZapfDingbats, and it's trying to substitute with Noto Sans Regular.
Judging from #925 this might be a fontconfig thing too, rather than poppler by itself, but IDK what fontconfig settings to use. I'm running NixOS 20.09 ([unstable](https://github.com/NixOS/nixpkgs/tree/029a5de08390bb03c3f44230b064fd1850c6658a)) and they don't ship the ancient URW fonts recommended [here](https://freedesktop.org/wiki/Software/poppler/). There is FreeSerif, but maybe the metrics aren't compatible anymore. And there's still the question of why everything besides poppler magically works.https://gitlab.freedesktop.org/poppler/poppler/-/issues/927incorrect size on pdftoppm2021-04-14T20:51:06ZStefano Padovanincorrect size on pdftoppmUsing the attached file with following command (on poppler 0.89.0), the png file produced is 257x256, instead of 256x256.
`pdftoppm -scale-dimension-before-rotation -r 200 pmc6187247.pdf -f 1 -l 13 -scale-to-x 256 -scale-to-y 256 -sing...Using the attached file with following command (on poppler 0.89.0), the png file produced is 257x256, instead of 256x256.
`pdftoppm -scale-dimension-before-rotation -r 200 pmc6187247.pdf -f 1 -l 13 -scale-to-x 256 -scale-to-y 256 -singlefile -png > scaled.png`
[pmc6187247.pdf](/uploads/5a955bf422bbb3cc9b9bb7393afcae4d/pmc6187247.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/928[patch] [pdftops] Add an option to disable splash2020-06-17T19:32:19ZWilliam Bader[patch] [pdftops] Add an option to disable splashI have an application that parses the output of pdftops in order to locate text. I noticed that it didn't find anything in some files because they had transparencies and pdftops reverted to making the entire output an image generated by ...I have an application that parses the output of pdftops in order to locate text. I noticed that it didn't find anything in some files because they had transparencies and pdftops reverted to making the entire output an image generated by splash. The attached patches add a -nosplash option that avoids using splash, even though the output might not be correct. For this application, I will never view or print the ps, so I don't care if some images are messed up. [poppler-0.89.0-nosplash.patch](/uploads/b610170abb0942a22d7730cfecd47173/poppler-0.89.0-nosplash.patch)https://gitlab.freedesktop.org/poppler/poppler/-/issues/929pdfsig: certificate details not displayed correctly2020-06-24T08:59:25ZGergely EGERVARYpdfsig: certificate details not displayed correctlyHi there!
I have a PDF signed with two signatures. The first signature is displayed correctly, but the second one misses CN and DN fields:
Digital Signature Info of: foobar.pdf
Signature 1:
- Signer Certificate Common Name: AVDH Bély...Hi there!
I have a PDF signed with two signatures. The first signature is displayed correctly, but the second one misses CN and DN fields:
Digital Signature Info of: foobar.pdf
Signature 1:
- Signer Certificate Common Name: AVDH Bélyegző
- Signer full Distinguished Name: CN=AVDH Bélyegző,serialNumber=DO20130917-1DO478,O=NISZ Nemzeti Infokommunikációs Szolgáltató Zrt.,OID.2.5.4.97=VATHU-10585560-2-44,L=Budapest,C=HU
- Signing Time: May 26 2020 20:10:06
- Signing Hash Algorithm: SHA-256
- Signature Type: adbe.pkcs7.detached
- Signed Ranges: [0 - 193405], [226175 - 228763]
- Not total document signed
- Signature Validation: Signature is Valid.
- Certificate Validation: Certificate issuer isn't Trusted.
Unimplemented Feature (0): Unable to validate this type of signature
Signature 2:
- Signer Certificate Common Name: (null)
- Signer full Distinguished Name: (null)
- Signing Time: May 26 2020 20:10:12
- Signing Hash Algorithm: unknown
- Signature Type: adbe.pkcs7.detached
- Signed Ranges: [0 - 251814], [260008 - 261919]
- Not total document signed
- Signature Validation: Signature has not yet been verified.
I have attached the two signing certificates to this ticket. OpenSSL can correctly extract the certificate details from them.
Thanks in advance!
[foobar.pdf.sig0](/uploads/55f083b99d64c1d314063423b6e59727/foobar.pdf.sig0)
[foobar.pdf.sig1](/uploads/8248ee175fdd0fa1c5e26b58fbd66a7e/foobar.pdf.sig1)https://gitlab.freedesktop.org/poppler/poppler/-/issues/930pdfunite crashed with SIGABRT in main()2020-06-21T05:46:37ZEsokratespdfunite crashed with SIGABRT in main()Following crash was caught by Apport in Ubuntu 20.04. Crash was triggered by running `pdfunite UE7.pdf UE7-append.pdf UE7.pdf`:
```
Stacktrace:
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
set = {_...Following crash was caught by Apport in Ubuntu 20.04. Crash was triggered by running `pdfunite UE7.pdf UE7-append.pdf UE7.pdf`:
```
Stacktrace:
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
set = {__val = {0, 93928966115392, 55, 93928999065392, 7, 93928999065280, 93928999065376, 140301947519011, 206158430256, 140723515419936, 140723515419744, 9846784182788627200, 121, 18446744073709551488, 0, 140301952796440}}
pid = <optimized out>
tid = <optimized out>
ret = <optimized out>
#1 0x00007f9a97ad8859 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0xd, sa_sigaction = 0xd}, sa_mask = {__val = {140723515419896, 13, 140723515419896, 0, 9846784182788627200, 0, 93928999060624, 93928999057376, 140723515420512, 140723515420480, 93928999056464, 140723515420672, 140301952314607, 93928999060896, 93928999060624, 93928999058544}}, sa_flags = -1935704928, sa_restorer = 0x7ffcbf25ef40}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x0000556d8aa89aa6 in ?? ()
No symbol table info available.
#3 0x0000556d8aa87d28 in main ()
No symbol table info available.
StacktraceAddressSignature: /usr/bin/pdfunite:6:/usr/lib/x86_64-linux-gnu/libc-2.31.so+859:/usr/bin/pdfunite+2aa6:/usr/bin/pdfunite+d28
StacktraceSource:
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[Error: raise.c was not found in source tree]
#1 0x00007f9a97ad8859 in __GI_abort () at abort.c:79
[Error: abort.c was not found in source tree]
#2 0x0000556d8aa89aa6 in ?? ()
#3 0x0000556d8aa87d28 in main ()
StacktraceTop:
?? ()
main ()
Tags: focal wayland-session
ThreadStacktrace:
.
Thread 1 (Thread 0x7f9a96e847c0 (LWP 73202)):
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
set = {__val = {0, 93928966115392, 55, 93928999065392, 7, 93928999065280, 93928999065376, 140301947519011, 206158430256, 140723515419936, 140723515419744, 9846784182788627200, 121, 18446744073709551488, 0, 140301952796440}}
pid = <optimized out>
tid = <optimized out>
ret = <optimized out>
#1 0x00007f9a97ad8859 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0xd, sa_sigaction = 0xd}, sa_mask = {__val = {140723515419896, 13, 140723515419896, 0, 9846784182788627200, 0, 93928999060624, 93928999057376, 140723515420512, 140723515420480, 93928999056464, 140723515420672, 140301952314607, 93928999060896, 93928999060624, 93928999058544}}, sa_flags = -1935704928, sa_restorer = 0x7ffcbf25ef40}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x0000556d8aa89aa6 in ?? ()
No symbol table info available.
#3 0x0000556d8aa87d28 in main ()
No symbol table info available.
```
Full apport file:
[_usr_bin_pdfunite.1000.crash.txt](/uploads/765dcd253a012c6bdfcaed1a88f0afdf/_usr_bin_pdfunite.1000.crash.txt)https://gitlab.freedesktop.org/poppler/poppler/-/issues/931Denial Of Service through crafted PDF File2022-12-04T00:29:56ZCarlos Andres RamirezDenial Of Service through crafted PDF FileHello Poppler team,
During an incident response procedure for a client, it was found that some malicious customers were uploading malcrafted PDF files, among other things, that are later manipulated by staff.
The goal is still unclear,...Hello Poppler team,
During an incident response procedure for a client, it was found that some malicious customers were uploading malcrafted PDF files, among other things, that are later manipulated by staff.
The goal is still unclear, but when analyzing the files, this is what I have found out:
- Malcrafted files totally crash Files (Simple file manager for GNOME) **EVEN without opening the file** - seems the program access their header when you attempt to see files properties, size, etc.
- If you attempt to open them (as some staff did) they either crash **EVINCE** or consume your processing power
- By researching Evince, we isolated Poppler as the vulnerable surface
- After confirmation, we tested, and can confirm it affects Latest up to date linux versions
- No evidence of privilege escalation/remote control has been found so far
**Technical DETAILS**
PDF files containing particularly crafted data trigger an infinite loop that causes stream file reads to keep failing, inside the error() in poppler/Error.cc
Here is the sequence of functions that we see:
* FileStream::getPos()
* GooString::appendfv(char const*, __va_list_tag*),
* GooString::appendfv(char const*, __va_list_tag*),
* _poppler_error_cb(ErrorCategory, long long, char const*),
...Repeats
I will attach a case file near identical to original (We had to carefully clean personal information, so it is slightly modified but seems to still work). Attachment will be in a separate confidential report to team members.
Thank you,
----
Carlos Andres Ramirezhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/933pdfsig dumps core2020-06-20T22:32:02ZRichard PALOpdfsig dumps coreIt's been awhile since I've tried pdfsig, but I'm getting a SEGV on any pdf I try:
```
Stack trace of thread 1096142:
#0 0x00007f07aea6d281 _ZN6PDFDoc18getSignatureFieldsEv (libpoppler.so.99 + 0x1cd281)
#...It's been awhile since I've tried pdfsig, but I'm getting a SEGV on any pdf I try:
```
Stack trace of thread 1096142:
#0 0x00007f07aea6d281 _ZN6PDFDoc18getSignatureFieldsEv (libpoppler.so.99 + 0x1cd281)
#1 0x000056213711729c main (pdfsig + 0x229c)
#2 0x00007f07ae51f002 __libc_start_main (libc.so.6 + 0x27002)
#3 0x0000562137117c2e _start (pdfsig + 0x2c2e)
```
pdfinfo reports for example:
```
Producer: cairo 1.17.3 (https://cairographics.org)
CreationDate: Sun Nov 17 12:04:30 2019 CET
Tagged: no
UserProperties: no
Suspects: no
Form: none
JavaScript: no
Pages: 1
Encrypted: no
Page size: 595.276 x 841.89 pts (A4)
Page rot: 0
File size: 1723686 bytes
Optimized: no
PDF version: 1.5
```
running on uptodate `Linux sarchx64 5.4.47-1-lts #1 SMP Wed, 17 Jun 2020 19:42:02 +0000 x86_64 GNU/Linux`
```
$ pacman -Qo pdfsig
/usr/bin/pdfsig appartient à poppler 0.88.0-1
```
last few strace lines(immediately after `openat`:
```
fstat(14, {st_mode=S_IFREG|0644, st_size=1723686, ...}) = 0
lseek(14, 0, SEEK_END) = 1723686
lseek(14, 0, SEEK_END) = 1723686
pread64(14, "%PDF-1.5\n%\265\355\256\373\n4 0 obj\n<< /Lengt"..., 256, 0) = 256
pread64(14, "<<\n /ExtGState <<\n /a0 <<"..., 256, 256) = 256
pread64(14, " /I true\n /CS /DeviceRGB\n"..., 256, 512) = 256
pread64(14, ">>\nstream\nx\234L\275\211\266\335H\256,\371\377\237\372\326\353\2246\247\230I6"..., 256, 768) = 256
pread64(14, "%PDF-1.5\n%\265\355\256\373\n4 0 obj\n<< /Lengt"..., 256, 0) = 256
lseek(14, 0, SEEK_END) = 1723686
pread64(14, "\24*\343\301KaR\237\313\321Vn3\v}#+\"_\274\34\36\\\317\250z\335\314\371\240ku"..., 256, 1722662) = 256
pread64(14, "\330U\340\337\271\20\302\353\217\262\372b\341\210\257\311)$/\320j\370\3213o8VX\252|P\273"..., 256, 1722918) = 256
pread64(14, "<< /Type /Pages\n /Kids [ 2 0 R"..., 256, 1723174) = 256
pread64(14, "001723166 00000 n \n0000000348 00"..., 256, 1723430) = 256
pread64(14, "xref\n0 10\n0000000000 65535 f \n00"..., 256, 1723399) = 256
pread64(14, "0 R\n>>\nstartxref\n1723399\n%%EOF\n", 256, 1723655) = 31
pread64(14, "9 0 obj\n<< /Type /Catalog\n /Pa"..., 256, 1723347) = 256
pread64(14, "8 0 obj\n<< /Producer (cairo 1.17"..., 256, 1723231) = 256
pread64(14, "8 0 obj\n<< /Producer (cairo 1.17"..., 256, 1723231) = 256
pread64(14, "8 0 obj\n<< /Producer (cairo 1.17"..., 256, 1723231) = 256
pread64(14, "8 0 obj\n<< /Producer (cairo 1.17"..., 256, 1723231) = 256
pread64(14, "8 0 obj\n<< /Producer (cairo 1.17"..., 256, 1723231) = 256
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x8} ---
+++ killed by SIGSEGV (core dumped) +++
[pdfsig.txt](/uploads/aa46a7554ffd2db5a6bf0256832debbf/pdfsig.txt)```https://gitlab.freedesktop.org/poppler/poppler/-/issues/934Blurry Fonts2023-03-06T12:05:14ZanmeldBlurry FontsIssued a problem about blurry fonts in pdfs using evince. They told me to issue here:
https://gitlab.gnome.org/GNOME/evince/-/issues/1439
Any advices?Issued a problem about blurry fonts in pdfs using evince. They told me to issue here:
https://gitlab.gnome.org/GNOME/evince/-/issues/1439
Any advices?https://gitlab.freedesktop.org/poppler/poppler/-/issues/936Overflow in Xref2020-07-13T20:24:54ZshellwayxwOverflow in XrefI find an overflow in XRef, which is caused by mutual recursive call.
./pdfinfo ./xref.pdf
[xref.zip](/uploads/2dc6000cf4963e722f4e1e884cb088bd/xref.zip)I find an overflow in XRef, which is caused by mutual recursive call.
./pdfinfo ./xref.pdf
[xref.zip](/uploads/2dc6000cf4963e722f4e1e884cb088bd/xref.zip)https://gitlab.freedesktop.org/poppler/poppler/-/issues/937tiling pattern clipped rendering2020-07-16T16:57:29Zwangptiling pattern clipped renderingThe following PDF renders incorrectly with Okular/poppler_qt5viewer/pdftoppm (attached). It renders correctly with evince/pdftocairo.
Tested with poppler-0.90.0
[pattern.pdf](/uploads/4e0178fe2efd008113c1860460565999/pattern.pdf)
[pdf...The following PDF renders incorrectly with Okular/poppler_qt5viewer/pdftoppm (attached). It renders correctly with evince/pdftocairo.
Tested with poppler-0.90.0
[pattern.pdf](/uploads/4e0178fe2efd008113c1860460565999/pattern.pdf)
[pdftoppm output](/uploads/2adf4ae89a7aa11c3590cc78c152ba96/pattern.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/938PDF - Stitching functions with sampled function that repeats a pattern does n...2021-07-28T18:29:35ZJacob SieferPDF - Stitching functions with sampled function that repeats a pattern does not get renderedThis issue was previously raised downstream at gnome - evince: https://gitlab.gnome.org/GNOME/evince/-/issues/1451
Drawing a linear gradient:
```css
background: linear-gradient(red 0%, green 25%, blue 50%, red 50%, green 75%, blue 100%)...This issue was previously raised downstream at gnome - evince: https://gitlab.gnome.org/GNOME/evince/-/issues/1451
Drawing a linear gradient:
```css
background: linear-gradient(red 0%, green 25%, blue 50%, red 50%, green 75%, blue 100%);
```
| Expected | Actual |
| ------ | ------ |
| ![expected](/uploads/cf6339fcc3adf6a3dbf73069b4a70c55/expected.png) | ![actual](/uploads/445c11e8b59cc5ec11f28779c7e6f877/actual.png) |
The PDF uses stitching functions with sampled functions. The gradient repeats it self, and looks fine on all viewers. However Evince seems to ignore the last 3 sampled functions and only shows half.
By changing the color of one of the color sample values by one, Evince is happy again and renders the files as expected.
See attached files and different in line 97 - second last byte.
[fails.pdf](/uploads/647022a2a69273a8210f1ae67f63faf7/fails.pdf)
[works.pdf](/uploads/0ec329abddd5d5d95379fb25a1902ffa/works.pdf)
> The issue can be reproduced with poppler's utilities. For example:
> ```shell
> % pdftoppm -png 'fails.pdf' -o fails-default
> % pdftocairo -png 'fails.pdf' -o fails-cairo
> ```
> Those commands will generate a png each. The first one correctly (splash backend of Poppler), and the second wrongly (cairo backend of Poppler).
>
> Comment by @gpoohttps://gitlab.freedesktop.org/poppler/poppler/-/issues/939Support ASCII table borders rendering using pdftotext2020-07-09T21:33:53ZMateusz JanekSupport ASCII table borders rendering using pdftotextHi, I'm trying to figure out how to implement rendering borders of tables in pdf to text mode. It could be a simple use of `|`, `-`, `+` characters. Could you please guide me where the tables are handled in the code? I can't find any obv...Hi, I'm trying to figure out how to implement rendering borders of tables in pdf to text mode. It could be a simple use of `|`, `-`, `+` characters. Could you please guide me where the tables are handled in the code? I can't find any obvious place.https://gitlab.freedesktop.org/poppler/poppler/-/issues/940Pdf outline modification2024-01-08T22:36:20ZZachary IngersollPdf outline modificationWhether it is possible to modify a pdf's outline based on a given outline file?Whether it is possible to modify a pdf's outline based on a given outline file?https://gitlab.freedesktop.org/poppler/poppler/-/issues/941Support 'de facto' UTF16-LE strings in pdf2020-07-10T21:00:45ZNelson Benítez LeónSupport 'de facto' UTF16-LE strings in pdfPDF standard does not use UTF16-LE strings (instead mandates UTF16-BE) but we can find pdf files in the wild which include LE strings.
I'm attaching such a one file: [INDICE2020-03-23.pdf](/uploads/56f716ae547ee09d25c6347c6e98a15a/INDIC...PDF standard does not use UTF16-LE strings (instead mandates UTF16-BE) but we can find pdf files in the wild which include LE strings.
I'm attaching such a one file: [INDICE2020-03-23.pdf](/uploads/56f716ae547ee09d25c6347c6e98a15a/INDICE2020-03-23.pdf)
you'll notice the Outline items for page 14 and 31 show garbage text (a starting 'ÿþ' in the case of Okular) and in Evince even no text at all, only the two garbage chars are shown (which are the ascii representation of the UTF16 leading BOM bytes).
In Adobe Reader and in pdf.js those outline items are shown fine, so they are supporting LE strings. Let's do the same and add support for that.
Evince issue: https://gitlab.gnome.org/GNOME/evince/-/issues/1444https://gitlab.freedesktop.org/poppler/poppler/-/issues/942Bug: white stripes added to the pdf: horizontally and vertically.2020-09-01T13:01:29ZGuy FlaxBug: white stripes added to the pdf: horizontally and vertically.white stripes added to the pdf.
horizontally and vertically.
it doesn't happen with chrome PDF or Adobe.
github discussion I started:
https://stackoverflow.com/questions/62660779/why-there-are-white-stripes-inside-a-pdf-image-when-i...white stripes added to the pdf.
horizontally and vertically.
it doesn't happen with chrome PDF or Adobe.
github discussion I started:
https://stackoverflow.com/questions/62660779/why-there-are-white-stripes-inside-a-pdf-image-when-im-open-the-pdf-with-gimp-o?noredirect=1#comment110934865_62660779
[pRuTg](/uploads/ce9bf63adc5ddf7972350015b8910d7f/pRuTg.jpg)https://gitlab.freedesktop.org/poppler/poppler/-/issues/944Cairo backend doesn't render imageless type 3 glyph2022-04-04T11:37:23ZOri AvtalionCairo backend doesn't render imageless type 3 glyphUsing libpoppler 0.86.1-0ubuntu1.
[This PDF](/uploads/762ef81481fb55bda8c0503b1ee05c94/Super_Skill_Pinball.pdf) includes images for various inline images as part of the text, such as die faces.
This can be seen throughout, but specifica...Using libpoppler 0.86.1-0ubuntu1.
[This PDF](/uploads/762ef81481fb55bda8c0503b1ee05c94/Super_Skill_Pinball.pdf) includes images for various inline images as part of the text, such as die faces.
This can be seen throughout, but specifically on page 5.
With a Cairo-based program, such as `evince` or `pdftocairo`, these images don't show. Instead, there are just solid squares.
The images appear correctly when using `pdftoppm`.
In other cases, such as on the top left of page 20, yellow circles with stars are supposed to show, but instead, there's nothing, not even solid shapes.https://gitlab.freedesktop.org/poppler/poppler/-/issues/945Feature Request: tabs in pdftotext -layout2020-07-26T10:56:29ZCraig SandersFeature Request: tabs in pdftotext -layoutIs it possible to have the `-layout` option add tab characters between columns, when working with a multi-column PDF?
Or another option, say "`-columntabs`", to be used with -layout to do this?
I often work with 2 or 3 column PDF files ...Is it possible to have the `-layout` option add tab characters between columns, when working with a multi-column PDF?
Or another option, say "`-columntabs`", to be used with -layout to do this?
I often work with 2 or 3 column PDF files with lots of text tables. Without `-layout`, the tables are a useless mess so I use the `-layout` option and manually edit the text file with vim to insert tab characters between the columns, then use a perl script to split each page on the tabs and convert it to single-column.
Even with vim, adding the tabs can be a long and tedious process, especially with dozens or hundreds of pages.
It would be great if I could skip the "edit with vim" stage, or even minimise that step to just removing excess tabs from tables.https://gitlab.freedesktop.org/poppler/poppler/-/issues/946Overprint preview output2020-07-29T15:04:26ZMarius TurcuOverprint preview outputHello!
I try to achieve a png output preview output like the one from adobe reader. Please let me know if is possible or if I do something wrong.
- Command: `pdftocairo -q -png -x 0 -y 0 -W 1604 -H 773 -r 171 -singlefile -f 1 -l 1 -tran...Hello!
I try to achieve a png output preview output like the one from adobe reader. Please let me know if is possible or if I do something wrong.
- Command: `pdftocairo -q -png -x 0 -y 0 -W 1604 -H 773 -r 171 -singlefile -f 1 -l 1 -transp input.pdf out.png`
- File: [input.pdf](/uploads/1fe622326ff84db9379dcb453cedd064/input.pdf)
- Expected result: ![image](/uploads/898e36fd13c14720cecd676a39e791f5/image.png)
- Actual result: ![image](/uploads/b385779ce6ea4c5324888c017d5cb661/image.png)
Thank you in advance!https://gitlab.freedesktop.org/poppler/poppler/-/issues/947[enhancement] Make scaling work with mixed-orientation documents2021-01-13T22:50:47ZAnton Thomasson[enhancement] Make scaling work with mixed-orientation documentsScaling is really helpful when using pdftoppm in a printing pipeline, the problem is that landscape pages end up not being usable. They either get squashed or remain landscape....
There is no rotate-to-fit logic, so you end up with squa...Scaling is really helpful when using pdftoppm in a printing pipeline, the problem is that landscape pages end up not being usable. They either get squashed or remain landscape....
There is no rotate-to-fit logic, so you end up with squashed pages if they are truly encoded in portrait, or they remain landscape if they are rotated by attributes in the PDF. If you set `-scale-dimension-before-rotation`, all landscape-looking pages end up squashed.
Would it be possible to add an option to rotate with +/- 90 degrees (in addition to any pre-existing rotation attribute) conditionally on the page aspect ratio?
Here is a good test PDF, which both has a true landscape page, and a rotated one.
https://wiki.debian.org/CUPSPdfToPdf?action=AttachFile&do=view&target=mixed.pdfhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/948Build Poppler with non-default dependency installations2020-08-03T13:48:42ZErik MüllerBuild Poppler with non-default dependency installationsI need to build libvips with Poppler support for AWS Lambda and I want Poppler to use custom installations of libraries such as `libtiff`, `libpng`, `fontconfig`, etc.
How can I configure the Poppler build to use my custom installed li...I need to build libvips with Poppler support for AWS Lambda and I want Poppler to use custom installations of libraries such as `libtiff`, `libpng`, `fontconfig`, etc.
How can I configure the Poppler build to use my custom installed library versions from `/opt` instead of the pre-installed one from `\usr`?
I use the Docker image [`lambci/lambda:build-go1.x`](https://github.com/lambci/docker-lambda) to build Poppler and the needed libraries from source. Libraries such as `libtiff`, `libpng`, and `fontconfig` are pre-installed on AWS Lambda, but their versions are outdated and have known security issues. I want to add the latest version to the layer and use that version instead of the pre-installed one. I'm installing to `/opt`, i. e. using `./configure --prefix=/opt` or `cmake .. -DCMAKE_INSTALL_PREFIX=/opt`, as layers are extracted to `/opt` at runtime.
When building Poppler, Poppler is picking up the old versions from `/usr/lib64` instead of the newer ones from `/opt/lib`.
Poppler build output:
```
-- Found Freetype: /usr/lib64/libfreetype.so (found version "2.3.11")
-- Checking for module 'fontconfig'
-- Found fontconfig, version 2.13.1
-- Found Fontconfig: /usr/lib64/libfontconfig.so <== should be /opt/lib/libfontconfig.so
-- Found JPEG: /usr/lib64/libjpeg.so (found version "62")
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.8")
-- Found PNG: /usr/lib64/libpng.so (found version "1.2.49") <== should be /opt/lib/libpng.so, "1.6.37"
-- Found TIFF: /usr/lib64/libtiff.so (found version "4.0.3")
```
Relevant parts of my Dockerfile:
```Dockerfile
ENV BUILD_DIR="/tmp/build"
ENV INSTALL_DIR="/opt"
ENV PKG_CONFIG_PATH="${INSTALL_DIR}/lib64/pkgconfig:${INSTALL_DIR}/lib/pkgconfig" \
PKG_CONFIG="/usr/bin/pkg-config" \
PATH="${INSTALL_DIR}/bin:${PATH}"
ENV LD_LIBRARY_PATH="${INSTALL_DIR}/lib64:${INSTALL_DIR}/lib"
ENV LIBPNG_VERSION=1.6.37
ENV LIBPNG_BUILD_DIR=${BUILD_DIR}/libpng
RUN set -Eeuxo pipefail \
&& mkdir -p ${LIBPNG_BUILD_DIR} \
&& curl -L https://downloads.sourceforge.net/libpng/libpng-${LIBPNG_VERSION}.tar.xz \
| tar xJC ${LIBPNG_BUILD_DIR} --strip-components=1
WORKDIR ${LIBPNG_BUILD_DIR}/
RUN set -Eeuxo pipefail \
&& ./configure \
--prefix=${INSTALL_DIR} \
--disable-static \
&& make V=0 \
&& make install
ENV POPPLER_VERSION=0.89.0
ENV POPPLER_BUILD_DIR=${BUILD_DIR}/poppler
RUN set -Eeuxo pipefail \
&& mkdir -p ${POPPLER_BUILD_DIR}/build \
&& curl -L https://poppler.freedesktop.org/poppler-${POPPLER_VERSION}.tar.xz \
| tar xJC ${POPPLER_BUILD_DIR} --strip-components=1
WORKDIR ${POPPLER_BUILD_DIR}/build/
RUN set -Eeuxo pipefail \
&& LDFLAGS="-L${INSTALL_DIR}/lib64 -L${INSTALL_DIR}/lib" \
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
-DENABLE_UNSTABLE_API_ABI_HEADERS=ON \
-DENABLE_GLIB=ON \
-DENABLE_CPP=OFF \
-DENABLE_QT5=OFF \
-DENABLE_SPLASH=OFF \
-DPNG_INCLUDE_DIR=${INSTALL_DIR}/include \
-DPNG_LIBRARIES=${INSTALL_DIR}/lib64 \
&& make V=0 \
&& make install
```
My complete Dockerfile can be seen [here](https://gist.github.com/asterikx/d9cc75af0b1232a086565f021774f638).https://gitlab.freedesktop.org/poppler/poppler/-/issues/950Suboptimal rendering of images with text on lowdpi screens2021-06-07T22:17:27ZJan RathmannSuboptimal rendering of images with text on lowdpi screensHello,
when I open a PDF file that contains images with text in them (e.g. scanned pages), the rendering is a bit "ugly" on my lowdpi screen (24", 1920x1200) at some commonly used range of zoom levels.
I only see this with Okular and q...Hello,
when I open a PDF file that contains images with text in them (e.g. scanned pages), the rendering is a bit "ugly" on my lowdpi screen (24", 1920x1200) at some commonly used range of zoom levels.
I only see this with Okular and qpdfview, rendering in Evince, Atril, Zathura is fine.
STEPS TO REPRODUCE
1. Open attached file "test.pdf" with Okular or qpdfview.
2. Set zoom level to 75% (or up to ~100%).
OBSERVED RESULT
Text looks "rather ugly".
(See also attached screenshot.)
EXPECTED RESULT
Text looks "clearly readable".
(Compare screenshot from same document opened in Evince.)
To reproduce this in a clean environment, I was booting live images of Kubuntu 20.04 and KDE Neon (neon-unstable-20200726-1102.iso).
The original bug report on the KDE bugtracker is here:
https://bugs.kde.org/show_bug.cgi?id=424817
Kind regards,
Jan
[ Example pdf illustrating the bug (generated with 'img2pdf -o test.pdf test.png')](/uploads/7f094da749274142946538e9c4b9ea1f/test.pdf)
[Source image file from which the test example was generated](/uploads/c53e719eed554a460e1f3e2875581878/test.png)
[Screenshot rendering of test.pdf with Okular (zoom level 75%)](/uploads/4fa09de6762a7c1c0b87a08a34e1ff6e/Bildschirmfoto_20200809_191836.png)
[Screenshot rendering of test.pdf with Evince (zoom level 75%)](/uploads/807c6671c317ad986b13d5d413fef451/Bildschirmfoto_20200809_191907.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/951Will poppler change the license from GPL2.0 to LGPL 2.0?2020-08-17T07:36:48ZZUHONG TAOWill poppler change the license from GPL2.0 to LGPL 2.0?I want to integrate with poppler in my app, found its license is GPL2.0, so submit this issue:
will poppler change the license from GPL2.0 to LGPL 2.0?I want to integrate with poppler in my app, found its license is GPL2.0, so submit this issue:
will poppler change the license from GPL2.0 to LGPL 2.0?https://gitlab.freedesktop.org/poppler/poppler/-/issues/952Poppler cairo backend doesn't render PDF with lots of thin lines properly2020-08-17T23:26:08ZFrancisco RamosPoppler cairo backend doesn't render PDF with lots of thin lines properlyI originally reported it to inkscape but it also happens with evince and it seems to be an issue with some viewers. For example, gsx (ghostscript viewer), okular and google-chrome PDF reader show the PDF correctly, while evince, firefox ...I originally reported it to inkscape but it also happens with evince and it seems to be an issue with some viewers. For example, gsx (ghostscript viewer), okular and google-chrome PDF reader show the PDF correctly, while evince, firefox and some others don't. https://gitlab.com/inkscape/inbox/-/issues/3342
The issue is seen when comparing the original eps file with the transformed pdf... it is the same if it is converted with ps2pdf or plain gs command. The PDF is seen like a bit "pale" because some thin lines are dropped
I reported it to evince upstream and they found that the issue is in poppler cairo backend:
https://gitlab.gnome.org/GNOME/evince/-/issues/1472#note_892217
Thanks a lot for your help[ss.pdf](/uploads/6a1162bd7c323a6531d7af879f94f7ce/ss.pdf)[ss.eps][ss.pdf](/uploads/da294a7495ae62df9ab627231263ab37/ss.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/953Cairo backend loses gradient-filled rectangle when converting PDF to PNG / JPEG2020-08-27T19:41:28ZMatt DoddsCairo backend loses gradient-filled rectangle when converting PDF to PNG / JPEGHello,
We use `pdftocairo` version `0.90.1` to automate conversions from PDF document to PNG or JPEG. One customer document has been flagged up where a gradient-filled rectangle is missing from the converted image.
I've attached the so...Hello,
We use `pdftocairo` version `0.90.1` to automate conversions from PDF document to PNG or JPEG. One customer document has been flagged up where a gradient-filled rectangle is missing from the converted image.
I've attached the source and resulting PNG. Maybe someone can identify what's going wrong.
Many thanks
Matt
![AnonSlide.pdf](/uploads/6d4e028b38898b8d19a70610825e429b/AnonSlide.pdf)
![AnonSlide-1](/uploads/ff25f030acd1db0bebb62cc5637c59bf/AnonSlide-1.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/954Straight line not rendered at rotation=452020-08-28T22:18:12ZThorsten WißmannStraight line not rendered at rotation=45Depending on the zoom level, evince and pdftocairo do not render the PDF correctly ([this PDF](/uploads/8c904bcc107441ce789f9d2de97464e2/linemissingmwe.pdf)) which is generated from the following latex source:
```latex
\documentclass[a4p...Depending on the zoom level, evince and pdftocairo do not render the PDF correctly ([this PDF](/uploads/8c904bcc107441ce789f9d2de97464e2/linemissingmwe.pdf)) which is generated from the following latex source:
```latex
\documentclass[a4paper]{article}
\usepackage{tikz,geometry}
\begin{document}
Depending on the zoom level, the line in the following box is
rendered or not:
\begin{tikzpicture}
\node[draw,rotate=45] {
\begin{tikzpicture}
\draw[-] (0cm,0cm) -- (1cm,0cm);
\end{tikzpicture}
};
\end{tikzpicture}
The issue does not arise with other rotation angles.
\end{document}
```
In order to reproduce, compile the above `linemissingmwe.tex` and render it at different resolutions via pdftocairo:
```bash
pdflatex linemissingmwe.tex
pdftocairo -r 127 -png linemissingmwe.pdf zoom-127 # hides the line
pdftocairo -r 128 -png linemissingmwe.pdf zoom-128 # shows the line
```
![comparison](/uploads/b75e3aab16c0281373a0f42f912265b2/comparison.png)
All resolutions lower than 127 seem to hide the line, and all resultions higher
than 128 render it correctly. I am using the following poppler version on arch linux:
```
$ pdftocairo -v
pdftocairo version 0.90.1
Copyright 2005-2020 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2011 Glyph & Cog, LLC
```
The issue only arises in pdftocairo and evince (version 3.36.7 here), but not in other poppler-based pdf viewers (okular, katarakt are both fine); pdftoppm (0.90.1) also shows the line consistently.
Experimenting with the latex source, I found out that it is really crucial here that the rotation is 45 here.
I don't know how this might be related to other misrendering issues of the cairo backend. Even if this is a duplicate, I hope this issue is helpful because the minimal working example is smaller than the other PDFs I've seen when looking through the existing issues for a possible duplicate.https://gitlab.freedesktop.org/poppler/poppler/-/issues/955Transition to built-in cmake find modules2020-09-05T11:59:10ZKyle AubleTransition to built-in cmake find modulesHi, long-time Poppler user here that's looking to help out some & refresh my c++ skills.
To start, I'm just playing with the various build options and taking notes. One thing I've noticed is the build-system uses some custom find module...Hi, long-time Poppler user here that's looking to help out some & refresh my c++ skills.
To start, I'm just playing with the various build options and taking notes. One thing I've noticed is the build-system uses some custom find modules & commands that CMake now has built-in versions of: [cmake-modules, current release](https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html)
After looking into the details, this is what I had in mind...
| Custom | Built-in | Supported since CMake v.? | Approach | Note |
| ------ | ------ | ------ | ------ | ------ |
| find_package(PkgConfig) | include(FindPkgConfig) | 2.6 or earlier | Consolidate in CMakeLists.txt | Keep optional for basic build? |
| FindFontconfig.cmake | include(FindFontconfig) | 3.14 | Wrap include in CMake version if-else for now | |
| FindIconv.cmake | include(FindIconv) | 3.11 | Wrap include in CMake version if-else for now | Still must set CONST flag separately |
It's just minor refactoring, but I already have one patch that passed a clean configure, build, and unit-test locally. If there's any interest, I can get a full merge-request ready. Just to check too, are contributors normally expected to test locally with multiple platforms or ad-hoc test-cases before trying CI?
Possible tags: [build-system][minor][patch][refactoring]https://gitlab.freedesktop.org/poppler/poppler/-/issues/956CMake build configuration misses python3 dep2020-10-03T23:56:25ZKyle AubleCMake build configuration misses python3 depSo this is definitely a minor issue since the workaround is just to install Python3, and I imagine most people building Poppler already have it. I use a minimal LXC (Arch) container for building though, and I reliably got a surprise erro...So this is definitely a minor issue since the workaround is just to install Python3, and I imagine most people building Poppler already have it. I use a minimal LXC (Arch) container for building though, and I reliably got a surprise error when make would reach generating poppler-enums.h
It's possible other GLib utilities rely on python too, but this failure appears to be triggered by glib-mkenums, which AFAICT is only used for the poppler-enums files. I've attached log excerpts with the relevant parts (GLib support) of a fresh run with cmake and make:
[cmake-no-py.pass.log](/uploads/455334feaa74447f3f74fc0fdbfe2245/cmake-no-py.pass.log)
[make-no-py.fail.log](/uploads/897ec86bf6a0728891483b5d6407c8a4/make-no-py.fail.log)
I'm still a novice on how cmake and pkg-config fit together, and I didn't get very far skimming the GLib code. After thinking it through though, I wonder if there are 2 distinct issues:
- Here at Poppler, for robustness' sake, should we include an explicit check for Python inside FindGLIB.cmake?
- Upstream at GLib, if/however they provide their package configuration, are they not marking the dependency?
- The distros seem to be left to make their own calls on this.
- Debian makes Python a hard dependency for the GLib dev package while Arch makes it optional.
Possible Tags: [build-system][minor], (maybe)[upstream]https://gitlab.freedesktop.org/poppler/poppler/-/issues/957pdftops not returning2020-09-09T09:24:21ZClark Knøsenpdftops not returning[4.pdf](/uploads/9a3514755c284b78728fd86c06267c45/4.pdf)
This file returns some errors but it doesn't return back to PHP after running it
`pdftops $file_pdf $file_ps`
PHP never continue executing after this[4.pdf](/uploads/9a3514755c284b78728fd86c06267c45/4.pdf)
This file returns some errors but it doesn't return back to PHP after running it
`pdftops $file_pdf $file_ps`
PHP never continue executing after thishttps://gitlab.freedesktop.org/poppler/poppler/-/issues/958Suppressed GObject introspection warnings2020-10-03T23:56:25ZKyle AubleSuppressed GObject introspection warningsMinor build-issue, but make reports 3 suppressed warnings for GObject introspection when I build.
The strange thing is the message also says to enable "--warn-all" for g-ir-scanner to show the warnings, but that flag is already being se...Minor build-issue, but make reports 3 suppressed warnings for GObject introspection when I build.
The strange thing is the message also says to enable "--warn-all" for g-ir-scanner to show the warnings, but that flag is already being set for `INTROSPECTION_SCANNER_ARGS` in *glib/CMakeLists.txt*. I've included a log-file excerpt:
[supp-gir-warnings.log](/uploads/19d2b81bface68f60258edc0a1b736fd/supp-gir-warnings.log)
I already found the fix (very simple) and have a patch ready though. After some testing, it turned out each flag needs to be a separate string within a list to make the custom introspection macros happy. I also took the opportunity to comment & sort the introspection section of *glib/CmakeLists.txt*.
I can post the actual warnings here to address also, but I figured a separate ticket later would be better.
Possible tags:[minor][patch][gobject-introspection][build-system]https://gitlab.freedesktop.org/poppler/poppler/-/issues/959Misrendering pdf on both backends2020-12-25T23:43:36ZLome MoreMisrendering pdf on both backendsA reddish tint appears when viewing this pdf on linux using poppler backends.
The bug is present on both cairo and splash beckends (tested by viewing on evince and converting to jpg using pdftoppm)
Attached pdf and correct and wrong re...A reddish tint appears when viewing this pdf on linux using poppler backends.
The bug is present on both cairo and splash beckends (tested by viewing on evince and converting to jpg using pdftoppm)
Attached pdf and correct and wrong resulting views.
[test_image_with_tint.pdf](/uploads/3d23f9dbdb604e14b10fba78ccb5e054/test_image_with_tint.pdf)
<p>
<details>
<summary>Correct</summary>
![correct_from_acrobat_reader](/uploads/1ebcdaef555659bfa6f05e5f53d145f8/correct_from_acrobat_reader.JPG)
</details>
</p>
<p>
<details>
<summary>Wrong</summary>
![wrong_on_linux_on_both_backends](/uploads/15a0a7747bc579b76618efc9e65bc4bc/wrong_on_linux_on_both_backends.JPG)
</details>
</p>https://gitlab.freedesktop.org/poppler/poppler/-/issues/960SVG text is corrupted after pdftocairo2021-06-13T21:53:22ZArtur MogozovSVG text is corrupted after pdftocairoWhen attached [input.pdf](/uploads/ca95f39965a335ded93e934c0d384438/input.pdf) is processed via pdftocairo to svg, text part of output looks misplaced in editing apps like adobe illustrator or figma, screenshot: ![image__1_](/uploads/858...When attached [input.pdf](/uploads/ca95f39965a335ded93e934c0d384438/input.pdf) is processed via pdftocairo to svg, text part of output looks misplaced in editing apps like adobe illustrator or figma, screenshot: ![image__1_](/uploads/8588d4bcf4611c9256d37ec122846d73/image__1_.png)
but looks fine in Firefox and Chrome.
Both pdftocairo 20.09 (mac) and 0.62 (ubuntu 18.04) are having this issue.
Is this a problem with original pdf or pdftocairo?https://gitlab.freedesktop.org/poppler/poppler/-/issues/961make error: Undefined reference to `lzham_z_deflateEnd'2020-09-28T22:10:12ZHaris Ikrammake error: Undefined reference to `lzham_z_deflateEnd'I dont know why but i am facing this error:
haris@haris-OptiPlex-7020:~/poppler-0.84.0/build$ sudo cmake ..
CMake Warning at CMakeLists.txt:77 (message):
No test data found in $testdatadir.
You will not be able to run 'make tes...I dont know why but i am facing this error:
haris@haris-OptiPlex-7020:~/poppler-0.84.0/build$ sudo cmake ..
CMake Warning at CMakeLists.txt:77 (message):
No test data found in $testdatadir.
You will not be able to run 'make test' successfully.
The test data is not included in the source packages
and is also not part of the main git repository. Instead,
you can checkout the test data from its own git
repository with:
git clone git://git.freedesktop.org/git/poppler/test
You should checkout the test data as a sibling of your
poppler source folder or specify the location of your
checkout with -DTESTDATADIR=/path/to/checkoutdir/test.
-- The imported target "openjp2_static" references the file
"/usr/lib/x86_64-linux-gnu/libopenjp2.a"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/x86_64-linux-gnu/openjpeg-2.3/OpenJPEGTargets.cmake"
but not all the files it references.
-- The imported target "openjpip" references the file
"/usr/lib/x86_64-linux-gnu/libopenjpip.so.2.3.0"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/x86_64-linux-gnu/openjpeg-2.3/OpenJPEGTargets.cmake"
but not all the files it references.
-- The imported target "openjpip_server" references the file
"/usr/lib/x86_64-linux-gnu/libopenjpip_server.a"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/x86_64-linux-gnu/openjpeg-2.3/OpenJPEGTargets.cmake"
but not all the files it references.
-- The imported target "opj_decompress" references the file
"/usr/bin/opj_decompress"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/x86_64-linux-gnu/openjpeg-2.3/OpenJPEGTargets.cmake"
but not all the files it references.
-- The imported target "opj_compress" references the file
"/usr/bin/opj_compress"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/x86_64-linux-gnu/openjpeg-2.3/OpenJPEGTargets.cmake"
but not all the files it references.
-- The imported target "opj_dump" references the file
"/usr/bin/opj_dump"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/x86_64-linux-gnu/openjpeg-2.3/OpenJPEGTargets.cmake"
but not all the files it references.
-- The imported target "opj_jpip_addxml" references the file
"/usr/bin/opj_jpip_addxml"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/x86_64-linux-gnu/openjpeg-2.3/OpenJPEGTargets.cmake"
but not all the files it references.
-- The imported target "opj_server" references the file
"/usr/bin/opj_server"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/x86_64-linux-gnu/openjpeg-2.3/OpenJPEGTargets.cmake"
but not all the files it references.
-- The imported target "opj_dec_server" references the file
"/usr/bin/opj_dec_server"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/x86_64-linux-gnu/openjpeg-2.3/OpenJPEGTargets.cmake"
but not all the files it references.
-- The imported target "opj_jpip_transcode" references the file
"/usr/bin/opj_jpip_transcode"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/x86_64-linux-gnu/openjpeg-2.3/OpenJPEGTargets.cmake"
but not all the files it references.
-- The imported target "opj_jpip_test" references the file
"/usr/bin/opj_jpip_test"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
"/usr/lib/x86_64-linux-gnu/openjpeg-2.3/OpenJPEGTargets.cmake"
but not all the files it references.
-- Found lcms version 2.09, /usr/lib/x86_64-linux-gnu/liblcms2.so
-- Could NOT find Boost
Building Poppler with support for:
font configuration: fontconfig
splash output: yes
cairo output: yes
qt5 wrapper: yes
glib wrapper: yes
introspection: yes
gtk-doc: no
cpp wrapper: yes
use libjpeg: yes
use libpng: yes
use libtiff: yes
use zlib compress: yes
use zlib uncompress: no
use nss3: yes
use curl: yes
use libopenjpeg2: yes
use lcms2: yes
use boost: no
command line utils: yes
fuzz target: no
test data dir: /home/haris/poppler-0.84.0/../test
Warning: Use of boost is recommended for better performance.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/haris/poppler-0.84.0/build
haris@haris-OptiPlex-7020:~/poppler-0.84.0/build$ make
Scanning dependencies of target poppler
[ 27%] Building CXX object CMakeFiles/poppler.dir/goo/gfile.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/goo/GooTimer.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/goo/GooString.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/goo/glibc.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/goo/glibc_strtok_r.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/fofi/FoFiBase.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/fofi/FoFiEncodings.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/fofi/FoFiTrueType.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/fofi/FoFiType1.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/fofi/FoFiType1C.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Annot.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Array.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/BuiltinFont.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/BuiltinFontTables.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/CachedFile.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Catalog.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/CharCodeToUnicode.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/CMap.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/DateInfo.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Decrypt.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Dict.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Error.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/FileSpec.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/FontEncodingTables.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Form.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/FontInfo.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Function.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Gfx.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/GfxFont.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/GfxState.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/GlobalParams.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Hints.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/JArithmeticDecoder.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/JBIG2Stream.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Lexer.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Link.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/LocalPDFDocBuilder.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/NameToCharCode.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Object.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/OptionalContent.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Outline.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/OutputDev.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Page.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Parser.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/PDFDoc.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/PDFDocFactory.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/ProfileData.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/PreScanOutputDev.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/PSTokenizer.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/SignatureInfo.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/Stream.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/UnicodeMap.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/XRef.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/PSOutputDev.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/TextOutputDev.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/PageLabelInfo.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/SecurityHandler.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/StdinCachedFile.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/StdinPDFDocBuilder.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/ViewerPreferences.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/SplashOutputDev.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/Splash.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashBitmap.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashClip.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashFTFont.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashFTFontEngine.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashFTFontFile.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashFont.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashFontEngine.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashFontFile.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashFontFileID.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashPath.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashPattern.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashScreen.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashState.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashXPath.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/splash/SplashXPathScanner.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/FlateEncoder.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/CurlCachedFile.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/CurlPDFDocBuilder.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/SignatureHandler.cc.o
[ 27%] Building CXX object CMakeFiles/poppler.dir/poppler/JPEG2000Stream.cc.o
[ 27%] Linking CXX shared library libpoppler.so
[ 27%] Built target poppler
Scanning dependencies of target pdfimages
[ 27%] Building CXX object utils/CMakeFiles/pdfimages.dir/pdfimages.cc.o
[ 27%] Building CXX object utils/CMakeFiles/pdfimages.dir/ImageOutputDev.cc.o
[ 27%] Building CXX object utils/CMakeFiles/pdfimages.dir/JSInfo.cc.o
[ 27%] Linking CXX executable pdfimages
../libpoppler.so.94.0.0: undefined reference to `lzham_z_deflateEnd'
../libpoppler.so.94.0.0: undefined reference to `lzham_z_deflate'
../libpoppler.so.94.0.0: undefined reference to `lzham_z_deflateInit'
collect2: error: ld returned 1 exit status
utils/CMakeFiles/pdfimages.dir/build.make:199: recipe for target 'utils/pdfimages' failed
make[2]: *** [utils/pdfimages] Error 1
CMakeFiles/Makefile2:178: recipe for target 'utils/CMakeFiles/pdfimages.dir/all' failed
make[1]: *** [utils/CMakeFiles/pdfimages.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2https://gitlab.freedesktop.org/poppler/poppler/-/issues/962Undefined Behavior in Decrypt.cc revision6Hash()2020-09-24T23:50:07ZGhost UserUndefined Behavior in Decrypt.cc revision6Hash()During fuzzing by X41 D-Sec, UndefinedBehaviorSanitizer warns about the following [code position](https://gitlab.freedesktop.org/poppler/poppler/-/blob/636d12b0f403d462af3652e4ebfd62d9fc7c58a8/poppler/Decrypt.cc#L1778) in `revision6Hash(...During fuzzing by X41 D-Sec, UndefinedBehaviorSanitizer warns about the following [code position](https://gitlab.freedesktop.org/poppler/poppler/-/blob/636d12b0f403d462af3652e4ebfd62d9fc7c58a8/poppler/Decrypt.cc#L1778) in `revision6Hash()`:
```
poppler/poppler/poppler/Decrypt.cc:1778:52: runtime error: null pointer passed as argument 2, which is declared to never be null
/usr/include/string.h:44:28: note: nonnull attribute specified here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /poppler/poppler/poppler/Decrypt.cc:1778:52 in
```
It appears that this case has [been anticipated](https://gitlab.freedesktop.org/poppler/poppler/-/blob/636d12b0f403d462af3652e4ebfd62d9fc7c58a8/poppler/Decrypt.cc#L1764-1767) in the code. However, the current solution relies on undefined behavior and can therefore cause unspecified issues depending on the compiler.
One solution would be to skip this `memcpy()` if `!userKey`.https://gitlab.freedesktop.org/poppler/poppler/-/issues/963Undefined Behavior in GfxFont.cc parseCharName()2020-09-24T23:50:10ZGhost UserUndefined Behavior in GfxFont.cc parseCharName()During fuzzing by X41 D-Sec, UndefinedBehaviorSanitizer warns about the following [code position](https://gitlab.freedesktop.org/poppler/poppler/-/blob/636d12b0f403d462af3652e4ebfd62d9fc7c58a8/poppler/GfxFont.cc#L1458) in `parseCharName(...During fuzzing by X41 D-Sec, UndefinedBehaviorSanitizer warns about the following [code position](https://gitlab.freedesktop.org/poppler/poppler/-/blob/636d12b0f403d462af3652e4ebfd62d9fc7c58a8/poppler/GfxFont.cc#L1458) in `parseCharName()`:
```
poppler/poppler/poppler/GfxFont.cc:1458:32: runtime error: applying non-zero offset 1 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /poppler/poppler/poppler/GfxFont.cc:1458:32 in
```
In edge cases, this undefined behavior appears to be reachable and can therefore cause unspecified issues depending on the compiler.
The exact function call parameters were not recorded.https://gitlab.freedesktop.org/poppler/poppler/-/issues/964pdftotext fails with signed PDF's2020-09-29T21:40:27ZLukas Burkhardpdftotext fails with signed PDF'sDear developers
Thank you first for your effort and work for the open source community.
Since recently, we have problems extracting the pages with `pdftotext` from signed PDF's (signing is with AIS.py package from Swisscom together with...Dear developers
Thank you first for your effort and work for the open source community.
Since recently, we have problems extracting the pages with `pdftotext` from signed PDF's (signing is with AIS.py package from Swisscom together with their signing service) in our web application framework.
- [sample.pdf](/uploads/c235215404e0efdffd08111342c6ccc5/sample.pdf)-
- [sample_signed.pdf](/uploads/4079076633c12bdf9ce34b681374eaa6/sample.pdf)
Running `pdftotext sample_signed.pdt sample.txt` renders:
`Syntax Error (48502): Command token too long
Syntax Error (48640): Command token too long
Internal Error: xref num 10 not found but needed, try to reconstruct<0a>
Syntax Error (48502): Command token too long
Syntax Error (48640): Command token too long
Syntax Error: Couldn't find trailer dictionary
Syntax Error: Catalog object is wrong type (null)
Syntax Error: Couldn't find trailer dictionary
Syntax Error: Invalid XRef entry 10
Internal Error: xref num 10 not found but needed, try to reconstruct<0a>
Syntax Error: Invalid XRef entry 10
Syntax Error: Couldn't find trailer dictionary
Syntax Error: Catalog object is wrong type (null)
Syntax Error: Couldn't read page catalog
`
Version: pdftotext version 0.86.1
Any hints would be useful, we might have to complain to the signing service.https://gitlab.freedesktop.org/poppler/poppler/-/issues/965PDF Display completely messed up with various software (inkscape, firefox, gn...2020-10-02T22:25:28Z8FordPrefect8PDF Display completely messed up with various software (inkscape, firefox, gnome document viewer, libre office)I have a problem with various documents from my thesis from some years ago. They were created 2017 with inkscape under windows and currently the only software displaying them proper so far I tested was chromium. The degree of missing ite...I have a problem with various documents from my thesis from some years ago. They were created 2017 with inkscape under windows and currently the only software displaying them proper so far I tested was chromium. The degree of missing items and kind of problems vary with different software.
I think that might trace back to transparency. But I am not sure. I can provide a sample file, but I don't know whether I can upload it here to public access. I really don't want to accidentally create a copy right issue.https://gitlab.freedesktop.org/poppler/poppler/-/issues/966Segmentation Fault via poppler::embedded_file::size()2020-10-07T08:47:07ZGhost UserSegmentation Fault via poppler::embedded_file::size()Hello, I'm from [X41 D-Sec](https://www.x41-dsec.de/).
During fuzzing of poppler, we have discovered a segmentation fault issue in the embedded files handling.
The segfault can be triggered with the `poppler-dump` test utility compiled...Hello, I'm from [X41 D-Sec](https://www.x41-dsec.de/).
During fuzzing of poppler, we have discovered a segmentation fault issue in the embedded files handling.
The segfault can be triggered with the `poppler-dump` test utility compiled from the current Git HEAD:
```
./cpp/tests/poppler-dump --show-embedded-files segfault_1.pdf
poppler/error: May not be a PDF file (continuing anyway)
poppler/error: End of file inside dictionary
[...]
poppler/error: Invalid page tree
poppler/error: Invalid FileSpec
UndefinedBehaviorSanitizer:DEADLYSIGNAL
==32514==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000044c8b4 bp 0x7ffc55f4ecb0 sp 0x7ffc55f4ecb0 T32514)
==32514==The signal is caused by a READ memory access.
==32514==Hint: address points to the zero page.
#0 0x44c8b4 in EmbFile::size() const /poppler/poppler/FileSpec.h:30:31
#1 0x44c8b4 in poppler::embedded_file::size() const /poppler/cpp/poppler-embedded-file.cpp:99:45
#2 0x431933 in print_embedded_files(poppler::document*) /poppler/cpp/tests/poppler-dump.cpp:283:111
#3 0x431933 in main /poppler/cpp/tests/poppler-dump.cpp:496:9
#4 0x7f33f71f6cc9 in __libc_start_main csu/../csu/libc-start.c:308:16
#5 0x40a409 in _start (/poppler/build/cpp/tests/poppler-dump+0x40a409)
UndefinedBehaviorSanitizer can not provide additional info.
SUMMARY: UndefinedBehaviorSanitizer: SEGV /poppler/poppler/FileSpec.h:30:31 in EmbFile::size() const
==32514==ABORTING
```
Minimized reproducer file: [segfault_1.pdf](/uploads/cf946012a96b987018906bc18ab6baf8/segfault_1.pdf)
Other programs which make use of the embedded files functionality in poppler might also be affected.https://gitlab.freedesktop.org/poppler/poppler/-/issues/967Abort via poppler::embedded_file::size()2020-10-08T10:13:55ZGhost UserAbort via poppler::embedded_file::size()Hello, I'm from [X41 D-Sec](https://www.x41-dsec.de/).
During fuzzing of poppler, we have discovered an `abort()` issue in the embedded files handling.
The issue can be triggered with the `poppler-dump` test utility compiled from the c...Hello, I'm from [X41 D-Sec](https://www.x41-dsec.de/).
During fuzzing of poppler, we have discovered an `abort()` issue in the embedded files handling.
The issue can be triggered with the `poppler-dump` test utility compiled from the current Git HEAD:
```
poppler/build/cpp/tests/poppler-dump --show-embedded-files abort_1.pdf
poppler/error: May not be a PDF file (continuing anyway)
poppler/error (51): Dictionary key must be a name object
[...]
poppler/error: Unterminated string
poppler/error: Invalid FileSpec
12 0 obj<</Names<</EmbeddedFiles 16 0 R poppler/error (0): Call to Object where the object was type 3, not the expected type 7
Aborted
```
This issue is a followup of #966.
Minimized reproducer file: [abort_1.pdf](/uploads/ee455ef2db713fcf89d490c6c3ad2b0d/abort_1.pdf)
Note: the code deliberately calls `abort()` to prevent other issues, so this behavior might be somewhat intentional.https://gitlab.freedesktop.org/poppler/poppler/-/issues/968make fails on debian with fuzzers enabled2020-10-09T19:37:04ZCeyhun Alpmake fails on debian with fuzzers enabledI'm trying to build poppler with fuzz testing enabled. I follow the instructions in INSTALL so I installed the extra cmake modules and I'm running the following commands:
```
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=clang++ -D...I'm trying to build poppler with fuzz testing enabled. I follow the instructions in INSTALL so I installed the extra cmake modules and I'm running the following commands:
```
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER=clang++ -DENABLE_FUZZER=ON -DECM_ENABLE_SANITIZERS='fuzzer;address' -DCMAKE_C_FLAGS='-fPIE'
make
```
However, `make` fails with the following error:
```
/usr/bin/ld: CMakeFiles/pdftoppm.dir/pdftoppm.cc.o: in function `main':
/usr/local/google/home/ceyhunalp/workspace/poppler/utils/pdftoppm.cc:369: multiple definition of `main'; /usr/lib/llvm-9/lib/clang/9.0.1/lib/linux/libclang_rt.fuzzer-x86_64.a(fuzzer.o):(.text.main+0x0): first defined here
/usr/bin/ld: /usr/lib/llvm-9/lib/clang/9.0.1/lib/linux/libclang_rt.fuzzer-x86_64.a(fuzzer.o): in function `main':
(.text.main+0x12): undefined reference to `LLVMFuzzerTestOneInput'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [utils/CMakeFiles/pdftoppm.dir/build.make:115: utils/pdftoppm] Error 1
make[1]: *** [CMakeFiles/Makefile2:315: utils/CMakeFiles/pdftoppm.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
```
I was able to work around this issue by running `make pdf_fuzzer` instead but it would be good to understand why poppler fails. Any ideas?https://gitlab.freedesktop.org/poppler/poppler/-/issues/969Easy replacement of deprecated QLinkedList to eliminate compiler warnings2023-05-10T11:04:48ZMark MitchellEasy replacement of deprecated QLinkedList to eliminate compiler warningsQLinkedList is deprecated. This triggers many compiler warnings with gcc 8.4.0. The fix is easy - replace QLinkedList by std::list. Details are:
- include <QtCore/QLinkedList> -> include <list>
- .first() -> .front()
- .last() -> .back(...QLinkedList is deprecated. This triggers many compiler warnings with gcc 8.4.0. The fix is easy - replace QLinkedList by std::list. Details are:
- include <QtCore/QLinkedList> -> include <list>
- .first() -> .front()
- .last() -> .back()
- .append() -> .push_back()
- QLinkedList -> std::list
Attached files have these suggested changes
[poppler-annotation.h](/uploads/ac83e0467117168a7981cc8cd50b7953/poppler-annotation.h)[poppler-annotation-private.h](/uploads/46b140a47bab996c5b6938fb4266c17c/poppler-annotation-private.h)[poppler-annotation.cc](/uploads/e46152c4e16d7393f50ff9d7b3a8cd27/poppler-annotation.cc)https://gitlab.freedesktop.org/poppler/poppler/-/issues/970Bad font rendering without anti-aliasing2020-10-21T15:56:23ZLennart AckermansBad font rendering without anti-aliasingIt seems we are in a minority, but many people can't stand anti-aliased fonts. Unfortunately, non-antialiased font rendering is extremely ugly in poppler-based pdf viewers, on both viewers using the Cairo and Splash backend. I'm not sure...It seems we are in a minority, but many people can't stand anti-aliased fonts. Unfortunately, non-antialiased font rendering is extremely ugly in poppler-based pdf viewers, on both viewers using the Cairo and Splash backend. I'm not sure if the issue is with poppler but hopefully someone can point this out.
Adobe reader does a much better job. The following examples are screenshots from acroread and qpdfview with Splash backend.
![sample1](/uploads/a8a30505d5a452f22ce7f8c3ae04141b/sample1.png)
System font rendering on Mate (using Cairo?) makes beautiful sharp text, so why can't poppler make them? The following larger examples are from acroread, Pluma on Mate, pdftocairo and qpdfview with Splash backend.
![sample2](/uploads/4bccb9a1832f2a64f2ca6768592243a7/sample2.png)
See the source pdf:
[test.pdf](/uploads/38ba5b052a421f33ea61256f003751c7/test.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/971Requested CMAKE_C*_FLAGS are not used2020-11-11T08:15:25ZMartin ŘehákRequested CMAKE_C*_FLAGS are not used-DCMAKE_CXX_FLAGS="-m32" doesn't work for poppler-20.10.0 on Solaris but I believe it is platform independent. 0.87.0 worked well. This is how configure fails:
```
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identi...-DCMAKE_CXX_FLAGS="-m32" doesn't work for poppler-20.10.0 on Solaris but I believe it is platform independent. 0.87.0 worked well. This is how configure fails:
```
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/gcc/9/bin/gcc
-- Check for working C compiler: /usr/gcc/9/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/gcc/9/bin/g++
-- Check for working CXX compiler: /usr/gcc/9/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test GCC_HAS_AS_NEEDED
-- Performing Test GCC_HAS_AS_NEEDED - Failed
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29")
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Could NOT find Threads (missing: Threads_FOUND)
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - not found
-- Looking for stdint.h
-- Looking for stdint.h - not found
-- Looking for stddef.h
-- Looking for stddef.h - not found
-- Check size of unsigned short
-- Check size of unsigned short - failed
-- Check size of unsigned int
-- Check size of unsigned int - failed
-- Check size of unsigned long
-- Check size of unsigned long - failed
CMake Error at /usr/share/cmake-3.15/Modules/TestBigEndian.cmake:50 (message):
no suitable type found
Call Stack (most recent call first):
CMakeLists.txt:21 (test_big_endian)
```
And this is the particular error:
```
Performing C++ SOURCE FILE Test GCC_HAS_AS_NEEDED failed with the following output:
Change Dir: /builds/mrehak/workspace/poppler/components/desktop/poppler/build/i86/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/gnu/bin/make cmTC_fab48/fast && /usr/gnu/bin/make -f CMakeFiles/cmTC_fab48.dir/build.make CMakeFiles/cmTC_fab48.dir/build
make[1]: Entering directory '/builds/mrehak/workspace/poppler/components/desktop/poppler/build/i86/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_fab48.dir/src.cxx.o
/usr/gcc/9/bin/g++ -fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE -DGCC_HAS_AS_NEEDED -o CMakeFiles/cmTC_fab48.dir/src.cxx.o -c /builds/mrehak/workspace/poppler/components/desktop/poppler/build/i86/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_fab48
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_fab48.dir/link.txt --verbose=1
/usr/gcc/9/bin/g++ -fno-exceptions -fno-check-new -fno-common -D_DEFAULT_SOURCE -DGCC_HAS_AS_NEEDED -m32 CMakeFiles/cmTC_fab48.dir/src.cxx.o -o cmTC_fab48 -Wl,--as-needed
ld: fatal: file CMakeFiles/cmTC_fab48.dir/src.cxx.o: wrong ELF class: ELFCLASS64
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_fab48.dir/build.make:87: cmTC_fab48] Error 1
make[1]: Leaving directory '/builds/mrehak/workspace/poppler/components/desktop/poppler/build/i86/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_fab48/fast] Error 2
```[00-poppler-macros.patch](/uploads/0e7ba077ae32c87d22c898134bd9b60e/00-poppler-macros.patch)
I have resolved it by attached patch. Please consider it for integration.
Thank you.https://gitlab.freedesktop.org/poppler/poppler/-/issues/972poppler renders Times fonts with sans fonts, not following subsitution rules2020-11-15T11:02:38Zlilydjwgpoppler renders Times fonts with sans fonts, not following subsitution rules[There is a PDF](http://zalamsyah.staff.unja.ac.id/wp-content/uploads/sites/286/2019/11/1-Advanced-Microeconomic-Theory-3rd-Ed.-JEHLE-RENY.pdf) uses Times fonts but poppler (evince, okular, gimp, pdftoppm, zathura-pdf-poppler, etc) rende...[There is a PDF](http://zalamsyah.staff.unja.ac.id/wp-content/uploads/sites/286/2019/11/1-Advanced-Microeconomic-Theory-3rd-Ed.-JEHLE-RENY.pdf) uses Times fonts but poppler (evince, okular, gimp, pdftoppm, zathura-pdf-poppler, etc) renders them with sans fonts. Others (Firefox, Google Chrome, inkscape without using poppler, zathura-pdf-mupdf) correctly render them with serif fonts.
Evince reports those Times fonts are substituted by some serif fonts on my system, though. `pdffonts -subst` shows a lot of strange font names:
```
name object ID substitute font substitute font file
------------------------------------ --------- ------------------------------------ ------------------------------------
Times-Bold 1800 0 NimbusRoman-Bold /usr/share/fonts/gsfonts/NimbusRoman-Bold.otf
Times-Roman 1801 0 NimbusRoman-Regular /usr/share/fonts/gsfonts/NimbusRoman-Regular.otf
Times-Italic 1795 0 NimbusRoman-Italic /usr/share/fonts/gsfonts/NimbusRoman-Italic.otf
DDPJAD+Times-Roman 1816 0 DejaVu Sans /usr/share/fonts/TTF/DejaVuSans.ttf
DDPLFO+Times-Italic 1825 0 DejaVu Sans Oblique /usr/share/fonts/TTF/DejaVuSans-Oblique.ttf
DDPLFN+Times-Bold 1814 0 DejaVu Sans Bold /usr/share/fonts/TTF/DejaVuSans-Bold.ttf
DDPJAD+Times-Roman 1881 0 DejaVu Sans /usr/share/fonts/TTF/DejaVuSans.ttf
DDPLFO+Times-Italic 1876 0 DejaVu Sans Oblique /usr/share/fonts/TTF/DejaVuSans-Oblique.ttf
DDPLFN+Times-Bold 1878 0 DejaVu Sans Bold /usr/share/fonts/TTF/DejaVuSans-Bold.ttf
DDPJAD+Times-Roman 1912 0 DejaVu Sans /usr/share/fonts/TTF/DejaVuSans.ttf
DDPLFO+Times-Italic 1916 0 DejaVu Sans Oblique /usr/share/fonts/TTF/DejaVuSans-Oblique.ttf
DDPLFN+Times-Bold 1917 0 DejaVu Sans Bold /usr/share/fonts/TTF/DejaVuSans-Bold.ttf
DDPJAD+Times-Roman 1956 0 DejaVu Sans /usr/share/fonts/TTF/DejaVuSans.ttf
DDPLFO+Times-Italic 1963 0 DejaVu Sans Oblique /usr/share/fonts/TTF/DejaVuSans-Oblique.ttf
DDPLFN+Times-Bold 1964 0 DejaVu Sans Bold /usr/share/fonts/TTF/DejaVuSans-Bold.ttf
...
```
(Evince doesn't show that there are those `DD....+` prefixed fonts.)
I'm using poppler 20.10.0 on Arch Linux.https://gitlab.freedesktop.org/poppler/poppler/-/issues/973PDF not rendering completely (JS?)2020-10-26T16:36:50ZJordan ChristiansenPDF not rendering completely (JS?)I have a document that renders as an error message instead of the full document. I'm not sure what the problem is, so I'm not sure if this issue has been reported before.
pdfinfo says:
```
Title: DHS-4258-ENG (Minnesota Adopti...I have a document that renders as an error message instead of the full document. I'm not sure what the problem is, so I'm not sure if this issue has been reported before.
pdfinfo says:
```
Title: DHS-4258-ENG (Minnesota Adoption and Child Foster Care Application)
Subject: Commissioners Format for Foster Care/Adoption- Application form for child placement.
Author: State of Minnesota
Creator: Designer 6.3
Producer: Designer 6.3
CreationDate: Mon Feb 11 09:47:25 2019 CST
ModDate: Mon Feb 11 09:47:25 2019 CST
Tagged: yes
UserProperties: no
Suspects: no
Form: XFA
JavaScript: yes
Pages: 1
Encrypted: no
Page size: 612 x 792 pts (letter)
Page rot: 0
File size: 333708 bytes
Optimized: no
PDF version: 1.7
```
The document can be downloaded at https://edocs.dhs.state.mn.us/lfserver/Public/DHS-4258A-ENG-dform. I also attached it to this issue: [4258A.pdf](/uploads/1f73ec541a85bad76d98a55e861e8a4c/4258A.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/974Implement support for /PrintState of a layer2020-10-28T11:16:29ZTomasz KaźmierczakImplement support for /PrintState of a layerA layer in PDF (or rather, more generally, an Optional Content Group, OCG) can have a flag saying that it is not intended for printing, for instance:
```
34 0 obj
<<
/Type /OCG
/Name <FEFF006B006F006C006F0072002000740142006100200028006E...A layer in PDF (or rather, more generally, an Optional Content Group, OCG) can have a flag saying that it is not intended for printing, for instance:
```
34 0 obj
<<
/Type /OCG
/Name <FEFF006B006F006C006F0072002000740142006100200028006E00690065006400720075006B006F00770061006E00790029>
/Usage <</Print <</PrintState /OFF>> /View <</ViewState /ON>>>>
>>
```
You can see the **/PrintState /OFF** entry in the /Print dictionary.
When I print a file containing the above defined layer (app: Okular, libpoppler: 0.86.1), the setting seems to be ignored and the layer gets printed.
Please implement support for print disabling for OCGs.https://gitlab.freedesktop.org/poppler/poppler/-/issues/975Partially transparent images lead to artifacts2024-03-25T11:54:24ZRalf JungPartially transparent images lead to artifactsTo reproduce this problem, take some PDF file and then use Xournal to add a PNG file with alpha channel. That can result in a file like this: [dummy-a.pdf](/uploads/cbb0175a7daa70987802e4eeee217afd/dummy-a.pdf).
When opening this file i...To reproduce this problem, take some PDF file and then use Xournal to add a PNG file with alpha channel. That can result in a file like this: [dummy-a.pdf](/uploads/cbb0175a7daa70987802e4eeee217afd/dummy-a.pdf).
When opening this file in a poppler-based viewer such as Okular or Evince, it shows a border around the opaque part of the embedded image:
![poppler](/uploads/ad46e8bd685a390c66842726134bc448/poppler.png)
I first thought this was a [Xournal bug](https://sourceforge.net/p/xournal/bugs/215/), but the developer says they are not adding any kind of border, and indeed Firefox shows no such artifact when opening the same PDF file:
![firefox](/uploads/0161a562461980a67c5e96c1a8b3941e/firefox.png)
I am no PDF expert, but the Xournal developer says this might indicate a sub-pixel misalignment of the "soft mask" associated with the embedded image, and maybe there's something poppler can do to render these files better, the way Firefox does.
Okular says "Using Poppler 20.09.0".https://gitlab.freedesktop.org/poppler/poppler/-/issues/976Wrong rendering of PDF with 1 bpc image Flate compressed with predictor2020-11-20T08:24:53ZTilman HausherrWrong rendering of PDF with 1 bpc image Flate compressed with predictor[PDFJS-6071-predictor.pdf](/uploads/a3a88af2d2ae1fa7a7bbc096049284c9/PDFJS-6071-predictor.pdf)
I am using version 0.88.0 of cygwin. The rendering (pdftppm) is similar as in this PDF.js issue:
https://github.com/mozilla/pdf.js/issues/6071[PDFJS-6071-predictor.pdf](/uploads/a3a88af2d2ae1fa7a7bbc096049284c9/PDFJS-6071-predictor.pdf)
I am using version 0.88.0 of cygwin. The rendering (pdftppm) is similar as in this PDF.js issue:
https://github.com/mozilla/pdf.js/issues/6071https://gitlab.freedesktop.org/poppler/poppler/-/issues/977Wrong rendering of PDF with 16 bpc image Flate compressed with predictor2020-10-31T03:43:42ZTilman HausherrWrong rendering of PDF with 16 bpc image Flate compressed with predictor[GWG181_16Bit_CMYK_X4.pdf](/uploads/05dcea9eba213eb0ccf443af64b3fcc1/GWG181_16Bit_CMYK_X4.pdf)
Expected rendering:
![GWG181_16Bit_CMYK_X4-1](/uploads/44f47e324a87212b34394815e0a6e9bf/GWG181_16Bit_CMYK_X4-1.png)
Actual rendering (pdfto...[GWG181_16Bit_CMYK_X4.pdf](/uploads/05dcea9eba213eb0ccf443af64b3fcc1/GWG181_16Bit_CMYK_X4.pdf)
Expected rendering:
![GWG181_16Bit_CMYK_X4-1](/uploads/44f47e324a87212b34394815e0a6e9bf/GWG181_16Bit_CMYK_X4-1.png)
Actual rendering (pdftoppm):
![GWG181_16Bit_CMYK_X4-1](/uploads/897a8add7f70c3c306a2702073907120/GWG181_16Bit_CMYK_X4-1.png)
I am using version 0.88.0 of cygwin.https://gitlab.freedesktop.org/poppler/poppler/-/issues/978Very slow rendering of file with pattern reuse2020-10-31T03:42:24ZTilman HausherrVery slow rendering of file with pattern reuse[gs-bugzilla692158-schleuse-veryslow.pdf](/uploads/f538f137fff13ac7df8775587d78c292/gs-bugzilla692158-schleuse-veryslow.pdf)
file is from ghostscript: https://bugs.ghostscript.com/show_bug.cgi?id=692158
I am using version 0.88.0 of cyg...[gs-bugzilla692158-schleuse-veryslow.pdf](/uploads/f538f137fff13ac7df8775587d78c292/gs-bugzilla692158-schleuse-veryslow.pdf)
file is from ghostscript: https://bugs.ghostscript.com/show_bug.cgi?id=692158
I am using version 0.88.0 of cygwin.
The rendering has been running for at least an hour.
There are 20 patterns, but these are reused a lot.https://gitlab.freedesktop.org/poppler/poppler/-/issues/979stack-buffer-overflow in `PostScriptFunction::transform`2020-11-02T21:43:53Zbin24151stack-buffer-overflow in `PostScriptFunction::transform`Hello, we found a stack-buffer-overflow bug when we fuzzing pdftohtml-20.10.0.
Here is the asan log:
```
==2302==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffeaf800bf0 at pc 0x7f02dd84f9e6 bp 0x7ffeaf8003d0 sp 0x7ffeaf...Hello, we found a stack-buffer-overflow bug when we fuzzing pdftohtml-20.10.0.
Here is the asan log:
```
==2302==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffeaf800bf0 at pc 0x7f02dd84f9e6 bp 0x7ffeaf8003d0 sp 0x7ffeaf8003c8
READ of size 8 at 0x7ffeaf800bf0 thread T0
#0 0x7f02dd84f9e5 in PostScriptFunction::transform(double const*, double*) const /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/Function.cc:1184:13
#1 0x7f02dd9dd6dc in GfxFunctionShading::getColor(double, double, GfxColor*) const /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/GfxState.cc:3609:19
#2 0x7f02dd8d4ef5 in Gfx::doFunctionShFill(GfxFunctionShading*) /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/Gfx.cc:2424:14
#3 0x7f02dd8d15e3 in Gfx::doShadingPatternFill(GfxShadingPattern*, bool, bool, bool) /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/Gfx.cc:2312:9
#4 0x7f02dd87b821 in Gfx::opFill(Object*, int) /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/Gfx.cc:1761:17
#5 0x7f02dd8bdcde in Gfx::go(bool) /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/Gfx.cc:679:13
#6 0x7f02dd8bc904 in Gfx::display(Object*, bool) /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/Gfx.cc:640:5
#7 0x7f02dd8c8787 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/Gfx.cc:4766:5
#8 0x7f02dd8ce174 in Gfx::doTilingPatternFill(GfxTilingPattern*, bool, bool, bool) /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/Gfx.cc:2190:25
#9 0x7f02dd87b821 in Gfx::opFill(Object*, int) /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/Gfx.cc:1761:17
#10 0x7f02dd8bdcde in Gfx::go(bool) /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/Gfx.cc:679:13
#11 0x7f02dd8bc904 in Gfx::display(Object*, bool) /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/Gfx.cc:640:5
#12 0x7f02ddb53a17 in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/Page.cc:574:14
#13 0x7f02ddb535ef in Page::display(OutputDev*, double, double, int, bool, bool, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/Page.cc:519:5
#14 0x7f02ddb72de6 in PDFDoc::displayPage(OutputDev*, int, double, double, int, bool, bool, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/PDFDoc.cc:638:24
#15 0x7f02ddb72de6 in PDFDoc::displayPages(OutputDev*, int, int, double, double, int, bool, bool, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*) /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/PDFDoc.cc:647:9
#16 0x4d9819 in main /home/ubuntu/fuzzing_mnt/poppler-20.10.0/utils/pdftohtml.cc:398:14
#17 0x7f02dbf4cb96 in __libc_start_main /build/glibc-2ORdQG/glibc-2.27/csu/../csu/libc-start.c:310
#18 0x422899 in _start (/home/ubuntu/fuzzing_mnt/poppler-20.10.0/asan_build/utils/pdftohtml+0x422899)
Address 0x7ffeaf800bf0 is located in stack of thread T0 at offset 48 in frame
#0 0x7f02dd9dd31f in GfxFunctionShading::getColor(double, double, GfxColor*) const /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/GfxState.cc:3597
This frame has 2 object(s):
[32, 48) 'in' (line 3598) <== Memory access at offset 48 overflows this variable
[64, 320) 'out' (line 3598)
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
(longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow /home/ubuntu/fuzzing_mnt/poppler-20.10.0/poppler/Function.cc:1184:13 in PostScriptFunction::transform(double const*, double*) const
Shadow bytes around the buggy address:
0x100055ef8120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100055ef8130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100055ef8140: 00 00 00 00 00 00 00 00 00 f3 f3 f3 f3 f3 f3 f3
0x100055ef8150: f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00
0x100055ef8160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x100055ef8170: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00[f2]f2
0x100055ef8180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100055ef8190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100055ef81a0: f3 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00
0x100055ef81b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x100055ef81c0: f1 f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 00
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
Shadow gap: cc
==2302==ABORTING
```
I attached the [input file](/uploads/6b5e97026a544e343389f35053cd0fc6/buffer_overflow) that can trigger this bug. The reproduction is
```sh
./pdftohtml ./buffer_overflow /tmp/tmp.pdf
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/980pdftohtml adds invalid charactesr to the generated html filename when using t...2020-11-02T23:56:24ZTrent Marinopdftohtml adds invalid charactesr to the generated html filename when using the complex flagI'm facing an issue where whenever I attempt to convert a pdf file to HTML with the complex flag it adds random characters to the 'content' file's filename that doesn't match the one in the root test.html. see the image below. all PDF fi...I'm facing an issue where whenever I attempt to convert a pdf file to HTML with the complex flag it adds random characters to the 'content' file's filename that doesn't match the one in the root test.html. see the image below. all PDF files are affected not just this one. I'm using v0.71 on Debian buster (10)
![image](/uploads/542234d2a837a0abf4a1f071e1820c99/image.png)
Even adding the `-l 1` to the command doesn't workhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/981PDF using No Name Type 3 Embedded Font rendering poorly in Evince and Xreader2023-01-05T23:43:22ZTater-K7S5APDF using No Name Type 3 Embedded Font rendering poorly in Evince and XreaderI have been having poor font rendering on my Verizon bill when I open it in Evince, Xreader, LibreOffice Draw and GIMP. The document renders acceptably when opened in web browsers (Firefox and Chromium) as well as Okular and Master PDF ...I have been having poor font rendering on my Verizon bill when I open it in Evince, Xreader, LibreOffice Draw and GIMP. The document renders acceptably when opened in web browsers (Firefox and Chromium) as well as Okular and Master PDF Editor.
My system is Linux Mint 20 Cinnamon. Xreader Version 2.6.4, Evince Version 3.36.7-Oubuntu1.
The following page leads me to believe that this issue should be reported here. [GNOME
Evince Issues #1512](https://gitlab.gnome.org/GNOME/evince/-/issues/1512) I did not find that author's report here, so here is mine.
Here is a sample of an offending PDF.[Verizon_bill_font.pdf](/uploads/e5bf5993c5edea4a0724e929560ed113/Verizon_bill_font.pdf)
![PDF_Font_Issue](/uploads/1a78d88056dfc9b9ed92918cc8aae73b/PDF_Font_Issue.png)
Counter-clockwise from the top:
Vivaldi (Acceptable rendering)
Firefox (Acceptable rendering)
LibreOffice Draw (Displays as Arial Outline)
Xreader (Blurry bold rendering)
Evince (Blurry bold rendering)
GIMP (Blurry bold rendering)
The "Properties" box is from Evince but the font in question is described as no name, Type 3 and Embedded in each of the programs I have that will give me properties.https://gitlab.freedesktop.org/poppler/poppler/-/issues/982Decide on linking & packaging for backends2020-11-13T04:09:18ZKyle AubleDecide on linking & packaging for backendsThis issue is a spin-off of #335 to focus on Cairo & Splash separately from the front-ends.
This [mail-list conversation](https://lists.freedesktop.org/archives/poppler/2018-February/012813.html) suggested dropping the orphaned .pc file...This issue is a spin-off of #335 to focus on Cairo & Splash separately from the front-ends.
This [mail-list conversation](https://lists.freedesktop.org/archives/poppler/2018-February/012813.html) suggested dropping the orphaned .pc files and keeping the back-ends private. More recently though, #83 was settled by providing the Cairo headers as an unstable API. At least Debian provides both the Splash & Cairo headers (and then some?) in a `libpoppler-private-dev` package too.
There is also a suggestion from the email to build the Cairo back-end as a distinct library & allow linking it statically.
I can think of the following questions (and changes when needed) to settle everything:
- ~~Should Cairo have its own folder like Splash?~~ Not necessary
- Should Cairo & Splash be built more modularly (distinct CMakeLists, compile to static libraries)?
- ~~Should the .pc files be dropped or updated for downstream (add *-uninstalled.pc files if keeping)?~~ Dropped
- ~~Exactly which files should be included in these dev packages (just module-specific headers)?~~ Packaging back-ends discouraged
Possible tags: [build system][cairo][splash]https://gitlab.freedesktop.org/poppler/poppler/-/issues/983Pattern rendered almost black instead of light grey2020-12-01T21:08:38ZTilman HausherrPattern rendered almost black instead of light grey[PDFJS-8741-p1-patternscaling.pdf](/uploads/920d94a1d99ceba6656ae87d54fd8a80/PDFJS-8741-p1-patternscaling.pdf)
The PDF is from the PDF.js project
https://github.com/mozilla/pdf.js/issues/8741
Expected rendering (illusion of grey):
![P...[PDFJS-8741-p1-patternscaling.pdf](/uploads/920d94a1d99ceba6656ae87d54fd8a80/PDFJS-8741-p1-patternscaling.pdf)
The PDF is from the PDF.js project
https://github.com/mozilla/pdf.js/issues/8741
Expected rendering (illusion of grey):
![PDFJS-8741-p1-patternscaling.pdf-1](/uploads/60454a4b3b93a5be1fba544fb327e337/PDFJS-8741-p1-patternscaling.pdf-1.png)
Actual rendering (illusion of black) with pdftoppm (version 0.88.0 of cygwin):
![PDFJS-8741-p1-patternscaling-1](/uploads/721ee7b546d61ea306b6597676b74e65/PDFJS-8741-p1-patternscaling-1.png)
The effect is also there when using higher dpi (I tried 1200).https://gitlab.freedesktop.org/poppler/poppler/-/issues/984Highlight annotation rendered black instead of yellow2020-11-22T23:45:35ZTilman HausherrHighlight annotation rendered black instead of yellow[pdf_commenting_new-p4.pdf](/uploads/34f8e27000e044a1e676a971ddfe4efb/pdf_commenting_new-p4.pdf)
expected rendering:
![pdf_commenting_new-p4-good](/uploads/bcc5c20968ed23dd49bf67014c8630ab/pdf_commenting_new-p4-good.png)
actual render...[pdf_commenting_new-p4.pdf](/uploads/34f8e27000e044a1e676a971ddfe4efb/pdf_commenting_new-p4.pdf)
expected rendering:
![pdf_commenting_new-p4-good](/uploads/bcc5c20968ed23dd49bf67014c8630ab/pdf_commenting_new-p4-good.png)
actual rendering with pdftoppm (version 0.88.0 of cygwin):
![pdf_commenting_new-p4-bad](/uploads/e13d466e73594c497d07207e80f3a4e6/pdf_commenting_new-p4-bad.png)
Possible reason: the /C entry is missing, so a black default is taken. But this isn't really needed, the two annotations have appearance streams.https://gitlab.freedesktop.org/poppler/poppler/-/issues/985Unable to convert PDF to TIFF using pdftocairo2020-11-09T21:06:19Zyogi2806Unable to convert PDF to TIFF using pdftocairoTried to use this command in **windows **system using version **poppler-20.11.0** loading:
pdftocairo.exe test.pdf -tiff which generates same output like test.tif file with 0kb.
I was using pdf2Image lib even this lib does the same thi...Tried to use this command in **windows **system using version **poppler-20.11.0** loading:
pdftocairo.exe test.pdf -tiff which generates same output like test.tif file with 0kb.
I was using pdf2Image lib even this lib does the same thing and they wanted to contact you on this issue. Kindly help me out to fix the issue.https://gitlab.freedesktop.org/poppler/poppler/-/issues/986Highlight is shown as triangles covering the text2020-11-22T23:45:35ZJulian LHighlight is shown as triangles covering the textI have a test pdf file with highlights on the second page
[Test.pdf](/uploads/a6562f2c76c39774d6304f70b73f4b95/Test.pdf)
Both Firefox and Chrome show the highlighted text correctly:
![image](/uploads/2e3b4df62687cee5956d13147f16509d/i...I have a test pdf file with highlights on the second page
[Test.pdf](/uploads/a6562f2c76c39774d6304f70b73f4b95/Test.pdf)
Both Firefox and Chrome show the highlighted text correctly:
![image](/uploads/2e3b4df62687cee5956d13147f16509d/image.png)
however okular, evince and emacs pdf-tools (which all use poppler as the pdf backend) show black triangle-like shapes which cover the text:
![image](/uploads/c4be23a334139a3224ff01795c5365c3/image.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/987Crash in GlobalParams::getResidentUnicodeMap2021-04-15T14:41:51ZBjörn Daasebjoern.daase@gmail.comCrash in GlobalParams::getResidentUnicodeMap## Affected version
* Fedora 33
* poppler 0.90.0
## Steps to reproduce
Unclear.
## Bug Summary
Poppler randomly crashed for me while I was using evince.
Here is the trace
```GNU gdb (GDB) Fedora 10.1-2.fc33
GNU gdb (GDB) Fedora 10.1-...## Affected version
* Fedora 33
* poppler 0.90.0
## Steps to reproduce
Unclear.
## Bug Summary
Poppler randomly crashed for me while I was using evince.
Here is the trace
```GNU gdb (GDB) Fedora 10.1-2.fc33
GNU gdb (GDB) Fedora 10.1-2.fc33
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/evince...
Reading symbols from /usr/lib/debug/usr/bin/evince-3.38.0-1.fc33.x86_64.debug...
warning: Can't open file /home/bjoern/.local/share/gvfs-metadata/home-3816c159.log during file-backed mapping note processing
warning: Can't open file /memfd:wayland-cursor (deleted) during file-backed mapping note processing
[New LWP 7737]
[New LWP 7735]
[New LWP 7731]
[New LWP 7736]
[New LWP 7733]
[New LWP 11926]
Missing separate debuginfo for /lib64/libevview3.so.3
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/7c/3979633be4550916b2c81f72f6285dee9d12a3.debug
Missing separate debuginfo for /lib64/libevdocument3.so.4
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/79/02a3b7fa950c56b4c7788ecb7e15209dcdd196.debug
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Missing separate debuginfo for /lib64/libwayland-cursor.so.0
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/f4/cbabae667f215f081d7d9dc1abce287ada7286.debug
Missing separate debuginfo for /lib64/libwayland-egl.so.1
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/cb/d1930f8c301540f565bbb2761aa45547ede38b.debug
Missing separate debuginfo for /usr/lib64/evince/4/backends/libpdfdocument.so
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/40/e1427a54f8b8a7822b516b5312db184aa92751.debug
Core was generated by `evince /home/bjoern/HPI/Master/Data Management on Modern Storage Technologies/p'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f5c0e52c878 in std::_Hash_bytes(void const*, unsigned long, unsigned long) () from /lib64/libstdc++.so.6
[Current thread is 1 (Thread 0x7f5c0f296640 (LWP 7737))]
Missing separate debuginfos, use: dnf debuginfo-install at-spi2-atk-2.38.0-1.fc33.x86_64 at-spi2-core-2.38.0-2.fc33.x86_64 atk-2.36.0-2.fc33.x86_64 bzip2-libs-1.0.8-4.fc33.x86_64 cairo-1.16.0-9.fc33.x86_64 cairo-gobject-1.16.0-9.fc33.x86_64 cyrus-sasl-lib-2.1.27-6.fc33.x86_64 dbus-libs-1.12.20-2.fc33.x86_64 dconf-0.38.0-1.fc33.x86_64 elfutils-debuginfod-client-0.182-1.fc33.x86_64 elfutils-libelf-0.182-1.fc33.x86_64 elfutils-libs-0.182-1.fc33.x86_64 fontconfig-2.13.92-12.fc33.x86_64 freetype-2.10.4-1.fc33.x86_64 fribidi-1.0.10-3.fc33.x86_64 gdk-pixbuf2-2.40.0-3.fc33.x86_64 gnome-desktop3-3.38.1-1.fc33.x86_64 graphite2-1.3.14-6.fc33.x86_64 gspell-1.8.4-1.fc33.x86_64 gstreamer1-1.18.1-1.fc33.x86_64 gstreamer1-plugins-base-1.18.1-1.fc33.x86_64 gtk3-3.24.23-1.fc33.x86_64 gvfs-client-1.46.1-1.fc33.x86_64 jbigkit-libs-2.1-19.fc33.x86_64 keyutils-libs-1.6-5.fc33.x86_64 krb5-libs-1.18.2-29.fc33.x86_64 lcms2-2.11-2.fc33.x86_64 libX11-1.6.12-3.fc33.x86_64 libXau-1.0.9-4.fc33.x86_64 libXcomposite-0.4.5-3.fc33.x86_64 libXcursor-1.2.0-3.fc33.x86_64 libXdamage-1.1.5-3.fc33.x86_64 libXext-1.3.4-4.fc33.x86_64 libXfixes-5.0.3-12.fc33.x86_64 libXi-1.7.10-4.fc33.x86_64 libXinerama-1.1.4-6.fc33.x86_64 libXrandr-1.5.2-4.fc33.x86_64 libbrotli-1.0.9-3.fc33.x86_64 libcom_err-1.45.6-4.fc33.x86_64 libcurl-7.71.1-7.fc33.x86_64 libdatrie-0.2.9-12.fc33.x86_64 libepoxy-1.5.4-3.fc33.x86_64 libgcc-10.2.1-6.fc33.x86_64 libidn2-2.3.0-4.fc33.x86_64 libjpeg-turbo-2.0.5-5.fc33.x86_64 libmount-2.36-3.fc33.x86_64 libseccomp-2.5.0-3.fc33.x86_64 libsecret-0.20.3-2.fc33.x86_64 libselinux-3.1-2.fc33.x86_64 libssh-0.9.5-1.fc33.x86_64 libstdc++-10.2.1-6.fc33.x86_64 libthai-0.1.28-5.fc33.x86_64 libtiff-4.1.0-4.fc33.x86_64 libunistring-0.9.10-9.fc33.x86_64 libunwind-1.4.0-4.fc33.x86_64 libxcb-1.13.1-5.fc33.x86_64 libxcrypt-4.4.17-1.fc33.x86_64 libxkbcommon-1.0.1-1.fc33.x86_64 libxml2-2.9.10-7.fc33.x86_64 libzstd-1.4.5-5.fc33.x86_64 lz4-libs-1.9.1-3.fc33.x86_64 nss-util-3.58.0-3.fc33.x86_64 openjpeg2-2.3.1-7.fc33.x86_64 openldap-2.4.50-5.fc33.x86_64 openssl-libs-1.1.1h-1.fc33.x86_64 orc-0.4.31-3.fc33.x86_64 pango-1.47.0-1.fc33.x86_64 pcre-8.44-2.fc33.x86_64 pixman-0.40.0-2.fc33.x86_64 texlive-lib-20200327-16.fc33.x86_64 xz-libs-5.2.5-3.fc33.x86_64
(gdb) thread apply all bt full
Thread 6 (Thread 0x7f5c15077640 (LWP 11926)):
#0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1 0x00007f5c25999a38 in g_cond_wait_until (end_time=<optimized out>, mutex=0x5612da092030, cond=0x5612da092038) at ../glib/gthread-posix.c:1592
span = {tv_sec = 0, tv_nsec = 499999184}
success = <optimized out>
now = {tv_sec = 4816, tv_nsec = 490385816}
sampled = 93
res = <optimized out>
#2 g_cond_wait_until (cond=0x5612da092038, mutex=0x5612da092030, end_time=<optimized out>) at ../glib/gthread-posix.c:1565
#3 0x00007f5c2591f341 in g_async_queue_pop_intern_unlocked (queue=0x5612da092030, wait=1, end_time=4816990385) at ../glib/gasyncqueue.c:422
retval = <optimized out>
__func__ = "g_async_queue_pop_intern_unlocked"
#4 0x00007f5c2597db6a in g_thread_pool_wait_for_new_task (pool=<optimized out>) at ../glib/gthreadpool.c:278
task = <optimized out>
task = <optimized out>
pool = <optimized out>
#5 g_thread_pool_thread_proxy (data=<optimized out>) at ../glib/gthreadpool.c:343
task = <optimized out>
pool = <optimized out>
#6 0x00007f5c2597aede in g_thread_proxy (data=0x5612da356b00) at ../glib/gthread.c:820
thread = 0x5612da356b00
__func__ = "g_thread_proxy"
#7 0x00007f5c247033f9 in start_thread (arg=0x7f5c15077640) at pthread_create.c:463
ret = <optimized out>
pd = 0x7f5c15077640
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140033466529344, 1505429635690707739, 140723487135918, 140723487135919, 0, 140033466529344, -1559241311390745829, -1559348661683438821}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = 0
#8 0x00007f5c24b8bb03 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 5 (Thread 0x7f5c15878640 (LWP 7733)):
#0 0x00007f5c24b80a0f in __GI___poll (fds=0x5612da092650, nfds=2, timeout=100) at ../sysdeps/unix/sysv/linux/poll.c:29
sc_ret = -516
sc_cancel_oldtype = 0
#1 0x00007f5c2599ed1e in g_main_context_poll (priority=<optimized out>, n_fds=2, fds=0x5612da092650, timeout=<optimized out>, context=0x5612da093af0) at ../glib/gmain.c:4395
ret = <optimized out>
errsv = <optimized out>
poll_func = 0x7f5c25953600 <g_poll>
max_priority = 2147483647
timeout = 100
some_ready = <optimized out>
nfds = 2
allocated_nfds = <optimized out>
fds = 0x5612da092650
#2 g_main_context_iterate.constprop.0 (context=context@entry=0x5612da093af0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4087
max_priority = 2147483647
timeout = 100
some_ready = <optimized out>
nfds = 2
allocated_nfds = <optimized out>
fds = 0x5612da092650
--Type <RET> for more, q to quit, c to continue without paging--c
#3 0x00007f5c2594b41f in g_main_context_iteration (context=0x5612da093af0, may_block=may_block@entry=1) at ../glib/gmain.c:4157
retval = <optimized out>
#4 0x00007f5c2594d031 in glib_worker_main (data=<optimized out>) at ../glib/gmain.c:6049
#5 0x00007f5c2597aede in g_thread_proxy (data=0x5612da047980) at ../glib/gthread.c:820
thread = 0x5612da047980
__func__ = "g_thread_proxy"
#6 0x00007f5c247033f9 in start_thread (arg=0x7f5c15878640) at pthread_create.c:463
ret = <optimized out>
pd = 0x7f5c15878640
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140033474922048, 1505429635690707739, 140723487136782, 140723487136783, 0, 140033474922048, -1559240211342247141, -1559348661683438821}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = 0
#7 0x00007f5c24b8bb03 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 4 (Thread 0x7f5c1482a640 (LWP 7736)):
#0 0x00007f5c24b80a0f in __GI___poll (fds=0x5612da0a8f00, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
sc_ret = -516
sc_cancel_oldtype = 0
#1 0x00007f5c2599ed1e in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x5612da0a8f00, timeout=<optimized out>, context=0x5612da0a90f0) at ../glib/gmain.c:4395
ret = <optimized out>
errsv = <optimized out>
poll_func = 0x7f5c25953600 <g_poll>
max_priority = 2147483647
timeout = -1
some_ready = <optimized out>
nfds = 1
allocated_nfds = <optimized out>
fds = 0x5612da0a8f00
#2 g_main_context_iterate.constprop.0 (context=context@entry=0x5612da0a90f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4087
max_priority = 2147483647
timeout = -1
some_ready = <optimized out>
nfds = 1
allocated_nfds = <optimized out>
fds = 0x5612da0a8f00
#3 0x00007f5c2594b41f in g_main_context_iteration (context=0x5612da0a90f0, may_block=1) at ../glib/gmain.c:4157
retval = <optimized out>
#4 0x00007f5c25b5a64d in dconf_gdbus_worker_thread () at /usr/lib64/gio/modules/libdconfsettings.so
#5 0x00007f5c2597aede in g_thread_proxy (data=0x5612da0ac8c0) at ../glib/gthread.c:820
thread = 0x5612da0ac8c0
__func__ = "g_thread_proxy"
#6 0x00007f5c247033f9 in start_thread (arg=0x7f5c1482a640) at pthread_create.c:463
ret = <optimized out>
pd = 0x7f5c1482a640
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140033457825344, 1505429635690707739, 140723487136382, 140723487136383, 0, 140033457825344, -1559242443651499237, -1559348661683438821}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = 0
#7 0x00007f5c24b8bb03 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 3 (Thread 0x7f5c236310c0 (LWP 7731)):
#0 0x00007f5c239bbadc in _fini () at /lib64/liblz4.so.1
#1 0x00007f5c25b77d05 in _dl_fini () at dl-fini.c:144
l = 0x7f5c23a774f0
maps = 0x7ffcbd765ed0
i = 49
l = <optimized out>
nmaps = <optimized out>
nloaded = <optimized out>
ns = 0
do_audit = <optimized out>
__PRETTY_FUNCTION__ = "_dl_fini"
#2 0x00007f5c24aca427 in __run_exit_handlers (status=0, listp=0x7f5c24c4f598 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
atfct = <optimized out>
onfct = <optimized out>
cxafct = <optimized out>
f = <optimized out>
new_exitfn_called = 22
cur = 0x7f5c24c51980 <initial>
#3 0x00007f5c24aca5d0 in __GI_exit (status=<optimized out>) at exit.c:139
#4 0x00007f5c24ab21a9 in __libc_start_main (main=0x5612d91b5f10 <main>, argc=2, argv=0x7ffcbd766478, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffcbd766468) at ../csu/libc-start.c:348
result = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -5133559885728793829, 94638951851792, 0, 0, 0, -1505004181192131813, -1559348206890992869}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x2, 0x7ffcbd766478}, data = {prev = 0x0, cleanup = 0x0, canceltype = 2}}}
not_first_call = <optimized out>
#5 0x00005612d91b673e in _start ()
Thread 2 (Thread 0x7f5c0ffff640 (LWP 7735)):
#0 0x00007f5c24b80a0f in __GI___poll (fds=0x7f5c0800fa80, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
sc_ret = -516
sc_cancel_oldtype = 0
#1 0x00007f5c2599ed1e in g_main_context_poll (priority=<optimized out>, n_fds=3, fds=0x7f5c0800fa80, timeout=<optimized out>, context=0x7f5c0800db50) at ../glib/gmain.c:4395
ret = <optimized out>
errsv = <optimized out>
poll_func = 0x7f5c25953600 <g_poll>
max_priority = 2147483647
timeout = -1
some_ready = <optimized out>
nfds = 3
allocated_nfds = <optimized out>
fds = 0x7f5c0800fa80
#2 g_main_context_iterate.constprop.0 (context=0x7f5c0800db50, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4087
max_priority = 2147483647
timeout = -1
some_ready = <optimized out>
nfds = 3
allocated_nfds = <optimized out>
fds = 0x7f5c0800fa80
#3 0x00007f5c2594d6ab in g_main_loop_run (loop=0x7f5c0800dc40) at ../glib/gmain.c:4290
__func__ = "g_main_loop_run"
#4 0x00007f5c24dc56b6 in gdbus_shared_thread_func (user_data=0x7f5c0800db20) at ../gio/gdbusprivate.c:280
data = 0x7f5c0800db20
#5 0x00007f5c2597aede in g_thread_proxy (data=0x7f5c08001920) at ../glib/gthread.c:820
thread = 0x7f5c08001920
__func__ = "g_thread_proxy"
#6 0x00007f5c247033f9 in start_thread (arg=0x7f5c0ffff640) at pthread_create.c:463
ret = <optimized out>
pd = 0x7f5c0ffff640
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140033382151744, 1505429635690707739, 140033466525662, 140033466525663, 0, 140033382151744, -1559296909742392549, -1559348661683438821}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = 0
#7 0x00007f5c24b8bb03 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 1 (Thread 0x7f5c0f296640 (LWP 7737)):
#0 0x00007f5c0e52c878 in std::_Hash_bytes(void const*, unsigned long, unsigned long) () at /lib64/libstdc++.so.6
#1 0x00007f5c0e81fc25 in std::_Hash_impl::hash(void const*, unsigned long, unsigned long) (__seed=3339675911, __clength=<optimized out>, __ptr=<optimized out>) at /usr/include/c++/10/bits/functional_hash.h:197
__code = <optimized out>
__bkt = <optimized out>
__p = <optimized out>
map = 0x0
#2 std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const (__s="", this=0x7f5c00022850, this=<optimized out>, __s=<optimized out>) at /usr/include/c++/10/bits/basic_string.h:6803
__code = <optimized out>
__bkt = <optimized out>
__p = <optimized out>
map = 0x0
#3 std::__detail::_Hash_code_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, UnicodeMap>, std::__detail::_Select1st, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, true>::_M_hash_code(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const (__k="", this=0x7f5c00022850) at /usr/include/c++/10/bits/hashtable_policy.h:1379
__code = <optimized out>
__bkt = <optimized out>
__p = <optimized out>
map = 0x0
#4 std::_Hashtable<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, UnicodeMap>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, UnicodeMap> >, std::__detail::_Select1st, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (__k="", this=0x7f5c00022850) at /usr/include/c++/10/bits/hashtable.h:1452
__code = <optimized out>
__bkt = <optimized out>
__p = <optimized out>
map = 0x0
#5 std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, UnicodeMap, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, UnicodeMap> > >::find(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (__x="", this=0x7f5c00022850) at /usr/include/c++/10/bits/unordered_map.h:920
map = 0x0
#6 GlobalParams::getResidentUnicodeMap(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (this=this@entry=0x7f5c00022800, encodingName="") at /usr/src/debug/poppler-0.90.0-6.fc33.x86_64/poppler/GlobalParams.cc:588
map = 0x0
#7 0x00007f5c0e821599 in GlobalParams::getUnicodeMap(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (this=0x7f5c00022800, encodingName="") at /usr/src/debug/poppler-0.90.0-6.fc33.x86_64/poppler/GlobalParams.cc:1174
map = <optimized out>
#8 0x00007f5c0e89ec1a in TextPage::coalesce(bool, double, bool) (this=0x7f5c003c2600, physLayout=<optimized out>, fixedPitch=0, doHTML=<optimized out>) at /usr/src/debug/poppler-0.90.0-6.fc33.x86_64/poppler/TextOutputDev.cc:2850
pool = <optimized out>
word0 = <optimized out>
word1 = <optimized out>
word2 = <optimized out>
line = <optimized out>
blkList = <optimized out>
blk = <optimized out>
lastBlk = <optimized out>
blk0 = <optimized out>
blk1 = <optimized out>
blk2 = <optimized out>
flow = <optimized out>
lastFlow = <optimized out>
rot = <optimized out>
poolMinBaseIdx = <optimized out>
baseIdx = <optimized out>
startBaseIdx = <optimized out>
minBase = <optimized out>
maxBase = <optimized out>
newMinBase = <optimized out>
newMaxBase = <optimized out>
fontSize = <optimized out>
colSpace1 = <optimized out>
colSpace2 = <optimized out>
lineSpace = <optimized out>
intraLineSpace = <optimized out>
blkSpace = <optimized out>
found = <optimized out>
count = {-628857504, 22034, -628765504, 22034}
lrCount = <optimized out>
col1 = <optimized out>
col2 = <optimized out>
j = <optimized out>
n = <optimized out>
uMap = <optimized out>
sortPos = <optimized out>
bxMin0 = <optimized out>
byMin0 = <optimized out>
bxMin1 = <optimized out>
byMin1 = <optimized out>
numTables = <optimized out>
tableId = <optimized out>
correspondenceX = <optimized out>
correspondenceY = <optimized out>
xCentre1 = <optimized out>
yCentre1 = <optimized out>
xCentre2 = <optimized out>
yCentre2 = <optimized out>
xCentre3 = <optimized out>
yCentre3 = <optimized out>
xCentre4 = <optimized out>
yCentre4 = <optimized out>
deltaX = <optimized out>
deltaY = <optimized out>
fblk2 = <optimized out>
fblk3 = <optimized out>
fblk4 = <optimized out>
envelopes = <optimized out>
i = <optimized out>
#9 0x00007f5c0e8a8f46 in TextOutputDev::endPage() (this=0x7f5c0136ee30) at /usr/src/debug/poppler-0.90.0-6.fc33.x86_64/poppler/TextOutputDev.cc:5842
#10 0x00007f5c0ea1aeb6 in poppler_page_get_text_page(PopplerPage*) (page=0x5612da85ccc0 [PopplerPage]) at /usr/src/debug/poppler-0.90.0-6.fc33.x86_64/glib/poppler-page.cc:279
text_dev = 0x7f5c0136ee30
gfx = 0x7f5c02328460
#11 0x00007f5c0ea1d6c5 in poppler_page_get_selection_region(PopplerPage*, gdouble, PopplerSelectionStyle, PopplerRectangle*) (page=<optimized out>, scale=1, style=<optimized out>, selection=<optimized out>) at /usr/src/debug/poppler-0.90.0-6.fc33.x86_64/glib/poppler-page.cc:695
poppler_selection = {x1 = 0, y1 = 0, x2 = 439.37, y2 = 666.14199999999994}
text = <optimized out>
selection_style = selectionStyleGlyph
region = 0x0
list = <optimized out>
#12 0x00007f5c0ea8b2a6 in pdf_document_text_get_text_mapping(_EvDocumentText*, _EvPage*) () at /usr/lib64/evince/4/backends/libpdfdocument.so
#13 0x00007f5c25b024f6 in ev_job_page_data_run () at /lib64/libevview3.so.3
#14 0x00007f5c25b01cf9 in ev_job_thread_proxy () at /lib64/libevview3.so.3
#15 0x00007f5c2597aede in g_thread_proxy (data=0x5612da5ac0c0) at ../glib/gthread.c:820
thread = 0x5612da5ac0c0
__func__ = "g_thread_proxy"
#16 0x00007f5c247033f9 in start_thread (arg=0x7f5c0f296640) at pthread_create.c:463
ret = <optimized out>
pd = 0x7f5c0f296640
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140033368090176, 1505429635690707739, 140723487136830, 140723487136831, 0, 140033368090176, -1559298709870560485, -1559348661683438821}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = 0
#17 0x00007f5c24b8bb03 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/988Line width of circle, square and polygon annotations without appearance strea...2020-11-19T09:58:47ZTilman HausherrLine width of circle, square and polygon annotations without appearance stream isn't correct[ann.pdf](/uploads/3c80add71afa55a98e21ade737728875/ann.pdf)
Expected rendering:
![ann1](/uploads/db3d7abe06bc944019e75dfd93959e4c/ann1.png)
actual rendering with pdftoppm (version 0.88.0 of cygwin):
![ann.pdf-1](/uploads/d2f7347eafec...[ann.pdf](/uploads/3c80add71afa55a98e21ade737728875/ann.pdf)
Expected rendering:
![ann1](/uploads/db3d7abe06bc944019e75dfd93959e4c/ann1.png)
actual rendering with pdftoppm (version 0.88.0 of cygwin):
![ann.pdf-1](/uploads/d2f7347eafecd1b4a7f36614eeff2d9d/ann.pdf-1.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/989Shape of circle annotation without appearance stream isn't round2020-11-14T19:19:07ZTilman HausherrShape of circle annotation without appearance stream isn't round[ann.pdf](/uploads/d9b46706401290b90680072ccbd7d715/ann.pdf)
See #988 for renderings... the shape looks kindof weird.
I wonder if it is the Bézier contant? Poppler uses 0.55228475 in poppler/Annot.cc; https://spencermortensen.com/artic...[ann.pdf](/uploads/d9b46706401290b90680072ccbd7d715/ann.pdf)
See #988 for renderings... the shape looks kindof weird.
I wonder if it is the Bézier contant? Poppler uses 0.55228475 in poppler/Annot.cc; https://spencermortensen.com/articles/bezier-circle/ recommends 0.551915024494; Apache PDFBox uses 0.55555417 which was calculated from sampling content streams generated using Adobe Reader.https://gitlab.freedesktop.org/poppler/poppler/-/issues/990Path artifacts for circle annotation under certain render conditions2020-11-16T08:06:46ZTobias DeimingerPath artifacts for circle annotation under certain render conditionsIf we render [ann.pdf](/uploads/d9b46706401290b90680072ccbd7d715/ann.pdf) from #989 like this
```
$ pdftoppm -x 123 -y 425 -W 200 -H 200 -f 0 -singlefile -png ./ann.pdf ./circle_annot
```
we see a spurious line at the bottom of the circl...If we render [ann.pdf](/uploads/d9b46706401290b90680072ccbd7d715/ann.pdf) from #989 like this
```
$ pdftoppm -x 123 -y 425 -W 200 -H 200 -f 0 -singlefile -png ./ann.pdf ./circle_annot
```
we see a spurious line at the bottom of the circle.
![circle_annot_bad](/uploads/5205688e640976794b8ab7daec0bb162/circle_annot_bad.png)
If we change the crop box slightly, the spurious line goes away.
```
$ pdftoppm -x 123 -y 430 -W 200 -H 200 -f 0 -singlefile -png ./ann.pdf ./circle_annot
```
![circle_annot_ok](/uploads/2e7d14db83ed67883604f22d9305651d/circle_annot_ok.png)
Reproducible with poppler 0.80.0 and current master. Did not yet investigate further.https://gitlab.freedesktop.org/poppler/poppler/-/issues/991pdftocairo fails to convert a specific PDF2022-06-27T19:15:18ZShai4shepdftocairo fails to convert a specific PDFsample pdf: https://www.math.ku.dk/english/research-files/conference-papers/CopenhagenD-Tuesday.pdf
```
pdftocairo -png -f 1 -l 1 CopenhagenD-Thursday.pdf
```
gets nothing, while
```
pdftoppm -png -f 1 -l 1 CopenhagenD-Thursday.pdf
```
...sample pdf: https://www.math.ku.dk/english/research-files/conference-papers/CopenhagenD-Tuesday.pdf
```
pdftocairo -png -f 1 -l 1 CopenhagenD-Thursday.pdf
```
gets nothing, while
```
pdftoppm -png -f 1 -l 1 CopenhagenD-Thursday.pdf
```
gets the correct image.
Reference: https://gitlab.gnome.org/GNOME/evince/-/issues/1517#note_960597https://gitlab.freedesktop.org/poppler/poppler/-/issues/992Transparency rendered opaque2024-03-24T21:08:42ZTilman HausherrTransparency rendered opaquefile is from https://bugs.ghostscript.com/show_bug.cgi?id=697425
[gs-bugzilla697425.pdf](/uploads/5ca1abdda2bdf1df1a4b5d026ba16b24/gs-bugzilla697425.pdf)
see the yellow marked text
Expected rendering (pdftoppm):
![gs-bugzilla697425.pdf...file is from https://bugs.ghostscript.com/show_bug.cgi?id=697425
[gs-bugzilla697425.pdf](/uploads/5ca1abdda2bdf1df1a4b5d026ba16b24/gs-bugzilla697425.pdf)
see the yellow marked text
Expected rendering (pdftoppm):
![gs-bugzilla697425.pdf-1](/uploads/1341bf49f0ce6bdbcbe7fab2dd27aa19/gs-bugzilla697425.pdf-1.png)
Actual rendering (pdftocairo, version 0.88.0 of cygwin):
![gs-bugzilla697425.pdf-1](/uploads/e41a7c174c109caa5f3bef743dace1f1/gs-bugzilla697425.pdf-1.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/993Annotations rendered with border when color array is empty2020-11-24T00:44:48ZTilman HausherrAnnotations rendered with border when color array is empty[PDFBOX-3351-538928-p4.pdf](/uploads/fe0947c677747d450fc5cf8e3c8a8509/PDFBOX-3351-538928-p4.pdf)
expected (Adobe Reader):
![PDFBOX-3351-538928-p4.pdf-1](/uploads/99e48417d260dc65de798f768d3bae5f/PDFBOX-3351-538928-p4.pdf-1.png)
actual...[PDFBOX-3351-538928-p4.pdf](/uploads/fe0947c677747d450fc5cf8e3c8a8509/PDFBOX-3351-538928-p4.pdf)
expected (Adobe Reader):
![PDFBOX-3351-538928-p4.pdf-1](/uploads/99e48417d260dc65de798f768d3bae5f/PDFBOX-3351-538928-p4.pdf-1.png)
actual (pdftoppm, version 0.88.0 of cygwin):
![PDFBOX-3351-538928-p4-poppler.png-1](/uploads/5c19c7d0b989cc967ea4b9761e0e9f1e/PDFBOX-3351-538928-p4-poppler.png-1.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/994Rendering of type 1 shading with sampled function never finishes with pdftocairo2022-10-07T10:20:57ZTilman HausherrRendering of type 1 shading with sampled function never finishes with pdftocairo[FUNSH01.pdf](/uploads/89d70862cb682402543f99682740ef87/FUNSH01.pdf)
Rendering is done in a second with pdftoppm, but never finishes (I stopped after several minutes) with pdftocairo (version 21.01.0 of cygwin).[FUNSH01.pdf](/uploads/89d70862cb682402543f99682740ef87/FUNSH01.pdf)
Rendering is done in a second with pdftoppm, but never finishes (I stopped after several minutes) with pdftocairo (version 21.01.0 of cygwin).https://gitlab.freedesktop.org/poppler/poppler/-/issues/995DeviceGray colorspace in transparency group ignored2020-12-03T16:29:55ZTilman HausherrDeviceGray colorspace in transparency group ignoredFile is from https://bugs.ghostscript.com/show_bug.cgi?id=697354
[gs-bugzilla697354.pdf](/uploads/d2574f30ef64ccfc0e853631151db1a5/gs-bugzilla697354.pdf)
Expected:
![gs-bugzilla697354.pdf-1](/uploads/ad1d0c268136944603d17aa631e98179/gs...File is from https://bugs.ghostscript.com/show_bug.cgi?id=697354
[gs-bugzilla697354.pdf](/uploads/d2574f30ef64ccfc0e853631151db1a5/gs-bugzilla697354.pdf)
Expected:
![gs-bugzilla697354.pdf-1](/uploads/ad1d0c268136944603d17aa631e98179/gs-bugzilla697354.pdf-1.png)
Actual (pdftoppm and pdftocairo, 0.88.0 on cygwin):
![gs-bugzilla697354.pdf-1](/uploads/806996503f67a07579e8bf977f06e96e/gs-bugzilla697354.pdf-1.png)
(I think I'm mostly done now. Your project is excellent and most of what I found are obscure corner cases)https://gitlab.freedesktop.org/poppler/poppler/-/issues/996Merging editable PDFs with pdfunite makes only the first one to be still edit...2020-11-18T10:39:43ZGustavo HenriqueMerging editable PDFs with pdfunite makes only the first one to be still editable in the final documentWhen I tried to merge with pdfunite the files listed below, that are all editable PDFs that work individually, the page corresponding to the first file in the parameters list is still editable, but the following aren't. I have changed th...When I tried to merge with pdfunite the files listed below, that are all editable PDFs that work individually, the page corresponding to the first file in the parameters list is still editable, but the following aren't. I have changed the parameters order to be sure that this was not an issue with that specific document, and it was confirmed: only the page corresponding to the first document in the parameter list is editable in the final document.
Files (original version in the [Wizards of the Coast website](https://dnd.wizards.com/products/tabletop-games/trpg-resources/trpg-resources)): [Spellcasting_Sheet__Optional__-_Form_Fillable.pdf](/uploads/20aa33724e0ed22943e5333797329c32/Spellcasting_Sheet__Optional__-_Form_Fillable.pdf), [Character_Sheet_-_Form_Fillable.pdf](/uploads/d3864173d92efbc68b981914a2734402/Character_Sheet_-_Form_Fillable.pdf), [Character_Details__Optional__-_Form_Fillable.pdf](/uploads/74df03f0ab20999807a957855fa57447/Character_Details__Optional__-_Form_Fillable.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/997Borderless annotations rendered with thin border2020-11-25T08:46:58ZOliver SanderBorderless annotations rendered with thin borderThe pdf spec says that an annotation is to be drawn without a border if the border width is set to zero. (In the 1.7 spec this is in Table 166.) However, poppler does draw a thin boundary in this case.
Test document: [annotations-wi...The pdf spec says that an annotation is to be drawn without a border if the border width is set to zero. (In the 1.7 spec this is in Table 166.) However, poppler does draw a thin boundary in this case.
Test document: [annotations-with-zero-width-boundary.pdf](/uploads/b119fa370cc5fb53f8cd032372ae2f4d/annotations-with-zero-width-boundary.pdf), taken and modified from the test file in #988.https://gitlab.freedesktop.org/poppler/poppler/-/issues/998poppler-cpp memory leaking on Windows for some pdf2020-12-03T05:45:03Za bpoppler-cpp memory leaking on Windows for some pdf## Env
OS: Windows 10
IDE: Visual Studio 2019
poppler: 20.11.0 x64 msvc
## Problem
Memory leak for some pdf when calling `poppler::page_renderer::render`
## Reproduce
1. Download the pdf<br>
http://www.cninfo.com.cn/new/disclosure/det...## Env
OS: Windows 10
IDE: Visual Studio 2019
poppler: 20.11.0 x64 msvc
## Problem
Memory leak for some pdf when calling `poppler::page_renderer::render`
## Reproduce
1. Download the pdf<br>
http://www.cninfo.com.cn/new/disclosure/detail?plate=szse&orgId=gssz0000672&stockCode=000672&announcementId=1207498718&announcementTime=2020-04-15<br>
Click the blue button on the top right
2. In a Visual Studio solution, include `test.h` and call the function
test.h
```
#pragma once
#include <iostream>
#include <poppler-document.h>
#include "poppler-page.h"
#include "poppler-page-renderer.h"
std::string pdf_file_path(u8"上峰水泥:2019年年度报告.PDF")
void test_poppler_memory_leak()
{
if (!poppler::page_renderer::can_render())
{
std::cerr << "can not render" << std::endl;
return;
}
poppler::document * p_doc = poppler::document::load_from_file(pdf_file_path);
int page_index = 85;
poppler::page * p_page = p_doc->create_page(page_index);
poppler::page_renderer page_render;
poppler::image poppler_img = page_render.render_page(p_page, 120, 120); // it leaks
delete p_page;
delete p_doc;
}
```
3. Leak message sample in Visual Studio 2019
```
{35684} normal block at 0x000001EA57F0CA40, 32 bytes long.
Data: <C:\Windows\Fonts> 43 3A 5C 57 69 6E 64 6F 77 73 5C 46 6F 6E 74 73
{35683} normal block at 0x000001EA57EDDC80, 16 bytes long.
Data: <p4 W > 70 34 EB 57 EA 01 00 00 00 00 00 00 00 00 00 00
{35682} normal block at 0x000001EA57EB3470, 40 bytes long.
Data: < W @ W > 80 DC ED 57 EA 01 00 00 40 CA F0 57 EA 01 00 00
{35681} normal block at 0x000001EA57F0C560, 32 bytes long.
Data: <Courier-BoldObli> 43 6F 75 72 69 65 72 2D 42 6F 6C 64 4F 62 6C 69
{35680} normal block at 0x000001EA57EDDD20, 16 bytes long.
Data: < 5 W > C0 35 EB 57 EA 01 00 00 00 00 00 00 00 00 00 00
```
## More Info
With many other pdf files, it doesn't leak, even include Chinese fonts.
It seems that some fonts lead to memory leaks.https://gitlab.freedesktop.org/poppler/poppler/-/issues/999poppler::image::format_gray8 to cv::Mat failed2020-11-28T10:40:04Za bpoppler::image::format_gray8 to cv::Mat failedWhen using `poppler::image::format_gray8`, it crashes due to memory access violation
```
poppler::page * page = poppler_pdf_doc->create_page(page_index);
poppler::page_renderer page_render;
page_render.set_image_format(poppler::image::fo...When using `poppler::image::format_gray8`, it crashes due to memory access violation
```
poppler::page * page = poppler_pdf_doc->create_page(page_index);
poppler::page_renderer page_render;
page_render.set_image_format(poppler::image::format_gray8);
poppler::image poppler_img = page_render.render_page(page, 120, 120);
cv::Mat(poppler_img.height(), poppler_img.width(), CV_8UC1, poppler_img.data(), poppler_img.bytes_per_row()).copyTo(__cv_mat_page);
```
But using `poppler::image::format_rgb24`, it's ok
```
poppler::page * page = __poppler_pdf_doc->create_page(page_index);
poppler::page_renderer page_render;
page_render.set_image_format(poppler::image::format_rgb24);
poppler::image poppler_img = page_render.render_page(page, 120, 120);
cv::Mat(poppler_img.height(), poppler_img.width(), CV_8UC3, poppler_img.data(), poppler_img.bytes_per_row()).copyTo(__cv_mat_page);
```
Why?
BTW, any easy way to convert format `poppler::image::format_mono` to `cv::Mat`?https://gitlab.freedesktop.org/poppler/poppler/-/issues/1000Missing border in freetext annotation2020-12-02T13:51:37ZTilman HausherrMissing border in freetext annotationWidth in border style dictionary /BS << /W 2 >> is ignored and no border is drawn. (If there is no border style dictionary then a thin border is drawn)
[ann.pdf](/uploads/37bddfb9fc2a641bdc4860e4f7fec9cd/ann.pdf)
expected (scroll down):...Width in border style dictionary /BS << /W 2 >> is ignored and no border is drawn. (If there is no border style dictionary then a thin border is drawn)
[ann.pdf](/uploads/37bddfb9fc2a641bdc4860e4f7fec9cd/ann.pdf)
expected (scroll down):
![ann-good](/uploads/c3e5471eb50853b18e90966e3034508e/ann-good.png)
actual (pdftoppm, 0.88.0 on cygwin):
![ann-bad](/uploads/11531b715fd9e294323e6a3acb2671bc/ann-bad.png)
(There are also less important issues, but I wanted to focus on the border)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1001Why not poppler::ustring derived from std::wstring instead of std::basic_stri...2020-12-03T09:10:10Za bWhy not poppler::ustring derived from std::wstring instead of std::basic_string<unsigned short>?Is it better that
```
class POPPLER_CPP_EXPORT ustring : public std::wstring
```
instead of
```
class POPPLER_CPP_EXPORT ustring : public std::basic_string<unsigned short>
```Is it better that
```
class POPPLER_CPP_EXPORT ustring : public std::wstring
```
instead of
```
class POPPLER_CPP_EXPORT ustring : public std::basic_string<unsigned short>
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1002poppler 20.12.0 regression with pdftops -level2sep2020-12-05T22:05:11ZWilliam Baderpoppler 20.12.0 regression with pdftops -level2sepcommit 75abc683868d8933f10128074a4234afaf76e77f "PSOutputDev: use the DeviceN8 bitmap for rasterization with CMYK-output + overprint" breaks the attached file.
To test it, build poppler pdftops
`cd /tmp/poppler ; rm -rf build ; mkdir bu...commit 75abc683868d8933f10128074a4234afaf76e77f "PSOutputDev: use the DeviceN8 bitmap for rasterization with CMYK-output + overprint" breaks the attached file.
To test it, build poppler pdftops
`cd /tmp/poppler ; rm -rf build ; mkdir build ; cd build ; cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF .. ; make -j4 pdftops`
and then run the attached file through `pdftops -level2sep`
`cd /tmp/poppler ; rm -f x.ps ; ./build/utils/pdftops -level2sep -f 1 -l 1 /u/tests/020_ReadMe_Ghent_Output_Patch.pdf x.ps ; gv x.ps`
The background of the page should be white but the regression makes it purple.
I did a git bisection to identify the commit.
Setting `overprint = false` in line 3182 of PSOutputDev::checkPageSlice() in PSOutputDev.cc makes the page come out correctly. I know that isn't a fix, but it confirms the location of the regression.
I have also attached valgrind results from 20.12.0. I checked that pdftops 20.11.0 is clean with valgrind. The first valgrind warning is an uninitialized variable in Splash::pipeRun() and the stack trace goes to PSOutputDev::checkPageSlice(). I suspect that when it sets internalColorFormat = splashModeDeviceN8, something is still using processColorFormat = splashModeCMYK8 and the last 4 channels aren't initialized. [valgrind.txt](/uploads/175ac2723048d3ab012240b8887b5164/valgrind.txt)
Is it really necessary to implement overprinting if -overprint is not requested?
[020_ReadMe_Ghent_Output_Patch.pdf](/uploads/5a77e7020a1725e0967e5769aae624c4/020_ReadMe_Ghent_Output_Patch.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1003memory leak in Visual Studio when work with wxWidgets2020-12-04T05:09:56Za bmemory leak in Visual Studio when work with wxWidgets### Env
poppler 20.11.0
wxwidgets 3.1.4
Visual Studio 2019
Windows 10
arch x64
### Reproduce
```
#define WXUSINGDLL
#include <wx/log.h> // this leads to memory leak, if comment out this line, no memory leak
#include <poppler/cpp/poppl...### Env
poppler 20.11.0
wxwidgets 3.1.4
Visual Studio 2019
Windows 10
arch x64
### Reproduce
```
#define WXUSINGDLL
#include <wx/log.h> // this leads to memory leak, if comment out this line, no memory leak
#include <poppler/cpp/poppler-page.h>
int main()
{
poppler::page * __page = nullptr;
if (__page != nullptr)
delete __page;
return 0;
}
```
```
Detected memory leaks!
Dumping objects ->
{75} normal block at 0x00000208EC86EE70, 62 bytes long.
Data: <D:\Test> 43 3A 5C 55 73 65 72 73 5C 61 6C 67 5C 44 65 76
Object dump complete.
The program '[0x1B34] TextWxWidgets.exe' has exited with code 0 (0x0).
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1004warning when using dynamic link on Windows2021-01-08T13:40:42Za bwarning when using dynamic link on Windows### Env
* Visual Studio 2019
* Windows 10
* poppler 20.11.0
* arch x64
### Reproduce
* code
```
#include <poppler/cpp/poppler-page.h>
int main()
{
return 0;
}
```
* warning when building
```
poppler\cpp\poppler-page.h(134,42): warn...### Env
* Visual Studio 2019
* Windows 10
* poppler 20.11.0
* arch x64
### Reproduce
* code
```
#include <poppler/cpp/poppler-page.h>
int main()
{
return 0;
}
```
* warning when building
```
poppler\cpp\poppler-page.h(134,42): warning C4251: 'poppler::text_box::m_data': class 'std::unique_ptr<poppler::text_box_data,std::default_delete<poppler::text_box_data>>' needs to have dll-interface to be used by clients of class 'poppler::text_box'
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1005PDf page rendered white despite content2021-01-02T17:44:46ZPascal NiklausPDf page rendered white despite contentThis bug was originally reported here: https://bugs.kde.org/show_bug.cgi?id=430038
In several pdf documents, entire pages are displayed as blank white surface.
This is not the case when I open the same PDFs using other tools, e.g. Firef...This bug was originally reported here: https://bugs.kde.org/show_bug.cgi?id=430038
In several pdf documents, entire pages are displayed as blank white surface.
This is not the case when I open the same PDFs using other tools, e.g. Firefox.
pdfinfo does not report any problems.
The attached page demonstrates one such problem. I do not attach other
documents because they are copyrighted. However, I am happy to provide these
files directly to developers.
[pdf_problem.pdf](/uploads/8a311f02b75758ca014a4153fad331dd/pdf_problem.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1006Memory leak on Windows2020-12-09T12:42:55Za bMemory leak on WindowsSimple code leaks. While comment out a little code of poppler, no leak any more.
The code leak on Windows
```
#define WXUSINGDLL
#include <wx/log.h> // this leads to memory leak, if comment out this line, no memory leak will
#include <p...Simple code leaks. While comment out a little code of poppler, no leak any more.
The code leak on Windows
```
#define WXUSINGDLL
#include <wx/log.h> // this leads to memory leak, if comment out this line, no memory leak will
#include <poppler/cpp/poppler-page.h>
int main()
{
poppler::page * __page = nullptr;
if (__page != nullptr)
delete __page;
return 0;
}
```
When comment out the 2 parts of class page as below, no leak. And uncomment any will lead to memory leak
```
class POPPLER_CPP_EXPORT page// : public poppler::noncopyable
{
public:
...
// ~page();
...
}
```
```
class POPPLER_CPP_EXPORT noncopyable
{
public:
noncopyable(const noncopyable &) = delete;
const noncopyable &operator=(const noncopyable &) = delete;
protected:
noncopyable();
~noncopyable();
};
```
The other way, comment out `#define WXUSINGDLL` also leads to no leak.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1007Feature request: command line utility for document structures2020-12-10T21:49:20ZchampignoomFeature request: command line utility for document structuresIt would be great to have a tool viewing and editing pdf structures.
Proposed functionalities:
```
pdfstructure <PDF-file> <component> [options]
Components:
table-of-contents, toc
page-numbers, num
options:
--get, -g: Print the...It would be great to have a tool viewing and editing pdf structures.
Proposed functionalities:
```
pdfstructure <PDF-file> <component> [options]
Components:
table-of-contents, toc
page-numbers, num
options:
--get, -g: Print the specified component of the pdf to stdout. This is the default behavior.
--set=file, -s: Read the component from <file> and assign it to the pdf. '-' for file means stdin.
--interactive, -i: Use $EDITOR to view and edit the component.
```
The syntax of both components should be easy to read and parse. I propose yaml as a candidate.
Examples:
```yaml
# Table of Contents
# Physical page numbers should be prefixed with "+", e.g.: +1, +2, +3, ...
# Logical page numbers should be left as is, e.g.: ii, viii, 1, 8, ...
- ii Preface
- vii Table of Contents
- 1 Chapter 1:
- 1 Section 1.1
- 6 Section 1.2
- 2 Chapter 2:
- 13 Section 2.1
- 18 Section 2.2:
- 19 Subsection 2.2.1
```
```yaml
# Page numbers
- 1-8: {from: 1, style: lower-roman} # 1: i, 2: ii, ..., 8: viii
- 9-: {from: 1} # same with {from: 1, style: decimal}; 9: 1, 10: 2, ...
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1008Extracting pdftotext -layout functionality into library2020-12-15T22:16:25ZElias Gabriel Amaral da SilvaExtracting pdftotext -layout functionality into libraryHello, I need a function that returns a string with whatever `pdftotext` outputs when given the `-layout` option, but without having to run the executable. I want to call Popper's APIs myself (eventually I will package it as a Rust crate...Hello, I need a function that returns a string with whatever `pdftotext` outputs when given the `-layout` option, but without having to run the executable. I want to call Popper's APIs myself (eventually I will package it as a Rust crate and publish it to crates.io, but that's another matter).
I'm seeing that `pdftotext` uses internal Popper APIs, in special `TextOutputDev.h`: it calls `new TextOutputDev(filename, true, ...)` to build the object that prints text with physical layout. I'm tempted to go ahead and just call this, but [the readme advises against that](https://gitlab.freedesktop.org/poppler/poppler#stable-and-unstable-apis).
Is this functionality available in a stable API? I would prefer to use poppler-glib if possible, but either one is acceptable.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1009Selecting text from annotation rect selects the wrong text2021-03-16T03:06:55ZzeidooSelecting text from annotation rect selects the wrong text**Preface:**
Using the latest code in the master branch. I have searched the issues and didn't find anything related, apologies if this is known. Also apologies if this is expected behavior. If it's not expected behavior, I'd gladly sub...**Preface:**
Using the latest code in the master branch. I have searched the issues and didn't find anything related, apologies if this is known. Also apologies if this is expected behavior. If it's not expected behavior, I'd gladly submit a PR to fix the issue.
**Problem:**
For highlight annotations, it's useful to extract the highlighted text. Annotations have their coordinates start (point 0,0) at the bottom left of the page, but it seems text selection starts at the top left of the page. At least for the glib api this is the case. Note that the annotation was done in Okular which uses the QT5 api of Poppler.
As such the following does not work:
```
char *text = poppler_page_get_text_for_area(demo->page, &amapping->area);
```
![image](/uploads/57bc490069ac3bf7813258e0483d9f46/image.png)
![image](/uploads/441d7db76d9a2cb5dde1bab5a493b561/image.png)
Nor does this (same results as the screenshots above):
```
PopplerRectangle rect;
poppler_annot_get_rectangle(amapping->annot, &rect);
char *text = poppler_page_get_text_for_area(demo->page, &rect);
```
This does get the correct text (792 is the page height):
```
PopplerRectangle rect;
poppler_annot_get_rectangle(amapping->annot, &rect);
rect.y1 = 792 - rect.y1;
rect.y2 = 792 - rect.y2;
char *text = poppler_page_get_text_for_area(demo->page, &rect);
```
![image](/uploads/9a9b41ea12497352857aa314e63da973/image.png)
![image](/uploads/0dd2bb6feaaca4b89331bf9ceafb8bc0/image.png)
**Test files**
[1.pdf](/uploads/e796b3db6309304a6c3d256657d5063e/1.pdf)
[2.pdf](/uploads/14a1901360f213b11c84e9c4785d74f5/2.pdf)
**Debug info**
![image](/uploads/a002cea96fb298cbb5ac5eaa2c6e8c10/image.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1010Change annotation icon2020-12-17T23:34:59ZDavide PozziChange annotation iconMay you please redesign or substitute the annotation icon/placeholder? <br>
As per KDE bug file https://bugs.kde.org/show_bug.cgi?id=430294
Thank you,<br>
DavidMay you please redesign or substitute the annotation icon/placeholder? <br>
As per KDE bug file https://bugs.kde.org/show_bug.cgi?id=430294
Thank you,<br>
Davidhttps://gitlab.freedesktop.org/poppler/poppler/-/issues/1011Heap-Buffer-Overflow in DCTStream::getChars2020-12-25T23:51:17Zbin24151Heap-Buffer-Overflow in DCTStream::getChars- Version: 20.12.1
- Commit: e1f562582db4ed902989e23f7a02645a51da8e88
- How to reproduce: pdftops ./poc /dev/null
The log of ASAN:
```
==78169==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x633000019830 at pc 0x0000004def...- Version: 20.12.1
- Commit: e1f562582db4ed902989e23f7a02645a51da8e88
- How to reproduce: pdftops ./poc /dev/null
The log of ASAN:
```
==78169==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x633000019830 at pc 0x0000004def3c bp 0x7ffcb2d72b80 sp 0x7ffcb2d72330
WRITE of size 219 at 0x633000019830 thread T0
#0 0x4def3b in __asan_memcpy (/src/executable/pdftops+0x4def3b)
#1 0x7c5601 in DCTStream::getChars(int, unsigned char*) /src/poppler/poppler/DCTStream.cc:223:9
#2 0x606c86 in Stream::doGetChars(int, unsigned char*) /src/poppler/poppler/Stream.h:130:20
#3 0x603203 in LZWEncoder::reset() /src/poppler/poppler/Stream.cc:4940:21
#4 0x5ffdc3 in ASCII85Encoder::reset() /src/poppler/poppler/Stream.cc:4723:10
#5 0x6a18c6 in PSOutputDev::doImageL2(GfxState*, Object*, GfxImageColorMap*, bool, bool, Stream*, int, int, int, int const*, Stream*, int, int, bool) /src/poppler/poppler/PSOutputDev.cc:6047:14
#6 0x6ad7d3 in PSOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, bool, int const*, bool) /src/poppler/poppler/PSOutputDev.cc:5181:9
#7 0x91bfc0 in Gfx::doImage(Object*, Stream*, bool) /src/poppler/poppler/Gfx.cc:4520:22
#8 0x8c70a9 in Gfx::opXObject(Object*, int) /src/poppler/poppler/Gfx.cc:4097:13
#9 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#10 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#11 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#12 0xa78ecf in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /src/poppler/poppler/Page.cc:576:14
#13 0xa78a4e in Page::display(OutputDev*, double, double, int, bool, bool, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /src/poppler/poppler/Page.cc:521:5
#14 0x54b820 in PDFDoc::displayPage(OutputDev*, int, double, double, int, bool, bool, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /src/poppler/poppler/PDFDoc.cc:639:24
#15 0x5218dc in main /src/poppler/utils/pdftops.cc:475:18
#16 0x7fabbbf24bf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
#17 0x420359 in _start (/src/executable/pdftops+0x420359)
0x633000019830 is located 0 bytes to the right of 102448-byte region [0x633000000800,0x633000019830)
allocated by thread T0 here:
#0 0x5187c0 in operator new(unsigned long) (/src/executable/pdftops+0x5187c0)
#1 0x6a105a in PSOutputDev::doImageL2(GfxState*, Object*, GfxImageColorMap*, bool, bool, Stream*, int, int, int, int const*, Stream*, int, int, bool) /src/poppler/poppler/PSOutputDev.cc:6001:19
#2 0x6ad7d3 in PSOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, bool, int const*, bool) /src/poppler/poppler/PSOutputDev.cc:5181:9
SUMMARY: AddressSanitizer: heap-buffer-overflow (/src/executable/pdftops+0x4def3b) in __asan_memcpy
Shadow bytes around the buggy address:
0x0c667fffb2b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c667fffb2c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c667fffb2d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c667fffb2e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c667fffb2f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c667fffb300: 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa fa fa
0x0c667fffb310: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c667fffb320: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c667fffb330: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c667fffb340: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c667fffb350: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 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
==78169==ABORTING
```
poc file: [poc](/uploads/8455cee26a313a3a0174a01e4ec80e33/poc)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1012Heap-buffer-overflow in `LZWEncoder::fillBuf()`2020-12-21T18:09:05Zbin24151Heap-buffer-overflow in `LZWEncoder::fillBuf()`- Version: 20.12.1
- Commit: e1f562582db4ed902989e23f7a02645a51da8e88
- How to reproduce: pdftops ./poc /dev/null
The log of ASAN:
```
==42490==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x633000019830 at pc 0x0000004df9f...- Version: 20.12.1
- Commit: e1f562582db4ed902989e23f7a02645a51da8e88
- How to reproduce: pdftops ./poc /dev/null
The log of ASAN:
```
==42490==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x633000019830 at pc 0x0000004df9fd bp 0x7fffe400da20 sp 0x7fffe400d1d0
READ of size 65459 at 0x633000019830 thread T0
#0 0x4df9fc in __asan_memmove (/src/poppler/build/utils/pdftops+0x4df9fc)
#1 0x603ddc in LZWEncoder::fillBuf() /src/poppler/poppler/Stream.cc:5031:5
#2 0x6034eb in LZWEncoder::getChar() /src/poppler/poppler/Stream.cc:4956:9
#3 0x5ffff6 in ASCII85Encoder::fillBuf() /src/poppler/poppler/Stream.cc:4739:15
#4 0x60dc0c in ASCII85Encoder::getChar() /src/poppler/poppler/Stream.h:1303:59
#5 0x6a1951 in PSOutputDev::doImageL2(GfxState*, Object*, GfxImageColorMap*, bool, bool, Stream*, int, int, int, int const*, Stream*, int, int, bool) /src/poppler/poppler/PSOutputDev.cc:6049:26
#6 0x6ad7d3 in PSOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, bool, int const*, bool) /src/poppler/poppler/PSOutputDev.cc:5181:9
#7 0x91bfc0 in Gfx::doImage(Object*, Stream*, bool) /src/poppler/poppler/Gfx.cc:4520:22
#8 0x8c70a9 in Gfx::opXObject(Object*, int) /src/poppler/poppler/Gfx.cc:4097:13
#9 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#10 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#11 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#12 0xa78ecf in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /src/poppler/poppler/Page.cc:576:14
#13 0xa78a4e in Page::display(OutputDev*, double, double, int, bool, bool, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /src/poppler/poppler/Page.cc:521:5
#14 0x54b820 in PDFDoc::displayPage(OutputDev*, int, double, double, int, bool, bool, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /src/poppler/poppler/PDFDoc.cc:639:24
#15 0x5218dc in main /src/poppler/utils/pdftops.cc:475:18
#16 0x7fc782dd3bf6 in __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:310
#17 0x420359 in _start (/src/poppler/build/utils/pdftops+0x420359)
0x633000019830 is located 0 bytes to the right of 102448-byte region [0x633000000800,0x633000019830)
allocated by thread T0 here:
#0 0x5187c0 in operator new(unsigned long) (/src/poppler/build/utils/pdftops+0x5187c0)
#1 0x6a105a in PSOutputDev::doImageL2(GfxState*, Object*, GfxImageColorMap*, bool, bool, Stream*, int, int, int, int const*, Stream*, int, int, bool) /src/poppler/poppler/PSOutputDev.cc:6001:19
#2 0x6ad7d3 in PSOutputDev::drawImage(GfxState*, Object*, Stream*, int, int, GfxImageColorMap*, bool, int const*, bool) /src/poppler/poppler/PSOutputDev.cc:5181:9
SUMMARY: AddressSanitizer: heap-buffer-overflow (/src/poppler/build/utils/pdftops+0x4df9fc) in __asan_memmove
Shadow bytes around the buggy address:
0x0c667fffb2b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c667fffb2c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c667fffb2d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c667fffb2e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c667fffb2f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c667fffb300: 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa fa fa
0x0c667fffb310: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c667fffb320: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c667fffb330: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c667fffb340: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c667fffb350: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 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
==42490==ABORTING
```
[poc](/uploads/faba3c98649124f0ab2b96b6beeef47e/poc)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1013Stack-Overflow in `FoFiType1C::cvtGlyph` results in Segmentation Fault2020-12-22T22:09:54Zbin24151Stack-Overflow in `FoFiType1C::cvtGlyph` results in Segmentation Fault- Version: 20.12.1
- Commit: e1f56258
- How to reproduce: ./pdftops ./poc /dev/null
The backtrace is:
```
==107470==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc5f160fd8 (pc 0x0000004ded5c bp 0x7ffc5f161850 sp 0x7ffc5f160fe0...- Version: 20.12.1
- Commit: e1f56258
- How to reproduce: ./pdftops ./poc /dev/null
The backtrace is:
```
==107470==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc5f160fd8 (pc 0x0000004ded5c bp 0x7ffc5f161850 sp 0x7ffc5f160fe0 T0)
#0 0x4ded5b in __asan_memcpy (/src/poppler_test/build/utils/pdftops+0x4ded5b)
#1 0x817158 in FoFiType1C::getOp(int, bool, bool*) /src/poppler_test/fofi/FoFiType1C.cc:2620:21
#2 0x8077bd in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc:1141:15
#3 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#4 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#5 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#6 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#7 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#8 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#9 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#10 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#11 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#12 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#13 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#14 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#15 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#16 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#17 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#18 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#19 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#20 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#21 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#22 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#23 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#24 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#25 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#26 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#27 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#28 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#29 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#30 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#31 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#32 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#33 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#34 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#35 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#36 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#37 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#38 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#39 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#40 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#41 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
#42 0x80ad8d in FoFiType1C::cvtGlyph(int, int, GooString*, Type1CIndex const*, Type1CPrivateDict const*, bool) /src/poppler_test/fofi/FoFiType1C.cc
...
...
```
This cause segmentation fault without ASAN.
[poc](/uploads/7d6e4beff39de2fd18da33958d93edb9/poc)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1014Poppler doesn't render a valid PDF2020-12-23T22:54:46ZThomas FreitagPoppler doesn't render a valid PDFI have here a PDF with a generation value of 0xffffffff (= -1L) in a xref stream section. Poppler complains about it with "Gen inside xref table too large (bigger than INT_MAX)", tries to reconstruct the xref table (which always fails wh...I have here a PDF with a generation value of 0xffffffff (= -1L) in a xref stream section. Poppler complains about it with "Gen inside xref table too large (bigger than INT_MAX)", tries to reconstruct the xref table (which always fails when xref stream sections are used) and doesn't render this PDF at all!https://gitlab.freedesktop.org/poppler/poppler/-/issues/1015Pdfsig not installing on Alpine2020-12-21T17:50:12ZFlorent SerfasPdfsig not installing on AlpineHello,
I am currently trying to install the package poppler on Alpine to use pdfsig but I couldln't find a way to do it.
I tried with : `RUN apk --no-cache add poppler poppler-utils` but it installed each commands except pdfsig.
Doing...Hello,
I am currently trying to install the package poppler on Alpine to use pdfsig but I couldln't find a way to do it.
I tried with : `RUN apk --no-cache add poppler poppler-utils` but it installed each commands except pdfsig.
Doing `apk search pdfsig` doesn't return anything either
I there a specific way to do it ?
Thanks in advance :)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1016NULL-Pointer Deference in `FoFiType1C::convertToType1`2020-12-23T22:47:05Zbin24151NULL-Pointer Deference in `FoFiType1C::convertToType1`- Version: 20.12.1
- Commit: e1f56258
- How to reproduce: ./pdftops ./poc /dev/null
In function `FoFiType1C::convertToType1`:
```c
299 } else {
300 (*outputFunc)(outputStream, "256 array\n", 10);
301 (*...- Version: 20.12.1
- Commit: e1f56258
- How to reproduce: ./pdftops ./poc /dev/null
In function `FoFiType1C::convertToType1`:
```c
299 } else {
300 (*outputFunc)(outputStream, "256 array\n", 10);
301 (*outputFunc)(outputStream, "0 1 255 {1 index exch /.notdef put} for\n", 40);
302 enc = newEncoding ? newEncoding : (const char **)encoding;
303 for (i = 0; i < 256; ++i) {
→ 304 if (enc[i]) { // enc == 0
305 buf = GooString::format("dup {0:d} /{1:s} put\n", i, enc[i]);
306 (*outputFunc)(outputStream, buf->c_str(), buf->getLength());
307 delete buf;
308 }
309 }
```
enc == 0 in line 304.
Here is the debug from gdb:
```assemble
0x7c6e5d <FoFiType1C::convertToType1(char+0> shr rax, 0x3
0x7c6e61 <FoFiType1C::convertToType1(char+0> cmp BYTE PTR [rax+0x7fff8000], 0x0
0x7c6e68 <FoFiType1C::convertToType1(char+0> jne 0x7c9bfe <FoFiType1C::convertToType1(char const*, char const**, bool, void (*)(void*, char const*, int), void*)+17710>
→ 0x7c6e6e <FoFiType1C::convertToType1(char+0> mov rdx, QWORD PTR [r15]
0x7c6e71 <FoFiType1C::convertToType1(char+0> test rdx, rdx
0x7c6e74 <FoFiType1C::convertToType1(char+0> je 0x7c6df8 <FoFiType1C::convertToType1(char const*, char const**, bool, void (*)(void*, char const*, int), void*)+5928>
0x7c6e76 <FoFiType1C::convertToType1(char+0> mov rax, QWORD PTR [rip+0x926943] # 0x10ed7c0 <__afl_area_ptr>
0x7c6e7d <FoFiType1C::convertToType1(char+0> add BYTE PTR [rax+0x4f23], 0x1
0x7c6e84 <FoFiType1C::convertToType1(char+0> mov DWORD PTR fs:[r13+0x0], 0x245f
gef➤ print $r15
$7 = 0x0
```
The backtrace is:
```c
[#0] 0x7c6e6e → FoFiType1C::convertToType1(this=<optimized out>, psName=0x603000019360 "ERGTBC+#3ceoSansIntel", newEncoding=<optimized out>, ascii=<optimized out>, outputFunc=<optimized out>, outputStream=<optimized out>)
[#1] 0x6346ca → PSOutputDev::setupEmbeddedType1CFont(this=0x619000000f80, font=<optimized out>, id=<optimized out>, psName=<optimized out>)
[#2] 0x629553 → PSOutputDev::setupFont(this=0x619000000f80, font=<optimized out>, parentResDict=<optimized out>)
[#3] 0x62630c → PSOutputDev::setupFonts(this=<optimized out>, resDict=0x6070000020f0)
[#4] 0x622f01 → PSOutputDev::setupResources(this=0x619000000f80, resDict=0x6070000020f0)
[#5] 0x61da18 → PSOutputDev::writeDocSetup(this=0x619000000f80, catalog=<optimized out>, pageList=<optimized out>, duplexA=<optimized out>)
[#6] 0x6195db → PSOutputDev::postInit(this=0x619000000f80)
[#7] 0x6406e9 → PSOutputDev::checkPageSlice(this=<optimized out>, page=<optimized out>, rotateA=<optimized out>, useMediaBox=<optimized out>, crop=0x1, sliceX=<optimized out>, sliceY=<optimized out>, sliceW=<optimized out>, sliceH=<optimized out>, printing=<optimized out>, abortCheckCbk=<optimized out>, abortCheckCbkData=<optimized out>, annotDisplayDecideCbk=<optimized out>, annotDisplayDecideCbkData=<optimized out>)
[#8] 0xa31aad → Page::displaySlice(this=<optimized out>, out=0x619000000f80, hDPI=<optimized out>, vDPI=<optimized out>, rotate=<optimized out>, useMediaBox=<optimized out>, crop=<optimized out>, sliceX=<optimized out>, sliceY=<optimized out>, sliceW=<optimized out>, sliceH=<optimized out>, printing=<optimized out>, abortCheckCbk=<optimized out>, abortCheckCbkData=<optimized out>, annotDisplayDecideCbk=<optimized out>, annotDisplayDecideCbkData=<optimized out>, copyXRef=<optimized out>)
[#9] 0xa31944 → Page::display(this=0x61a0000006a0, out=0x14, hDPI=1.5817496953307363e-153, vDPI=9.041152192150418e+271, rotate=0x0, useMediaBox=0x0, crop=0x0, printing=<optimized out>, abortCheckCbk=0x0, abortCheckCbkData=0x0, annotDisplayDecideCbk=0x0, annotDisplayDecideCbkData=0x0, copyXRef=<optimized out>)
```
[poc](/uploads/ba61b595e864a7a76dd9f2d2b5d7c7c4/poc)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1017Poppler renders patch 11 of Ghent Output Suite V3.0 not correct2020-12-24T09:41:08ZThomas FreitagPoppler renders patch 11 of Ghent Output Suite V3.0 not correctThe output of "pdftoppm -png -overprint" of 110_defaultcolourspace_x3.pdf is not correct:
![defcpis-1](/uploads/de81bc07d95fc7ba02afe156685d1ac1/defcpis-1.png)
Expected result:
![defcpexpected-1](/uploads/ff9805c85a6d6136b50b9664b6c5c73...The output of "pdftoppm -png -overprint" of 110_defaultcolourspace_x3.pdf is not correct:
![defcpis-1](/uploads/de81bc07d95fc7ba02afe156685d1ac1/defcpis-1.png)
Expected result:
![defcpexpected-1](/uploads/ff9805c85a6d6136b50b9664b6c5c739/defcpexpected-1.png)
![110_defaultcolourspace_x3.pdf](/uploads/45bafab0fb5832cad10e048dc27a16fa/110_defaultcolourspace_x3.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1018Segfault when trying to fill in forms in a pdf2021-01-05T18:17:24ZRaphael NestlerSegfault when trying to fill in forms in a pdfI get a segfault when trying to edit forms in a pdf:
```
>>> bt full
#0 AnnotWidget::generateFieldAppearance(bool*) (this=0x7fffe00bec80, addedDingbatsResource=0x7fffffffc86f) at /usr/src/debug/poppler-20.12.1/poppler/Annot.cc:4934
...I get a segfault when trying to edit forms in a pdf:
```
>>> bt full
#0 AnnotWidget::generateFieldAppearance(bool*) (this=0x7fffe00bec80, addedDingbatsResource=0x7fffffffc86f) at /usr/src/debug/poppler-20.12.1/poppler/Annot.cc:4934
resources = <optimized out>
da = 0x0
appearBuilder = {
appearBuf = 0x555555d7c510
}
success = <optimized out>
appearBuf = <optimized out>
appearDict = <optimized out>
bbox = <optimized out>
resDict = <optimized out>
appearStream = <optimized out>
#1 0x00007ffff019415a in AnnotWidget::updateAppearanceStream() (this=0x7fffe00bec80) at /usr/src/debug/poppler-20.12.1/poppler/Annot.cc:4983
dummyAddDingbatsResource = false
obj1 = {
type = 3758609120,
{
booln = 58,
intg = -266675654,
int64g = 140737221679674,
real = 6.953342632307082e-310,
string = 0x7ffff01ada3a <FormFieldText::setContentCopy(GooString const*)+490>,
cString = 0x7ffff01ada3a <FormFieldText::setContentCopy(GooString const*)+490> "H\213D$(dH+\004%(",
array = 0x7ffff01ada3a <FormFieldText::setContentCopy(GooString const*)+490>,
dict = 0x7ffff01ada3a <FormFieldText::setContentCopy(GooString const*)+490>,
stream = 0x7ffff01ada3a <FormFieldText::setContentCopy(GooString const*)+490>,
ref = {
num = -266675654,
gen = 32767
}
}
}
#2 0x00007ffff01ace82 in FormField::updateChildrenAppearance() (this=<optimized out>) at /usr/src/debug/poppler-20.12.1/poppler/Form.cc:834
i = <optimized out>
#3 FormField::updateChildrenAppearance() (this=0x7fffe00beab0) at /usr/src/debug/poppler-20.12.1/poppler/Form.cc:829
#4 0x00007ffff03e73fc in poppler_form_field_text_set_text(PopplerFormField*, gchar const*) (field=0x7fffe03498a0, text=text@entry=0x5555559d3000 "test") at /usr/src/debug/poppler-20.12.1/glib/poppler-form-field.cc:448
goo_tmp = 0x555555eeafc0
tmp = <optimized out>
length = 8
__PRETTY_FUNCTION__ = "void poppler_form_field_text_set_text(PopplerFormField*, const gchar*)"
#5 0x00007ffff15f6838 in pdf_document_forms_form_field_text_set_text(EvDocumentForms*, EvFormField*, gchar const*) (document=0x555555915f20, field=0x7fffe0355880, text=0x5555559d3000 "test") at ../evince/backend/pdf/ev-poppler.cc:2876
poppler_field = <optimized out>
#6 0x00007ffff7f7e6fc in ev_view_form_field_text_save.part.0.lto_priv.0 (view=0x5555558bf390, widget=<optimized out>) at ../evince/libview/ev-view.c:2584
field_text = <optimized out>
field_region = 0x555555ed3510
field = 0x7fffe0355880
#7 0x00007ffff7f6a9b6 in ev_view_form_field_text_save (widget=<optimized out>, view=<optimized out>) at ../evince/libview/ev-view.c:2621
#8 ev_view_form_field_text_focus_out (widget=<optimized out>, event=<optimized out>, view=<optimized out>) at ../evince/libview/ev-view.c:2622
#9 0x00007ffff75fcf6f in () at /usr/lib/libgtk-3.so.0
#10 0x00007ffff7ea0052 in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#11 0x00007ffff7ec89c5 in () at /usr/lib/libgobject-2.0.so.0
#12 0x00007ffff7ebbbcb in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#13 0x00007ffff7ebcb00 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#14 0x00007ffff78c39f5 in () at /usr/lib/libgtk-3.so.0
#15 0x00007ffff78bf6dc in gtk_widget_send_focus_change () at /usr/lib/libgtk-3.so.0
#16 0x00007ffff78d2777 in () at /usr/lib/libgtk-3.so.0
#17 0x00007ffff78d2dba in () at /usr/lib/libgtk-3.so.0
#18 0x00007ffff7e9e7de in g_cclosure_marshal_VOID__OBJECTv () at /usr/lib/libgobject-2.0.so.0
#19 0x00007ffff7ebc98a in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#20 0x00007ffff7ebcb00 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#21 0x00007ffff7ebc98a in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#22 0x00007ffff7ebcb00 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#23 0x00007ffff78b0ffc in gtk_widget_grab_focus () at /usr/lib/libgtk-3.so.0
#24 0x00007ffff7f74ac9 in ev_view_button_press_event (widget=0x5555558bf390, event=0x7fffe0016400) at ../evince/libview/ev-view.c:5558
view = 0x5555558bf390
#25 0x00007ffff75fd249 in () at /usr/lib/libgtk-3.so.0
#26 0x00007ffff7ebc98a in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#27 0x00007ffff7ebcb00 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#28 0x00007ffff78c39f5 in () at /usr/lib/libgtk-3.so.0
#29 0x00007ffff775be15 in () at /usr/lib/libgtk-3.so.0
#30 0x00007ffff775d16d in gtk_main_do_event () at /usr/lib/libgtk-3.so.0
#31 0x00007ffff74b6413 in () at /usr/lib/libgdk-3.so.0
#32 0x00007ffff7507114 in () at /usr/lib/libgdk-3.so.0
#33 0x00007ffff7daba84 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#34 0x00007ffff7dff9b1 in () at /usr/lib/libglib-2.0.so.0
#35 0x00007ffff7daa2b1 in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#36 0x00007ffff71e2d1e in g_application_run () at /usr/lib/libgio-2.0.so.0
#37 0x000055555556e650 in main (argc=<optimized out>, argv=<optimized out>) at ../evince/shell/main.c:316
application = 0x5555558c0170
context = <optimized out>
error = 0x0
status = <optimized out>
```
The pdf was generated from https://www.dndbeyond.com:
[RoughL_41551338.pdf](/uploads/a4825c32758a5b0348e73bc9696c2c26/RoughL_41551338.pdf)
I originally submitted the bug on https://gitlab.gnome.org/GNOME/evince/-/issues/1532 where I was told to submit it here.
System information:
```
$ lsb_release -a
LSB Version: 1.4
Distributor ID: Arch
Description: Arch Linux
Release: rolling
Codename: n/a
$ evince --version
GNOME Document Viewer 3.38.0
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1019openjp2 is not linked into libpoppler.a2020-12-29T21:54:11ZOlivier Lacroixopenjp2 is not linked into libpoppler.aHello there,
I am using libvips via sharp, and have been trying to add pdf support by recompiling libvips with poppler.
This seemed to work well (ie I was able to process some pdf files), until I received the following for a particular...Hello there,
I am using libvips via sharp, and have been trying to add pdf support by recompiling libvips with poppler.
This seemed to work well (ie I was able to process some pdf files), until I received the following for a particular pdf file at run time:
`nodejs: symbol lookup error: /[...]/node_modules/sharp/build/Release/../../vendor/8.10.5/lib/libvips.so.42: undefined symbol: opj_stream_default_create`
opj_stream_default_create is defined by the openjpeg2 library I believe, and does not appear to have been linked into libpoppler.a
The build script I am using is a modified version of the sharp-libvips one, where openjpeg and poppler are compiled statically. Main modifications are highlighted [here](https://github.com/olivier-lacroix/sharp-libvips/blob/6bbc2cc7ddf6b8dc5910bdd7c80b32a01975e98c/build/lin.sh#L382-L415).
Any idea of what the problem with poppler is ? or (maybe more likely) with my build script :-) ?
Reported at [libvips](https://github.com/libvips/libvips/issues/1944) as well.https://gitlab.freedesktop.org/poppler/poppler/-/issues/1020Rendering issues with some PDF + GObject + Cairo2020-12-30T19:12:12ZJerome FleschRendering issues with some PDF + GObject + CairoHello,
I'm developing [Paperwork](https://openpaper.work) (Python+GTK), and I use Poppler to extract text from PDF files and display them.
On some (rare) PDF files, some of my users have reported getting uncaught exceptions `cairo.Err...Hello,
I'm developing [Paperwork](https://openpaper.work) (Python+GTK), and I use Poppler to extract text from PDF files and display them.
On some (rare) PDF files, some of my users have reported getting uncaught exceptions `cairo.Error: invalid value for a dash setting` when Paperwork tries to render the PDF with Poppler and Cairo. For instance: [ticket #913 on my side](https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/issues/913) ; other users have reported this very same problem too. Weirdly, the PDF is still correctly drawn on screen.
I've narrowed it down to this Python test script: [test.py](/uploads/671dff64370b916c5b96fd1c9c3d9948/test.py).
I've compiled and installed Poppler from Git (master), and I still can reproduce this issue.
The user who opened the ticket on my side [#913](https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/issues/913) has sent me by email a PDF to reproduce the problem. Unfortunately, this PDF contains personal information, so I cannot upload it on this ticket. However, [he has allowed me to share it privately](https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/issues/913#note_885907) with any Poppler developers.
The problem doesn't seem to happen with Evince, which suggests it's related to the GObject Introspection bindings.
Interestingly, if you remove the calls to `cairo_context.save()` and `cairo_context.restore()`, there are still some cairo warnings in the console, but not uncaught exception anymore.
Best regards,https://gitlab.freedesktop.org/poppler/poppler/-/issues/1021stack-overflow in `Gfx` results in Segmentation Fault2021-01-02T21:23:16Zbin24151stack-overflow in `Gfx` results in Segmentation Fault- Version: 20.12.1
- Commit: e1f56258
- How to reproduce: ./pdftops ./poc.pdf /dev/null
The backtrace is:
```
==87508==ERROR: AddressSanitizer: stack-overflow on address 0x7ffdad19dd50 (pc 0x7fa5dfaba70a bp 0x7ffdad1a0320 sp 0x7ffdad19d...- Version: 20.12.1
- Commit: e1f56258
- How to reproduce: ./pdftops ./poc.pdf /dev/null
The backtrace is:
```
==87508==ERROR: AddressSanitizer: stack-overflow on address 0x7ffdad19dd50 (pc 0x7fa5dfaba70a bp 0x7ffdad1a0320 sp 0x7ffdad19dc40 T0)
#0 0x7fa5dfaba709 in buffered_vfprintf /build/glibc-S9d2JN/glibc-2.27/stdio-common/vfprintf.c:2329
#1 0x7fa5dfab7825 in _IO_vfprintf /build/glibc-S9d2JN/glibc-2.27/stdio-common/vfprintf.c:1301
#2 0x44cbc6 in __interceptor_vfprintf (/src/executable/pdftops+0x44cbc6)
#3 0x44ccd6 in fprintf (/src/executable/pdftops+0x44ccd6)
#4 0x525b15 in error(ErrorCategory, long long, char const*, ...) /src/poppler/poppler/Error.cc:76:13
#5 0x991c50 in GfxTilingPattern::parse(Object*, int) /src/poppler/poppler/GfxState.cc:3186:9
#6 0x9911c7 in GfxPattern::parse(GfxResources*, Object*, OutputDev*, GfxState*, int) /src/poppler/poppler/GfxState.cc:3155:19
#7 0x8e7d27 in GfxResources::lookupPattern(char const*, OutputDev*, GfxState*) /src/poppler/poppler/Gfx.cc:389:24
#8 0x8e2fb3 in Gfx::opSetFillColorN(Object*, int) /src/poppler/poppler/Gfx.cc:1542:63
#9 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#10 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#11 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#12 0x8f3b89 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /src/poppler/poppler/Gfx.cc:4767:5
#13 0xa89643 in PreScanOutputDev::tilingPatternFill(GfxState*, Gfx*, Catalog*, Object*, double const*, int, int, Dict*, double const*, double const*, int, int, int, int, double, double) /src/poppler/poppler/PreScanOutputDev.cc:84:14
#14 0x8f7e91 in Gfx::doTilingPatternFill(GfxTilingPattern*, bool, bool, bool) /src/poppler/poppler/Gfx.cc:2180:25
#15 0x8f541e in Gfx::doPatternFill(bool) /src/poppler/poppler/Gfx.cc:1898:9
#16 0x8c308b in Gfx::opFillStroke(Object*, int) /src/poppler/poppler/Gfx.cc:1797:17
#17 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#18 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#19 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#20 0x8f3b89 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /src/poppler/poppler/Gfx.cc:4767:5
#21 0xa89643 in PreScanOutputDev::tilingPatternFill(GfxState*, Gfx*, Catalog*, Object*, double const*, int, int, Dict*, double const*, double const*, int, int, int, int, double, double) /src/poppler/poppler/PreScanOutputDev.cc:84:14
#22 0x8f7e91 in Gfx::doTilingPatternFill(GfxTilingPattern*, bool, bool, bool) /src/poppler/poppler/Gfx.cc:2180:25
#23 0x8f541e in Gfx::doPatternFill(bool) /src/poppler/poppler/Gfx.cc:1898:9
#24 0x8c308b in Gfx::opFillStroke(Object*, int) /src/poppler/poppler/Gfx.cc:1797:17
#25 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#26 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#27 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#28 0x8f3b89 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /src/poppler/poppler/Gfx.cc:4767:5
#29 0xa89643 in PreScanOutputDev::tilingPatternFill(GfxState*, Gfx*, Catalog*, Object*, double const*, int, int, Dict*, double const*, double const*, int, int, int, int, double, double) /src/poppler/poppler/PreScanOutputDev.cc:84:14
#30 0x8f7e91 in Gfx::doTilingPatternFill(GfxTilingPattern*, bool, bool, bool) /src/poppler/poppler/Gfx.cc:2180:25
#31 0x8f541e in Gfx::doPatternFill(bool) /src/poppler/poppler/Gfx.cc:1898:9
#32 0x8c308b in Gfx::opFillStroke(Object*, int) /src/poppler/poppler/Gfx.cc:1797:17
#33 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#34 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#35 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#36 0x8f3b89 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /src/poppler/poppler/Gfx.cc:4767:5
#37 0xa89643 in PreScanOutputDev::tilingPatternFill(GfxState*, Gfx*, Catalog*, Object*, double const*, int, int, Dict*, double const*, double const*, int, int, int, int, double, double) /src/poppler/poppler/PreScanOutputDev.cc:84:14
#38 0x8f7e91 in Gfx::doTilingPatternFill(GfxTilingPattern*, bool, bool, bool) /src/poppler/poppler/Gfx.cc:2180:25
#39 0x8f541e in Gfx::doPatternFill(bool) /src/poppler/poppler/Gfx.cc:1898:9
#40 0x8c308b in Gfx::opFillStroke(Object*, int) /src/poppler/poppler/Gfx.cc:1797:17
#41 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#42 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#43 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#44 0x8f3b89 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /src/poppler/poppler/Gfx.cc:4767:5
#45 0xa89643 in PreScanOutputDev::tilingPatternFill(GfxState*, Gfx*, Catalog*, Object*, double const*, int, int, Dict*, double const*, double const*, int, int, int, int, double, double) /src/poppler/poppler/PreScanOutputDev.cc:84:14
#46 0x8f7e91 in Gfx::doTilingPatternFill(GfxTilingPattern*, bool, bool, bool) /src/poppler/poppler/Gfx.cc:2180:25
#47 0x8f541e in Gfx::doPatternFill(bool) /src/poppler/poppler/Gfx.cc:1898:9
#48 0x8c308b in Gfx::opFillStroke(Object*, int) /src/poppler/poppler/Gfx.cc:1797:17
#49 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#50 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#51 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#52 0x8f3b89 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /src/poppler/poppler/Gfx.cc:4767:5
#53 0xa89643 in PreScanOutputDev::tilingPatternFill(GfxState*, Gfx*, Catalog*, Object*, double const*, int, int, Dict*, double const*, double const*, int, int, int, int, double, double) /src/poppler/poppler/PreScanOutputDev.cc:84:14
#54 0x8f7e91 in Gfx::doTilingPatternFill(GfxTilingPattern*, bool, bool, bool) /src/poppler/poppler/Gfx.cc:2180:25
#55 0x8f541e in Gfx::doPatternFill(bool) /src/poppler/poppler/Gfx.cc:1898:9
#56 0x8c308b in Gfx::opFillStroke(Object*, int) /src/poppler/poppler/Gfx.cc:1797:17
#57 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#58 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#59 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#60 0x8f3b89 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /src/poppler/poppler/Gfx.cc:4767:5
#61 0xa89643 in PreScanOutputDev::tilingPatternFill(GfxState*, Gfx*, Catalog*, Object*, double const*, int, int, Dict*, double const*, double const*, int, int, int, int, double, double) /src/poppler/poppler/PreScanOutputDev.cc:84:14
#62 0x8f7e91 in Gfx::doTilingPatternFill(GfxTilingPattern*, bool, bool, bool) /src/poppler/poppler/Gfx.cc:2180:25
#63 0x8f541e in Gfx::doPatternFill(bool) /src/poppler/poppler/Gfx.cc:1898:9
#64 0x8c308b in Gfx::opFillStroke(Object*, int) /src/poppler/poppler/Gfx.cc:1797:17
#65 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#66 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#67 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#68 0x8f3b89 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /src/poppler/poppler/Gfx.cc:4767:5
#69 0xa89643 in PreScanOutputDev::tilingPatternFill(GfxState*, Gfx*, Catalog*, Object*, double const*, int, int, Dict*, double const*, double const*, int, int, int, int, double, double) /src/poppler/poppler/PreScanOutputDev.cc:84:14
#70 0x8f7e91 in Gfx::doTilingPatternFill(GfxTilingPattern*, bool, bool, bool) /src/poppler/poppler/Gfx.cc:2180:25
#71 0x8f541e in Gfx::doPatternFill(bool) /src/poppler/poppler/Gfx.cc:1898:9
#72 0x8c308b in Gfx::opFillStroke(Object*, int) /src/poppler/poppler/Gfx.cc:1797:17
#73 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#74 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#75 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#76 0x8f3b89 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /src/poppler/poppler/Gfx.cc:4767:5
#77 0xa89643 in PreScanOutputDev::tilingPatternFill(GfxState*, Gfx*, Catalog*, Object*, double const*, int, int, Dict*, double const*, double const*, int, int, int, int, double, double) /src/poppler/poppler/PreScanOutputDev.cc:84:14
#78 0x8f7e91 in Gfx::doTilingPatternFill(GfxTilingPattern*, bool, bool, bool) /src/poppler/poppler/Gfx.cc:2180:25
#79 0x8f541e in Gfx::doPatternFill(bool) /src/poppler/poppler/Gfx.cc:1898:9
#80 0x8c308b in Gfx::opFillStroke(Object*, int) /src/poppler/poppler/Gfx.cc:1797:17
#81 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#82 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#83 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#84 0x8f3b89 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /src/poppler/poppler/Gfx.cc:4767:5
#85 0xa89643 in PreScanOutputDev::tilingPatternFill(GfxState*, Gfx*, Catalog*, Object*, double const*, int, int, Dict*, double const*, double const*, int, int, int, int, double, double) /src/poppler/poppler/PreScanOutputDev.cc:84:14
#86 0x8f7e91 in Gfx::doTilingPatternFill(GfxTilingPattern*, bool, bool, bool) /src/poppler/poppler/Gfx.cc:2180:25
#87 0x8f541e in Gfx::doPatternFill(bool) /src/poppler/poppler/Gfx.cc:1898:9
#88 0x8c308b in Gfx::opFillStroke(Object*, int) /src/poppler/poppler/Gfx.cc:1797:17
#89 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#90 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#91 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#92 0x8f3b89 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /src/poppler/poppler/Gfx.cc:4767:5
#93 0xa89643 in PreScanOutputDev::tilingPatternFill(GfxState*, Gfx*, Catalog*, Object*, double const*, int, int, Dict*, double const*, double const*, int, int, int, int, double, double) /src/poppler/poppler/PreScanOutputDev.cc:84:14
#94 0x8f7e91 in Gfx::doTilingPatternFill(GfxTilingPattern*, bool, bool, bool) /src/poppler/poppler/Gfx.cc:2180:25
#95 0x8f541e in Gfx::doPatternFill(bool) /src/poppler/poppler/Gfx.cc:1898:9
#96 0x8c308b in Gfx::opFillStroke(Object*, int) /src/poppler/poppler/Gfx.cc:1797:17
#97 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#98 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#99 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#100 0x8f3b89 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /src/poppler/poppler/Gfx.cc:4767:5
#101 0xa89643 in PreScanOutputDev::tilingPatternFill(GfxState*, Gfx*, Catalog*, Object*, double const*, int, int, Dict*, double const*, double const*, int, int, int, int, double, double) /src/poppler/poppler/PreScanOutputDev.cc:84:14
#102 0x8f7e91 in Gfx::doTilingPatternFill(GfxTilingPattern*, bool, bool, bool) /src/poppler/poppler/Gfx.cc:2180:25
#103 0x8f541e in Gfx::doPatternFill(bool) /src/poppler/poppler/Gfx.cc:1898:9
#104 0x8c308b in Gfx::opFillStroke(Object*, int) /src/poppler/poppler/Gfx.cc:1797:17
#105 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#106 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#107 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#108 0x8f3b89 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /src/poppler/poppler/Gfx.cc:4767:5
#109 0xa89643 in PreScanOutputDev::tilingPatternFill(GfxState*, Gfx*, Catalog*, Object*, double const*, int, int, Dict*, double const*, double const*, int, int, int, int, double, double) /src/poppler/poppler/PreScanOutputDev.cc:84:14
#110 0x8f7e91 in Gfx::doTilingPatternFill(GfxTilingPattern*, bool, bool, bool) /src/poppler/poppler/Gfx.cc:2180:25
#111 0x8f541e in Gfx::doPatternFill(bool) /src/poppler/poppler/Gfx.cc:1898:9
#112 0x8c308b in Gfx::opFillStroke(Object*, int) /src/poppler/poppler/Gfx.cc:1797:17
#113 0x8f0006 in Gfx::execOp(Object*, Object*, int) /src/poppler/poppler/Gfx.cc:802:5
#114 0x8ee669 in Gfx::go(bool) /src/poppler/poppler/Gfx.cc:679:13
#115 0x8edc20 in Gfx::display(Object*, bool) /src/poppler/poppler/Gfx.cc:640:5
#116 0x8f3b89 in Gfx::drawForm(Object*, Dict*, double const*, double const*, bool, bool, GfxColorSpace*, bool, bool, bool, Function*, GfxColor*) /src/poppler/poppler/Gfx.cc:4767:5
#117 0xa89643 in PreScanOutputDev::tilingPatternFill(GfxState*, Gfx*, Catalog*, Object*, double const*, int, int, Dict*, double const*, double const*, int, int, int, int, double, double) /src/poppler/poppler/PreScanOutputDev.cc:84:14
...
```
[poc.pdf](/uploads/5d319eec3de201ca2b0845feebfdb2db/poc.pdf)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1022Invalid Memory Access in ` Splash::pipeRun` which results in Segmentation Fault2022-11-29T05:26:08Zbin24151Invalid Memory Access in ` Splash::pipeRun` which results in Segmentation Fault- Version: 20.12.1
- Commit: e1f56258
- How to reproduce: ./pdftops ./poc.pdf /dev/null
The backtrace is:
```
==79548==ERROR: AddressSanitizer: SEGV on unknown address 0x633f8001da68 (pc 0x00000071f9a6 bp 0x7ffea1e3ea60 sp 0x7ffea1e3e8...- Version: 20.12.1
- Commit: e1f56258
- How to reproduce: ./pdftops ./poc.pdf /dev/null
The backtrace is:
```
==79548==ERROR: AddressSanitizer: SEGV on unknown address 0x633f8001da68 (pc 0x00000071f9a6 bp 0x7ffea1e3ea60 sp 0x7ffea1e3e8c0 T0)
==79548==The signal is caused by a READ memory access.
#0 0x71f9a5 in Splash::pipeRun(SplashPipe*) /src/poppler_latest/splash/Splash.cc:433:24
#1 0x782e48 in Splash::drawSpan(SplashPipe*, int, int, int, bool) /src/poppler_latest/splash/Splash.cc:1339:13
#2 0x743645 in Splash::fillWithPattern(SplashPath*, bool, SplashPattern*, double) /src/poppler_latest/splash/Splash.cc
#3 0x6e71cf in SplashOutputDev::fill(GfxState*) /src/poppler_latest/poppler/SplashOutputDev.cc:2110:13
#4 0x8d3907 in Gfx::opCloseFillStroke(Object*, int) /src/poppler_latest/poppler/Gfx.cc:1823:22
#5 0x8f3866 in Gfx::execOp(Object*, Object*, int) /src/poppler_latest/poppler/Gfx.cc:802:5
#6 0x8f1ec9 in Gfx::go(bool) /src/poppler_latest/poppler/Gfx.cc:679:13
#7 0x8f1480 in Gfx::display(Object*, bool) /src/poppler_latest/poppler/Gfx.cc:640:5
#8 0x916428 in Gfx::doShowText(GooString const*) /src/poppler_latest/poppler/Gfx.cc:3923:25
#9 0x8d2468 in Gfx::opShowText(Object*, int) /src/poppler_latest/poppler/Gfx.cc:3709:5
#10 0x8f3866 in Gfx::execOp(Object*, Object*, int) /src/poppler_latest/poppler/Gfx.cc:802:5
#11 0x8f1ec9 in Gfx::go(bool) /src/poppler_latest/poppler/Gfx.cc:679:13
#12 0x8f1480 in Gfx::display(Object*, bool) /src/poppler_latest/poppler/Gfx.cc:640:5
#13 0xa7dc5f in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /src/poppler_latest/poppler/Page.cc:576:14
#14 0x669e81 in PSOutputDev::checkPageSlice(Page*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*) /src/poppler_latest/poppler/PSOutputDev.cc:3252:15
#15 0xa7d958 in Page::displaySlice(OutputDev*, double, double, int, bool, bool, int, int, int, int, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /src/poppler_latest/poppler/Page.cc:562:15
#16 0xa7d7de in Page::display(OutputDev*, double, double, int, bool, bool, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /src/poppler_latest/poppler/Page.cc:521:5
#17 0x54b920 in PDFDoc::displayPage(OutputDev*, int, double, double, int, bool, bool, bool, bool (*)(void*), void*, bool (*)(Annot*, void*), void*, bool) /src/poppler_latest/poppler/PDFDoc.cc:639:24
#18 0x5219bc in main /src/poppler_latest/utils/pdftops.cc:515:18
#19 0x7fc888708bf6 in __libc_start_main /build/glibc-S9d2JN/glibc-2.27/csu/../csu/libc-start.c:310
#20 0x420439 in _start (/src/executable/pdftops_latest+0x420439)
```
[poc](/uploads/470460f08c900fde55047e5b86c70290/poc)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1023Build poppler 20.12 with msvc 2017 in windows error2021-01-05T07:19:43Zs0lut1onBuild poppler 20.12 with msvc 2017 in windows errorI try build poppler 20.12 with msvc 2017 in windows 10 and it work with poppler-cpp. But when I build with poppler-qt5 it return error:
> Error C2491 'Poppler::OptContentModel::staticMetaObject': definition of dllimport static data memb...I try build poppler 20.12 with msvc 2017 in windows 10 and it work with poppler-cpp. But when I build with poppler-qt5 it return error:
> Error C2491 'Poppler::OptContentModel::staticMetaObject': definition of dllimport static data member not allowed poppler-qt5
> poppler-20.12.1\build\qt5\src\poppler-qt5_autogen\include_Release\EWIEGA46WW\moc_poppler-optcontent.cpp 65
I have try to add:
> #ifdef CURRENT_MODULE
> #define DLLIMPORTEXPORT _declspec(dllexport)
> #else
> #define DLLIMPORTEXPORT _declspec(dllimport)
> #endif
But nothing work. Can someone help me with this ?https://gitlab.freedesktop.org/poppler/poppler/-/issues/1024Not able to apply changes in pdf forms2021-01-05T11:13:11ZRaphael NestlerNot able to apply changes in pdf formsWhen editing the forms in the pdf from https://www.dndbeyond.com: [RoughL_41551338.pdf](https://gitlab.freedesktop.org/poppler/poppler/uploads/a4825c32758a5b0348e73bc9696c2c26/RoughL_41551338.pdf) the changes don't update the appearance ...When editing the forms in the pdf from https://www.dndbeyond.com: [RoughL_41551338.pdf](https://gitlab.freedesktop.org/poppler/poppler/uploads/a4825c32758a5b0348e73bc9696c2c26/RoughL_41551338.pdf) the changes don't update the appearance (but are changed when trying to edit the same field again).
If one then saves the pdf and loads it again the changed fields appear empty, but on editing shows the changed text.
Tested editors: evince and Okular.
The pdf is handled fine by the built in pdf viewer of Firefox.
### System Information
```
$ lsb_release -a
LSB Version: 1.4
Distributor ID: Arch
Description: Arch Linux
Release: rolling
Codename: n/a
$ pacman -Q poppler
poppler 21.01.0-1
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1025pdfinfo -struct-text and nested nonstructural marked content2021-01-06T00:09:43ZRenkemapdfinfo -struct-text and nested nonstructural marked contentI ran into a problem with `pdfinfo -struct-text`, which I think is caused by
a bug.
The [attached file](/uploads/6121203dd6488d57b26b30c22e7a2f11/poppler-bug.pdf) demonstrates the problem. Extracting the textual content gives this resu...I ran into a problem with `pdfinfo -struct-text`, which I think is caused by
a bug.
The [attached file](/uploads/6121203dd6488d57b26b30c22e7a2f11/poppler-bug.pdf) demonstrates the problem. Extracting the textual content gives this result:
```
$ pdfinfo -struct-text poppler-bug.pdf
Document
P (block)
"xxxyyy"
```
where the expected output would be:
```
Document
P (block)
"xxxyyyzzz"
```
The relevant part of the attached pdf is the page content stream:
```
3 0 obj
<< /Length 215 >>
stream
1 0 0 1 48.272 46.73 cm
/P <</MCID 0>> BDC 1 0 0 1 -48.272 -46.73 cm
BT
/F1 9.96264 Tf
1 0 0 1 48.272 46.73 Tm [(xxx)]TJ
/Span << >> BDC
1 0 0 1 64.046 46.73 Tm [(yyy)]TJ
EMC
1 0 0 1 79.82 46.73 Tm [(zzz)]TJ
ET
EMC
endstream
```
As you see, the problem is caused by a nonstructural marked content sequence
(the `/Span`) inside a marked content item (marked with `/P`). This is
explicitly allowed by the specification (see §14.7.4.1, p.560), yet somehow
cuts short pdfinfo’s text extraction function.
This is on debian unstable, with the following version:
```
$ pdfinfo -v
pdfinfo version 20.09.0
Copyright 2005-2020 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2011 Glyph & Cog, LLC
```https://gitlab.freedesktop.org/poppler/poppler/-/issues/1026"some font thing failed" - text simply not displayed2021-02-22T03:45:38ZAndy Hairston"some font thing failed" - text simply not displayedIn some PDFs, I get an error message "some font thing failed", and the resulting image simply doesn't have the text from the PDF. These are credit card statements from Citi, so I can't post the PDF here, and I haven't seen this issue on ...In some PDFs, I get an error message "some font thing failed", and the resulting image simply doesn't have the text from the PDF. These are credit card statements from Citi, so I can't post the PDF here, and I haven't seen this issue on other PDFs (that I know of - missing text is hard to notice).
Running pdftocairo gives these errors:
Syntax Error: Embedded font file may be invalid (several times, right at the beginning)
Syntax Error: could not create type1 face (hundreds of times)
some font thing failed (hundreds of times)
Running pdftoppm gives these errors:
Syntax Error: Embedded font file may be invalid
Syntax Error: Embedded font file may be invalid
Syntax Error: Embedded font file may be invalid
Syntax Error: Embedded font file may be invalid
Syntax Error: Couldn't create a font for 'F5_Otl'
Syntax Error: Couldn't create a font for 'F6_Otl'
Syntax Error: Couldn't create a font for 'F7_Otl'
Syntax Error: Couldn't create a font for 'F8_Otl'
The outputs from these are attached.
pdffonts -subst reports this:
Syntax Error: Embedded font file may be invalid
Syntax Error: Embedded font file may be invalid
Syntax Error: Embedded font file may be invalid
Syntax Error: Embedded font file may be invalid
name object ID substitute font substitute font file
------------------------------------ --------- ------------------------------------ ------------------------------------
While I wouldn't expect poppler to be able to guess at what an invalid embedded font should look like, I *would* expect it to replace it with something else, so at least the text would show up.
![cairo-output-5](/uploads/87df9b364b48bdf8bb011b5ab3cfc88f/cairo-output-5.png)
![splash-output-5](/uploads/164aca961539969e78d80a9cf6e2717d/splash-output-5.png)https://gitlab.freedesktop.org/poppler/poppler/-/issues/1027Selection doesn't flow properly across lines in Evince2021-07-17T00:39:39Zgabrc52Selection doesn't flow properly across lines in EvinceI can reproduce this bug in Evince 3.38.0, and I was asked to report here. [Original bug](https://gitlab.gnome.org/GNOME/evince/-/issues/1546)
I have a specific PDF where selecting doesn't flow properly across lines (see the following G...I can reproduce this bug in Evince 3.38.0, and I was asked to report here. [Original bug](https://gitlab.gnome.org/GNOME/evince/-/issues/1546)
I have a specific PDF where selecting doesn't flow properly across lines (see the following GIF):
![bug gif](https://gitlab.gnome.org/GNOME/evince/uploads/575147f3e5881ae58792b40ff4ebd348/bug.gif)
This is the PDF where it's possible to reproduce the bug.
[bug.pdf](https://gitlab.gnome.org/GNOME/evince/uploads/b015446908387125af3327b66f64ff98/bug.pdf)