poppler issueshttps://gitlab.freedesktop.org/poppler/poppler/-/issues2020-10-02T22:25:28Zhttps://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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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.