Cannot save PDFs due to PikePDF incompatibility, solved & patched upstream

Bug #2047758 reported by Jens

This bug report will be marked for expiration in 27 days if no further activity occurs. (find out why)

12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pdfarranger (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

I am using Ubuntu 22.04 LTS with KDE desktop on a standard i5-4570 Haswell chipset based PC.
I have all available updates applied as of now.

My PDF arranger is 1.8.2, and uses libqpdf 11.6.4 and pikepdf 8.10.1.
And apparently using libqpdf 11 is the problem, it works with libqpdf 10.

Since quite a while (months?), I cannot save merged PDFs in PDFarranger any more.

Whenever I try to save a PDF file, I get an error saying
"Use Pikepdf.Pdf.pages interface to copy pages from one PDF to another."
and nothing is saved.

The situation seems to be explained, and a solution patch provided, here:
https://github.com/pdfarranger/pdfarranger/issues/715

Can we please have an update for the PDF arranger LTS package?

Thank you! :-)

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

Thanks for reporting the bug.

I am seeing the only libqpdf available in Jammy is "libqdf28" which has a version of "10.6.3-1".
There is no "libqpdf 11.6.4" in Jammy. Can you please check and confirm if you have installed libqpdf 11.6.4 from some other source.

I am marking this bug as Incomplete, please change the status back to New when reply with the information.

Changed in pdfarranger (Ubuntu):
status: New → Incomplete
Revision history for this message
Jens (jens-launchpad-net) wrote :

Hello,
"apt policy libqpdf28" shows me version 10.6.3-1 from archive.ubuntu.com, I have nothing else installed.
The "About" page in PDFarranger 1.9.2 shows it was built with libqpdf 11.6.4, GTK 3.24.33 and Python 3.10.12.

Is this statically linked?

Thanks,
Jens

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote (last edit ):

Thanks for the information.
So, it seems you have pdfarranger from somewhere else other than Ubuntu sources.
You can see at https://launchpad.net/ubuntu/+source/pdfarranger that Jammy has pdfarranger 1.8.2.

I also tested on my Jammy and attaching the screenshot of the "About" for your reference.
Can you please check what pdfarranger you have.

Screenshot:

Revision history for this message
Jens (jens-launchpad-net) wrote :

Actually, I was mistaken. Sorry for the confusion, this was a typo.

I do have pdfarranger 1.8.2 (one eight two) installed, but (!) built against libqpdf 11.6.4, it seems. See attached image.

I also have libqpdf 10.6.3-1 installed as a package from Jammy.

So why is my pdfarranger (incorrectly) using libqpdf 11?

Revision history for this message
Fabio M. Panico (fbugnon) wrote :

Hi, I would like to say that I'm facing the same problem. Hope it's ok to add this comment into this bug report.

I recently made a fresh install of ubuntu 22.04-04. And when trying to combine 2 pdfs, PDF-Arranger gives me this error: "use pikepdf.PDF.pages interface to copy pages from one PDF to another"

Installed versions are:
pdfarranger 1.8.2-1
libqpdf28 10.6.3-1

I don't know to tell if pdfarranger is using this libqpdf or another version, but if someone could explain I'm willing to do it.

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

I have been trying to reproduce the issue on Jammy and I could not. And, I also checked for libqpdf, 11.6.4 has never been in Jammy.

Lets chech few things, pdfarranger depends pikepdf. Can you please run these 2 commands and paste the output:

1. sudo find / -name "libqpdf*.so*" 2>/dev/null
2. ldd /usr/lib/python3/dist-packages/pikepdf/*.so

These should show the libqpdf version you have and which one pikepdf is trying to use.

Revision history for this message
Jens (jens-launchpad-net) wrote :

First and foremost, thank you for your support!
I think I have found the root issue, but I have no idea how I got here.
Probably a manuall installation of some other tool via "pip install"?

$ sudo find / -name "libqpdf*.so*" 2>/dev/null
[sudo] password for jens:
/usr/lib/x86_64-linux-gnu/qt6/plugins/imageformats/libqpdf.so
/usr/lib/x86_64-linux-gnu/libqpdf.so.28.6.3
/usr/lib/x86_64-linux-gnu/libqpdf.so.28
/usr/local/lib/python3.10/dist-packages/pikepdf.libs/libqpdf-443ebe82.so.29.6.4

There's a version of the libqpdf on my system at "/usr/local".
However, the pikepdf library doesn't use it:

$ ldd /usr/lib/python3/dist-packages/pikepdf/*.so
        linux-vdso.so.1 (0x00007ffe94ef8000)
        libqpdf.so.28 => /lib/x86_64-linux-gnu/libqpdf.so.28 (0x00007da4a1a00000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007da4a1600000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007da4a1ccb000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007da4a1200000)
        libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007da4a1015000)
        libjpeg.so.8 => /lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007da4a1c48000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007da4a1c2c000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007da4a1919000)
        /lib64/ld-linux-x86-64.so.2 (0x00007da4a1e5b000)
        libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007da4a14c5000)
        libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007da4a18f8000)
        libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007da4a0e6b000)
        libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007da4a18e0000)
        libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 (0x00007da4a189a000)
        libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 (0x00007da4a1852000)
        libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007da4a1443000)
        libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007da4a1845000)

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

Thanks for the information Jens. You have pikepdf installed via pip which is causing the problem.
I can now reproduce the same problem you have and the same version as your is now showing in my "About" box. All I had to do was:

sudo pip install pikepdf==8.10.1

Please use the command "pip list" to check if you have pikepdf installed via pip, and then please do "sudo pip uninstall pikepdf" to unstall pip version of pikepdf. After that pdfarranger should work.

Revision history for this message
Fabio M. Panico (fbugnon) wrote :

UPGRADE pdfarranger via SNAP:

I'm on Ubuntu 22.04.04 and I was facing the same issue, having installed pdfarranger 1.8.2 via command line apt install.

Removing it (with sudo apt remove --purge pdfarranger) and reinstalling via snap (sudo snap install pdfarranger) I got version 1.10.1 and fixed the issue.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.