Package Details: pdf2djvu 0.9.19-5

Git Clone URL: https://aur.archlinux.org/pdf2djvu.git (read-only, click to copy)
Package Base: pdf2djvu
Description: Creates DjVu files from PDF files
Upstream URL: https://jwilk.net/software/pdf2djvu
Licenses: GPL
Submitter: arojas
Maintainer: blueowl
Last Packager: blueowl
Votes: 7
Popularity: 0.001817
First Submitted: 2021-05-08 09:21 (UTC)
Last Updated: 2026-01-20 22:22 (UTC)

Latest Comments

1 2 3 Next › Last »

simona commented on 2026-01-21 20:42 (UTC)

python-nose 1.3.7-19 and python-setuptools 1:80.9.0-4

blueowl commented on 2026-01-21 16:23 (UTC) (edited on 2026-01-21 16:23 (UTC) by blueowl)

It works just fine for me, @simona.
Please make sure your system is up-to-date (pacman -Syu), mainly these pakages
python-nose 1.3.7-19
python-setuptools 1:80.9.0-4

simona commented on 2026-01-20 22:50 (UTC)

Traceback (most recent call last):
File "<string>", line 1, in <module>
import nose; nose.main()
~^^
File "/usr/lib/python3.14/site-packages/nose/core.py", line 118, in init
unittest.TestProgram.init(
~^
self, module=module, defaultTest=defaultTest,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
argv=argv, testRunner=testRunner, testLoader=testLoader,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**extra_args)
^^^^^^^^^^^^^
File "/usr/lib/python3.14/unittest/main.py", line 103, in init
self.parseArgs(argv)
^^^^^^
File "/usr/lib/python3.14/site-packages/nose/core.py", line 145, in parseArgs
self.config.configure(argv, doc=self.usage())
~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/site-packages/nose/config.py", line 281, in configure
options, args = self._parseArgs(argv, cfg_files)
~^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/site-packages/nose/config.py", line 268, in _parseArgs
self.getParser(), self.configSection, file_error=warn_sometimes)
^^
File "/usr/lib/python3.14/site-packages/nose/config.py", line 590, in getParser
self.plugins.loadPlugins()
^^
File "/usr/lib/python3.14/site-packages/nose/plugins/manager.py", line 381, in loadPlugins
for ep in iter_entry_points(entry_point):
~^^^^^^^^^^^^^
File "/usr/lib/python3.14/site-packages/pkg_resources/init.py", line 741, in <genexpr>
for entry in dist.get_entry_map(group).values()
^^^^^^^
File "/usr/lib/python3.14/site-packages/pkg_resources/init.py", line 3216, in get_entry_map
self._ep_map = EntryPoint.parse_map(
^
self._get_metadata('entry_points.txt'), self
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/lib/python3.14/site-packages/pkg_resources/init.py", line 2884, in parse_map
maps[group] = cls.parse_group(group, lines, dist)
~~~^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/site-packages/pkg_resources/init.py", line 2854, in parse_group
raise ValueError("Invalid group name", group)

gamesguru commented on 2026-01-14 03:11 (UTC) (edited on 2026-01-19 02:27 (UTC) by gamesguru)

This package is broken as of 1/13/26 due to an update in Poppler (libpoppler.so) that Arch rolled out this morning.

$ pdf2djvu
pdf2djvu: error while loading shared libraries: libpoppler.so.155: cannot open shared object file: No such file or directory

As a temporary workaround, you can try to install 25.12.0-1 (I am fairly confident 26.01.0-1 is the first broken version).

The below patch will also suffice.

You can find a similar one here, I suggest switching your PKGBUILD to use his instead: https://github.com/FriedrichFroebel/pdf2djvu

# 1. Clone the AUR package
git clone https://aur.archlinux.org/pdf2djvu.git
cd pdf2djvu
# or if using yay and fixing a failed install:
#   cd ~/.cache/yay/pdf2djvu

# 2. Download the sources
makepkg -o

# 3. Create the patch file
cat << 'EOF' > pdf2djvu-poppler-26.01.0.patch
--- a/pdf-backend.hh
+++ b/pdf-backend.hh
@@ -49,6 +49,8 @@
 #include <splash/SplashPath.h>
 #include <splash/SplashTypes.h>

+#undef POPPLER_VERSION
+#define POPPLER_VERSION 260100
 #include "i18n.hh"

 namespace pdf
--- a/pdf-backend.cc
+++ b/pdf-backend.cc
@@ -181,7 +181,7 @@ static bool annotations_callback(pdf::ant::Annotation *annotation, void *user_da
     border_colors.push_back("");
     return true;
   }
-  const double *values = color->getValues();
+  const double *values = color->getValues().data();
   switch (color->getSpace())
   {
   case pdf::ant::Color::colorTransparent:
@@ -499,7 +499,7 @@ bool pdf::get_glyph(splash::Splash *splash, splash::Font *font,
   if (font == nullptr)
     return false;
   splash::ClipResult clip_result;
-  if (!font->getGlyph(code, 0, 0, bitmap, static_cast<int>(x), static_cast<int>(y), splash->getClip(), &clip_result))
+  if (!font->getGlyph(code, 0, 0, bitmap, static_cast<int>(x), static_cast<int>(y), const_cast<SplashClip*>(&splash->getClip()), &clip_result))
     return false;
   return (clip_result != splashClipAllOutside);
 }
--- a/system.hh
+++ b/system.hh
@@ -223,7 +223,7 @@ namespace encoding
   protected:
     const std::string &string;
   public:
-    explicit proxy<from, to>(const std::string &string)
+    explicit proxy(const std::string &string)
     : string(string)
     { }
     friend std::ostream &operator << <>(std::ostream &, const proxy<from, to> &);
--- a/pdf-unicode.cc
+++ b/pdf-unicode.cc
@@ -49,7 +49,7 @@ std::string pdf::string_as_utf8(const pdf::String *string)
      */
     const static uint32_t replacement_character = 0xFFFD;
     const char *cstring = pdf::get_c_string(string);
-    size_t clength = string->getLength();
+    size_t clength = string->size();
     std::ostringstream stream;
     if (clength >= 2 && (cstring[0] & 0xFF) == 0xFE && (cstring[1] & 0xFF) == 0xFF) {
         /* UTF-16-BE Byte Order Mark */
EOF

# 4. Apply the patch
cd src/pdf2djvu-0.9.19
git apply ../../pdf2djvu-poppler-26.01.0.patch

# 5. Build and install
cd ../..
makepkg -e -si

simona commented on 2026-01-13 19:05 (UTC)

main.cc:730:57: error: cannot convert ‘std::unique_ptr<LinkAction>’ to ‘std::unique_ptr<LinkAction>::pointer’ {aka ‘LinkAction’}
730 |           link_action.reset(pdf::link::Action::parseDest(&destination));
|                             ^~
|                                                         |
|                                                         std::unique_ptr<LinkAction>
/usr/include/c++/15.2.1/bits/unique_ptr.h:507:21: note: initializing argument 1 of ‘void std::unique_ptr<_Tp, _Dp>::reset(pointer) [with _Tp = LinkAction; _Dp = std::default_delete<LinkAction>; pointer = LinkAction]’
507 |       reset(pointer __p = pointer()) noexcept
|             ^
main.cc:738:59: error: cannot convert ‘std::unique_ptr<LinkAction>’ to ‘std::unique_ptr<LinkAction>::pointer’ {aka ‘LinkAction’}
738 |           link_action.reset(pdf::link::Action::parseAction(&destination));
|                             ^~~~
|                                                           |
|                                                           std::unique_ptr<LinkAction>
/usr/include/c++/15.2.1/bits/unique_ptr.h:507:21: note: initializing argument 1 of ‘void std::unique_ptr<_Tp, _Dp>::reset(pointer) [with _Tp = LinkAction; _Dp = std::default_delete<LinkAction>; pointer = LinkAction]’
507 |       reset(pointer __p = pointer()) noexcept
|             ^
cc1plus: some warnings being treated as errors
make: *** [<incorporato>: main.o] Error 1
==> ERRORE: Si è verificato un errore in build().
</ode>

slaskerwerder commented on 2026-01-09 16:32 (UTC)

The patch below fixed my build. Please update @blueowl

Nickolay commented on 2025-11-30 15:00 (UTC)

  1. Add patch file to add support poppler v24/25 support
diff --git a/main.cc b/main.cc
index 1d9ab4f..252d617 100644
--- a/main.cc
+++ b/main.cc
@@ -528,6 +528,11 @@ public:
     case actionResetForm:
       debug(1) << _("Warning: Unable to convert link with a reset-form action") << std::endl;
       return;
+#endif
+#if POPPLER_VERSION >= 241000
+    case actionSubmitForm:
+      debug(1) << _("Warning: Unable to convert link with a submit-form action") << std::endl;
+      return;
 #endif
     case actionUnknown:
     default:
diff --git a/pdf-backend.cc b/pdf-backend.cc
index bb89c57..51943e6 100644
--- a/pdf-backend.cc
+++ b/pdf-backend.cc
@@ -181,7 +181,11 @@ static bool annotations_callback(pdf::ant::Annotation *annotation, void *user_da
     border_colors.push_back("");
     return true;
   }
+#if POPPLER_VERSION > 250800
+  const double *values = color->getValues().data();
+#else
   const double *values = color->getValues();
+#endif
   switch (color->getSpace())
   {
   case pdf::ant::Color::colorTransparent:
diff --git a/pdf-unicode.cc b/pdf-unicode.cc
index 84a166d..d60560f 100644
--- a/pdf-unicode.cc
+++ b/pdf-unicode.cc
@@ -49,7 +49,11 @@ std::string pdf::string_as_utf8(const pdf::String *string)
      */
     const static uint32_t replacement_character = 0xFFFD;
     const char *cstring = pdf::get_c_string(string);
+#if POPPLER_VERSION > 251000
+    size_t clength = string->size();
+#else
     size_t clength = string->getLength();
+#endif
     std::ostringstream stream;
     if (clength >= 2 && (cstring[0] & 0xFF) == 0xFE && (cstring[1] & 0xFF) == 0xFF) {
         /* UTF-16-BE Byte Order Mark */

  1. Update the PKGBUILD file
diff --git a/PKGBUILD b/PKGBUILD
index 92a2b01..af7a8a0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,11 +16,11 @@ checkdepends=('python-nose' 'poppler-data')
 source=(
   "https://github.com/jwilk/pdf2djvu/releases/download/${pkgver}/pdf2djvu-${pkgver}.tar.xz"
   "pdf2djvu-tests-python-3.patch"
+  "pdf2djvu-poppler-24-and-25-support.patch"
 )
-sha256sums=(
-  'eb45a480131594079f7fe84df30e4a5d0686f7a8049dc7084eebe22acc37aa9a'
-  'fe6f45c09dee733c7b96a68556e635a47e1faf69bb47aca35599dc6117d22dc2'
-)
+sha256sums=('eb45a480131594079f7fe84df30e4a5d0686f7a8049dc7084eebe22acc37aa9a'
+            'fe6f45c09dee733c7b96a68556e635a47e1faf69bb47aca35599dc6117d22dc2'
+            '83b6a9380004c6ac71d558f93791f45ef7026b3e502b1dd61f89a4b04a9bcd90')

 prepare() {
   # Migrate tests to Python 3
@@ -35,6 +35,9 @@ prepare() {

   # fix Python removing pipes module (replace it with shlex)
   sed -i 's|pipes|shlex|g' "$srcdir"/${pkgname}-${pkgver}/tests/tools.py
+
+  # Add popler v25 support
+  patch -d  "$srcdir"/${pkgname}-${pkgver} -p1 < "$srcdir"/pdf2djvu-poppler-24-and-25-support.patch
 }

 build() {

diegobiavati commented on 2025-11-13 17:56 (UTC) (edited on 2025-11-18 10:25 (UTC) by diegobiavati)

In file included from debug.hh:23,
                 from pdf-backend.cc:39:
system.hh:226:29: warning: template-id not allowed for constructor in C++20 [-Wtemplate-id-cdtor]
  226 |     explicit proxy<from, to>(const std::string &string)
      |                             ^
system.hh:226:29: note: remove the ‘< >’
pdf-backend.cc: In function ‘bool annotations_callback(pdf::ant::Annotation*, void*)’:
pdf-backend.cc:184:42: error: cannot convert ‘const std::array<double, 4>’ to ‘const double*’ in initialization
  184 |   const double *values = color->getValues();
      |                          ~~~~~~~~~~~~~~~~^~
      |                                          |
      |                                          const std::array<double, 4>
make: *** [<embutido>: pdf-backend.o] Error 1
==> ERRO: Uma falha ocorreu em build().
    Abortando...
 -> error making: pdf2djvu-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
pdf2djvu - exit status 4

psyomn commented on 2025-04-11 23:13 (UTC)

FWIW, the post below did fix my build as well. (Thank you).

frankspace commented on 2025-02-09 22:54 (UTC)

Python has removed the pipes module, but it's easy to fix by adding the following to the prepare() section:

  # fix python removing pipes module, replace with shlex
  sed -i 's|pipes|shlex|g' "$srcdir"/${pkgname}-${pkgver}/tests/tools.py