Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poppler issues #7

Open
karlicoss opened this issue Dec 22, 2020 · 3 comments
Open

Poppler issues #7

karlicoss opened this issue Dec 22, 2020 · 3 comments

Comments

@karlicoss
Copy link

Ubuntu 20.04. I tried on a fresh virtualbox install to avoid messing with qt libraries installed in the main system.

Followed the instructions in readme:

  • don't have brew in ubuntu, but I've ran apt install cmake libpoppler-qt5-1, and also apt build-dep cmake libpoppler-qt5-1 -- just in case some build dependencies are also necessary
  • successfully ran both pip commands
  • when trying to open a PDF in the app, I get
Traceback (most recent call last):
  File "/shared/remy/remy/gui/filebrowser.py", line 442, in openEntry
    self.viewers[uid] = NotebookViewer(index.get(uid))
  File "/shared/remy/remy/gui/notebookview.py", line 99, in __init__
    self._maxPage = document.baseDocument().numPages() - 1
  File "/shared/remy/remy/remarkable/metadata.py", line 256, in baseDocument
    from popplerqt5 import Poppler
ImportError: /home/dev/.local/lib/python3.8/site-packages/PyQt5/QtXml.abi3.so: undefined symbol: _ZN12QDomDocument10setContentEP16QXmlStreamReaderbP7QStringPiS4_, version Qt_5

Seems like a mismatch between python API and the installed library.

I also tried installing via brew, but even though it installed successfully, it still couldn't find the poppler library, unless I installed it via apt.

And the final option I tried -- running pip3 uninstall pyqt5 pyqt5-sip python-poppler-qt5 and then installing them via the package manager (generally this would mean more consistent versions): apt install python3-poppler-qt5 python3-pyq. Then when opening a pdf I'm getting

Traceback (most recent call last):
  File "/shared/remy/remy/gui/filebrowser.py", line 442, in openEntry
    self.viewers[uid] = NotebookViewer(index.get(uid))
  File "/shared/remy/remy/gui/notebookview.py", line 99, in __init__
    self._maxPage = document.baseDocument().numPages() - 1
  File "/shared/remy/remy/remarkable/metadata.py", line 262, in baseDocument
    self._pdf.setRenderHint(Poppler.Document.HideAnnotations)
AttributeError: type object 'Document' has no attribute 'HideAnnotations

not sure if it's much better though, presumably this method was added in a more recent poppler version, and that's why you were suggesting to install from github in the first place?

@karlicoss karlicoss mentioned this issue Dec 22, 2020
@bordaigorl
Copy link
Owner

Any luck? I don't have a Linux machine at hand to try...python-poppler-qt5 is both very convenient to use and super annoying to install...I wish there was a good alternative...

@DeepMarks
Copy link

This worked for me on Ubuntu 20.04: frescobaldi/python-poppler-qt5#41 (comment)

@bordaigorl
Copy link
Owner

The new version on the devel branch can replace python-poppler-qt5 with the much easier to install PyMuPDF.
You can try and see if that makes it work for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants