Giter Club home page Giter Club logo

okular-backend-mupdf's People

Contributors

bylee20 avatar kalmarek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

okular-backend-mupdf's Issues

Crash on most pdfs

I am self compiling this on Debian 12 KDE-wayland. However it segfaults when opening most pdfs, only few can be viewed without issue.

@gustawho hope you can see this, since you maintain the latest fork.

The back trace is

Application: Okular (okular), signal: Segmentation fault

[KCrash Handler]
#4  0x00007f7f6d48d5d0 in int QAtomicOps<int>::loadRelaxed<int>(std::atomic<int> const&) () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okular/generators/okularGenerator_mupdf.so
#5  0x00007f7f6d48ca44 in QBasicAtomicInteger<int>::loadRelaxed() const () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okular/generators/okularGenerator_mupdf.so
#6  0x00007f7f6d48bf8c in QtPrivate::RefCount::ref() () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okular/generators/okularGenerator_mupdf.so
#7  0x00007f7f6d48c323 in QString::QString(QString const&) () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okular/generators/okularGenerator_mupdf.so
#8  0x00007f7f6d49217d in QMuPDF::Outline::title() const () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okular/generators/okularGenerator_mupdf.so
#9  0x00007f7f6d490e43 in recurseCreateTOC(QMuPDF::Document const&, QDomDocument&, QMuPDF::Outline*, QDomNode&, QSizeF const&) () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okular/generators/okularGenerator_mupdf.so
#10 0x00007f7f6d491368 in MuPDFGenerator::generateDocumentSynopsis() () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okular/generators/okularGenerator_mupdf.so
#11 0x00007f7f9817c2fd in TOC::notifySetup(QVector<Okular::Page*> const&, int) () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#12 0x00007f7f91d696ca in Okular::Document::openDocument(QString const&, QUrl const&, QMimeType const&, QString const&) () from /lib/x86_64-linux-gnu/libOkular5Core.so.10
#13 0x00007f7f980ddc72 in Okular::Part::doOpenFile(QMimeType const&, QString const&, bool*) () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#14 0x00007f7f980dea34 in Okular::Part::openFile() () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#15 0x00007f7fb92ca785 in ?? () from /lib/x86_64-linux-gnu/libKF5Parts.so.5
#16 0x00007f7fb92cb87e in KParts::ReadOnlyPart::openUrl(QUrl const&) () from /lib/x86_64-linux-gnu/libKF5Parts.so.5
#17 0x00007f7f980ce23b in Okular::Part::openUrl(QUrl const&, bool) () from /usr/lib/x86_64-linux-gnu/qt5/plugins/okularpart.so
#18 0x000055e1f5b6617e in ?? ()
#19 0x000055e1f5b6856d in ?? ()
#20 0x00007f7fb76e8f4f in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x000055e1f5b5d445 in ?? ()
#22 0x00007f7fb76e8f4f in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007f7fb85cee15 in QAbstractItemView::activated(QModelIndex const&) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007f7fb85de530 in QAbstractItemView::mouseDoubleClickEvent(QMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007f7fb83a572c in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007f7fb845048e in QFrame::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007f7fb76b147b in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007f7fb8362f9e in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007f7fb836b552 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007f7fb76b16f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007f7fb836965e in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007f7fb83bdbd8 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007f7fb83c0f60 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007f7fb8362fae in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007f7fb76b16f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#36 0x00007f7fb7b3d37d in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#37 0x00007f7fb7b11cac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#38 0x00007f7fb5c274b0 in ?? () from /lib/x86_64-linux-gnu/libQt5WaylandClient.so.5
#39 0x00007f7fb5dd07a9 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007f7fb5dd0a38 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#41 0x00007f7fb5dd0acc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#42 0x00007f7fb7709836 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#43 0x00007f7fb76b017b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#44 0x00007f7fb76b82d6 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#45 0x000055e1f5b5c215 in ?? ()
#46 0x00007f7fb724618a in __libc_start_call_main (main=main@entry=0x55e1f5b5ba50, argc=argc@entry=1, argv=argv@entry=0x7fff03bf99d8) at ../sysdeps/nptl/libc_start_call_main.h:58
#47 0x00007f7fb7246245 in __libc_start_main_impl (main=0x55e1f5b5ba50, argc=1, argv=0x7fff03bf99d8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff03bf99c8) at ../csu/libc-start.c:381
#48 0x000055e1f5b5d1f1 in ?? ()
[Inferior 1 (process 101441) detached]

Build error with mupdf-1.7-1

==> Building and installing package
==> Making package: okular-backend-mupdf 0.0.5-1 (Tue Apr 21 18:24:01 UTC 2015)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found v0.0.5.tar.gz
==> Validating source files with md5sums...
    v0.0.5.tar.gz ... Skipped
==> Extracting sources...
  -> Extracting v0.0.5.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/lib/hardening-wrapper/bin/cc
-- Check for working C compiler: /usr/lib/hardening-wrapper/bin/cc -- 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/lib/hardening-wrapper/bin/c++
-- Check for working CXX compiler: /usr/lib/hardening-wrapper/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28") 
-- checking for module 'libopenjp2'
--   found libopenjp2, version 2.1.0
-- checking for module 'openssl'
--   found openssl, version 1.0.2a
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt-Version 4.8.6 (using /usr/bin/qmake-qt4)
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so;/usr/lib64/libXft.so;/usr/lib64/libXau.so;/usr/lib64/libXdmcp.so;/usr/lib64/libXpm.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so;/usr/lib64/libXft.so;/usr/lib64/libXau.so;/usr/lib64/libXdmcp.so;/usr/lib64/libXpm.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found OpenSSL: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so (found version "1.0.2a") 
-- Looking for _POSIX_TIMERS
-- Looking for _POSIX_TIMERS - found
-- Found Automoc4: /usr/bin/automoc4  
-- Found Perl: /usr/bin/perl (found version "5.20.2") 
-- Found Phonon: /usr/include/qt4 (Required is at least version "4.3.80") 
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Performing Test HAVE_FPIE_SUPPORT
-- Performing Test HAVE_FPIE_SUPPORT - Success
-- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL
-- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL - Success
-- Performing Test __KDE_HAVE_GCC_VISIBILITY
-- Performing Test __KDE_HAVE_GCC_VISIBILITY - Success
-- Found KDE 4.12 include dir: /usr/include
-- Found KDE 4.12 library dir: /usr/lib
-- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
-- Found automoc4: /usr/bin/automoc4
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.8") 
-- Found Freetype: /usr/lib64/libfreetype.so (found version "2.5.5") 
-- Found jbig2dec: /usr/lib64/libjbig2dec.so  
-- Found JPEG: /usr/lib64/libjpeg.so  
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/build
Scanning dependencies of target okularGenerator_mupdf_automoc
Generating generator_mupdf.moc
[  0%] Built target okularGenerator_mupdf_automoc
Scanning dependencies of target okularGenerator_mupdf
[ 16%] [ 33%] Building CXX object CMakeFiles/okularGenerator_mupdf.dir/okularGenerator_mupdf_automoc.o
Building CXX object CMakeFiles/okularGenerator_mupdf.dir/document.o
[ 50%] Building CXX object CMakeFiles/okularGenerator_mupdf.dir/page.o
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp: In destructor ‘QMuPDF::Page::~Page()’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp:56:33: error: ‘fz_free_page’ was not declared in this scope
     fz_free_page(d->doc, d->page);
                                 ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp: In static member function ‘static QMuPDF::Page* QMuPDF::Page::make(fz_document_s*, fz_context_s*, int)’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp:63:42: error: cannot convert ‘fz_document_s*’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘fz_page* fz_load_page(fz_context*, fz_document*, int)’
     fz_page *page = fz_load_page(doc, num);
                                          ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp: In member function ‘QSizeF QMuPDF::Page::size(const QSizeF&) const’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp:83:41: error: cannot convert ‘fz_document* {aka fz_document_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘fz_rect* fz_bound_page(fz_context*, fz_page*, fz_rect*)’
     fz_bound_page(d->doc, d->page, &rect);
                                         ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp: In member function ‘qreal QMuPDF::Page::duration() const’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp:92:53: error: cannot convert ‘fz_document* {aka fz_document_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘fz_transition* fz_page_presentation(fz_context*, fz_page*, float*)’
     (void)fz_page_presentation(d->doc, d->page, &val);
                                                     ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp: In member function ‘QImage QMuPDF::Page::render(qreal, qreal) const’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp:108:55: error: cannot convert ‘fz_document* {aka fz_document_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘void fz_run_page(fz_context*, fz_page*, fz_device*, const fz_matrix*, fz_cookie*)’
     fz_run_page(d->doc, d->page, device, &ctm, &cookie);
                                                       ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp:109:26: error: ‘fz_free_device’ was not declared in this scope
     fz_free_device(device);
                          ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp: In member function ‘QVector<QMuPDF::TextBox*> QMuPDF::Page::textBoxes(const QSizeF&) const’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp:124:63: error: cannot convert ‘fz_document* {aka fz_document_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘void fz_run_page(fz_context*, fz_page*, fz_device*, const fz_matrix*, fz_cookie*)’
     fz_run_page(d->doc, d->page, device, &fz_identity, &cookie);
                                                               ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp:125:26: error: ‘fz_free_device’ was not declared in this scope
     fz_free_device(device);
                          ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp:127:39: error: ‘fz_free_text_page’ was not declared in this scope
         fz_free_text_page(d->ctx, page);
                                       ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp:128:41: error: ‘fz_free_text_sheet’ was not declared in this scope
         fz_free_text_sheet(d->ctx, sheet);
                                         ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp:144:69: error: cannot convert ‘fz_rect* {aka fz_rect_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘fz_rect* fz_text_char_bbox(fz_context*, fz_rect*, fz_text_span*, int)’
                     fz_rect bbox; fz_text_char_bbox(&bbox, s, i_char);
                                                                     ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp:156:35: error: ‘fz_free_text_page’ was not declared in this scope
     fz_free_text_page(d->ctx, page);
                                   ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/page.cpp:157:37: error: ‘fz_free_text_sheet’ was not declared in this scope
     fz_free_text_sheet(d->ctx, sheet);
                                     ^
CMakeFiles/okularGenerator_mupdf.dir/build.make:100: recipe for target 'CMakeFiles/okularGenerator_mupdf.dir/page.o' failed
make[2]: *** [CMakeFiles/okularGenerator_mupdf.dir/page.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp: In member function ‘pdf_obj* QMuPDF::Document::Data::dict(const char*) const’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:39:49: error: cannot convert ‘pdf_document* {aka pdf_document_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘pdf_obj* pdf_trailer(fz_context*, pdf_document*)’
         { return pdf_dict_gets(pdf_trailer(pdf()), key); }
                                                 ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp: In member function ‘bool QMuPDF::Document::Data::load()’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:47:40: error: cannot convert ‘fz_document* {aka fz_document_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘int fz_count_pages(fz_context*, fz_document*)’
         pageCount = fz_count_pages(mdoc);
                                        ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:48:54: error: cannot convert ‘pdf_obj* {aka pdf_obj_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘pdf_obj* pdf_dict_gets(fz_context*, pdf_obj*, const char*)’
         pdf_obj *obj = pdf_dict_gets(root, "PageMode");
                                                      ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:49:35: error: cannot convert ‘pdf_obj* {aka pdf_obj_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘int pdf_is_name(fz_context*, pdf_obj*)’
         if (obj && pdf_is_name(obj)) {
                                   ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:50:47: error: cannot convert ‘pdf_obj* {aka pdf_obj_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘char* pdf_to_name(fz_context*, pdf_obj*)’
             const char* mode = pdf_to_name(obj);
                                               ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp: In destructor ‘QMuPDF::Document::~Document()’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:85:27: error: ‘fz_free_context’ was not declared in this scope
     fz_free_context(d->ctx);
                           ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp: In member function ‘bool QMuPDF::Document::load(const QString&)’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:102:42: error: cannot convert ‘fz_document* {aka fz_document_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘int fz_needs_password(fz_context*, fz_document*)’
     d->locked = fz_needs_password(d->mdoc);
                                          ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp: In member function ‘void QMuPDF::Document::close()’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:117:30: error: ‘fz_close_document’ was not declared in this scope
     fz_close_document(d->mdoc);
                              ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:119:23: error: ‘fz_close’ was not declared in this scope
     fz_close(d->stream);
                       ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp: In member function ‘bool QMuPDF::Document::unlock(const QByteArray&)’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:138:52: error: cannot convert ‘fz_document* {aka fz_document_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘int fz_authenticate_password(fz_context*, fz_document*, const char*)’
     if (!fz_authenticate_password(d->mdoc, a.data()))
                                                    ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp: In member function ‘QList<QByteArray> QMuPDF::Document::infoKeys() const’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:171:46: error: cannot convert ‘pdf_obj* {aka pdf_obj_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘int pdf_dict_len(fz_context*, pdf_obj*)’
     const int dictSize = pdf_dict_len(d->info);
                                              ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:173:51: error: cannot convert ‘pdf_obj* {aka pdf_obj_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘pdf_obj* pdf_dict_get_key(fz_context*, pdf_obj*, int)’
         pdf_obj *obj = pdf_dict_get_key(d->info, i);
                                                   ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:174:28: error: cannot convert ‘pdf_obj* {aka pdf_obj_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘int pdf_is_name(fz_context*, pdf_obj*)’
         if (pdf_is_name(obj))
                            ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:175:51: error: cannot convert ‘pdf_obj* {aka pdf_obj_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘char* pdf_to_name(fz_context*, pdf_obj*)’
             keys.append(QByteArray(pdf_to_name(obj)));
                                                   ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp: In member function ‘QString QMuPDF::Document::infoKey(const QByteArray&) const’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:190:58: error: cannot convert ‘pdf_obj* {aka pdf_obj_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘pdf_obj* pdf_dict_gets(fz_context*, pdf_obj*, const char*)’
     pdf_obj *obj = pdf_dict_gets(d->info, key.constData());
                                                          ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:192:39: error: cannot convert ‘pdf_obj* {aka pdf_obj_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘pdf_obj* pdf_resolve_indirect(fz_context*, pdf_obj*)’
         obj = pdf_resolve_indirect(obj);
                                       ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:193:48: error: cannot convert ‘pdf_document* {aka pdf_document_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘char* pdf_to_utf8(fz_context*, pdf_document*, pdf_obj*)’
         char *value = pdf_to_utf8(d->pdf(), obj);
                                                ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp: In member function ‘QMuPDF::Outline* QMuPDF::Document::outline() const’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:205:46: error: cannot convert ‘fz_document* {aka fz_document_s*}’ to ‘fz_context* {aka fz_context_s*}’ for argument ‘1’ to ‘fz_outline* fz_load_outline(fz_context*, fz_document*)’
     fz_outline *out = fz_load_outline(d->mdoc);
                                              ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:212:32: error: ‘fz_free_outline’ was not declared in this scope
     fz_free_outline(d->ctx, out);
                                ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp: In member function ‘float QMuPDF::Document::pdfVersion() const’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:222:26: error: ‘FZ_META_FORMAT_INFO’ was not declared in this scope
     if (fz_meta(d->mdoc, FZ_META_FORMAT_INFO, buf, sizeof(buf)) == FZ_META_OK) {
                          ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:222:63: error: ‘fz_meta’ was not declared in this scope
     if (fz_meta(d->mdoc, FZ_META_FORMAT_INFO, buf, sizeof(buf)) == FZ_META_OK) {
                                                               ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:222:68: error: ‘FZ_META_OK’ was not declared in this scope
     if (fz_meta(d->mdoc, FZ_META_FORMAT_INFO, buf, sizeof(buf)) == FZ_META_OK) {
                                                                    ^
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp: In member function ‘pdf_obj* QMuPDF::Document::Data::dict(const char*) const’:
/tmp/yaourt-tmp-arzeth/aur-okular-backend-mupdf/src/okular-backend-mupdf-0.0.5/document.cpp:39:58: error: control reaches end of non-void function [-Werror=return-type]
         { return pdf_dict_gets(pdf_trailer(pdf()), key); }
                                                          ^
cc1plus: some warnings being treated as errors
CMakeFiles/okularGenerator_mupdf.dir/build.make:77: recipe for target 'CMakeFiles/okularGenerator_mupdf.dir/document.o' failed
make[2]: *** [CMakeFiles/okularGenerator_mupdf.dir/document.o] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/okularGenerator_mupdf.dir/all' failed
make[1]: *** [CMakeFiles/okularGenerator_mupdf.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2

grep -R fz_free_page /usr/include/mupdf found nothing

Different zoom level compared to poppler backend

Hi, I tested this through Arch AUR package, and I found mupdf rendering is smaller than poppler rendering on the same zoom level. Following is a screenshot showing a comparison.

poppler_vs_mupdf

Left-Up is poppler 100%, Right-Up is mupdf 100%.
Left-Down is poppler 400%, Right-Down is mupdf 400%.

The whole screen resolution is 2560x1080, the pdf is generated using Adobe InDesign CS 3.0.1

Please update mupdf library. compile failed in recent mupdf on fedora 23(x86-64)

[reandr@kuh3h3 build] $ cmake -Wno-dev ..
-- Found Qt-Version 4.8.7 (using /bin/qmake-qt4)
-- Found X11: /lib64/libX11.so
-- Found KDE 4.12 include dir: /usr/include/kde4
-- Found KDE 4.12 library dir: /usr/lib64/kde4/devel
-- Found the KDE4 kconfig_compiler4 preprocessor: /usr/bin/kconfig_compiler4
-- Found automoc4: //bin/automoc4
-- Configuring done
-- Generating done
-- Build files have been written to: /run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/build
[reandr@kuh3h3 build] $ make
Scanning dependencies of target okularGenerator_mupdf_automoc
Generating generator_mupdf.moc
[ 0%] Built target okularGenerator_mupdf_automoc
Scanning dependencies of target okularGenerator_mupdf
[ 14%] Building CXX object CMakeFiles/okularGenerator_mupdf.dir/okularGenerator_mupdf_automoc.cpp.o
[ 28%] Building CXX object CMakeFiles/okularGenerator_mupdf.dir/document.cpp.o
[ 42%] Building CXX object CMakeFiles/okularGenerator_mupdf.dir/page.cpp.o
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp: In member function ‘QVectorQMuPDF::TextBox* QMuPDF::Page::textBoxes(const QSizeF&) const’:
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:121:5: error: ‘fz_text_page’ was not declared in this scope
fz_text_page page = fz_new_text_page(d->ctx);
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:121:19: error: ‘page’ was not declared in this scope
fz_text_page *page = fz_new_text_page(d->ctx);
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:121:49: error: ‘fz_new_text_page’ was not declared in this scope
fz_text_page *page = fz_new_text_page(d->ctx);
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:122:5: error: ‘fz_text_sheet’ was not declared in this scope
fz_text_sheet *sheet = fz_new_text_sheet(d->ctx);
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:122:20: error: ‘sheet’ was not declared in this scope
fz_text_sheet *sheet = fz_new_text_sheet(d->ctx);
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:122:52: error: ‘fz_new_text_sheet’ was not declared in this scope
fz_text_sheet *sheet = fz_new_text_sheet(d->ctx);
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:123:63: error: ‘fz_new_text_device’ was not declared in this scope
fz_device *device = fz_new_text_device(d->ctx, sheet, page);
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:127:39: error: ‘fz_drop_text_page’ was not declared in this scope
fz_drop_text_page(d->ctx, page);
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:128:41: error: ‘fz_drop_text_sheet’ was not declared in this scope
fz_drop_text_sheet(d->ctx, sheet);
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:137:9: error: ‘fz_text_block’ was not declared in this scope
fz_text_block &block = *page->blocks[i_block].u.text;
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:137:24: error: ‘block’ was not declared in this scope
fz_text_block &block = *page->blocks[i_block].u.text;
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:139:13: error: ‘fz_text_line’ was not declared in this scope
fz_text_line &line = block.lines[i_line];
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:139:27: error: ‘line’ was not declared in this scope
fz_text_line &line = block.lines[i_line];
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:144:77: error: ‘fz_text_char_bbox’ was not declared in this scope
fz_rect bbox; fz_text_char_bbox(d->ctx, &bbox, s, i_char);
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:145:43: error: ‘fz_text_span {aka struct fz_text_span_s}’ has no member named ‘text’
const int text = span.text[i_char].c;
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:156:35: error: ‘fz_drop_text_page’ was not declared in this scope
fz_drop_text_page(d->ctx, page);
^
/run/media/reandr/48fed7c3-c2ce-49e5-8eaa-3bdf47cff596/reandr/okular-backend-mupdf/page.cpp:157:37: error: ‘fz_drop_text_sheet’ was not declared in this scope
fz_drop_text_sheet(d->ctx, sheet);
^
CMakeFiles/okularGenerator_mupdf.dir/build.make:110: recipe for target 'CMakeFiles/okularGenerator_mupdf.dir/page.cpp.o' failed
make[2]: *
* [CMakeFiles/okularGenerator_mupdf.dir/page.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/okularGenerator_mupdf.dir/all' failed
make[1]: *** [CMakeFiles/okularGenerator_mupdf.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Navigation using Table of Contents not working

Jumping to a section by clicking on an entry in the Contents pane of Okular does not work when using the mupdf backend. This happens with both, version 14.12.3 of Okular (using the Arch Linux package), and the latest git checkout of okular.

This happens consistently with all documents I tried. All of them work fine using the Poppler backend. There is no output on the terminal indicating any error. Here's an example document where this happens: http://schoepe.org/~daniel/example.pdf

Printing support.

Hello when using mudpf-backend I'm unable to print the option is greyed. It would be great to implement it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.