JakubMelka / PDF4QT

Open source PDF editor.
https://jakubmelka.github.io/
GNU Lesser General Public License v3.0
719 stars 74 forks source link

Failed to compile PDF4QT on Ubuntu 22.04.3 LTS. #145

Closed hongyi-zhao closed 9 months ago

hongyi-zhao commented 10 months ago

See below:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:    22.04
Codename:   jammy
[...]
$ proxychains-ng-socks5 cmake -B build -S . -DPDF4QT_INSTALL_QT_DEPENDENCIES=0 -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX='/' -DCMAKE_BUILD_TYPE=Release
[...]
-- Could NOT find Qt6TextToSpeech (missing: Qt6TextToSpeech_DIR)
CMake Error at /home/werner/Public/repo/github.com/JakubMelka/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package):
  Found package configuration file:

    /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake

  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find Qt component "TextToSpeech".

  Expected Config file at
  "/usr/lib/x86_64-linux-gnu/cmake/Qt6TextToSpeech/Qt6TextToSpeechConfig.cmake"
  does NOT exist

Call Stack (most recent call first):
  CMakeLists.txt:58 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/werner/Public/repo/github.com/JakubMelka/PDF4QT.git/build/CMakeFiles/CMakeOutput.log".
ddonevski commented 10 months ago

It appears that you don't have Qt6 installed so the compiler can't find its components. I compiled on Linux Mint 21.2 which is based on Ubuntu 22.04 by downloading Qt using the net installer. Go to https://www.qt.io/ and download the net installer. Then install dependencies needed to compile Qt https://doc.qt.io/qt-6/linux-requirements.html Then try to compile PDF4QT I used the following configure options: Configure: cmake -B build -S . -DVCPKG_OVERLAY_PORTS='/media/davor/e57f40fb-a0dd-4f1d-a4c6-27b3c310b9a3/PDF4QT/overlays' -DPDF4QT_INSTALL_QT_DEPENDENCIES=0 -DPDF4QT_QT_ROOT='/home/davor/Qt/6.6.1/' -DCMAKE_PREFIX_PATH='/home/davor/Qt/6.6.1/gcc_64/lib/cmake/' -DCMAKE_MODULE_PATH='/home/davor/Qt/6.6.1/gcc_64/lib/cmake/' -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX='/'

Just replace the paths with your paths and you may delete -DVCPKG_OVERLAY_PORTS option if you clone the latest commit. After you build and install PDF4QT, don't forger to export library path so PDF4QT can fetch Qt dependencies:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/davor/Qt/6.6.1/gcc_64/lib/

Of course, you use your path and Qt version.

hongyi-zhao commented 10 months ago

In my impression, installing the new version of QT requires downloading a large number of files, so it seems to be a cumbersome task. Therefore, I want to know, is there a way to reduce the version of QT dependencies, so that I can successfully compile it in my current system environment?

ddonevski commented 10 months ago

I'm not sure what you mean by "reduce the version of QT dependencies". I don't think you can compile without downloading many of the Qt components. You could use deb or flatpak package, but you'd still need some Qt libraries like texttospeech which aren't available in Ubuntu 22.04 repositories. So you'd have to go to https://packages.ubuntu.com/, search for missing packages and add repositories which contain those packages. I think Ubuntu 23.04 repositories have those packages.

hongyi-zhao commented 10 months ago

I'm not sure what you mean by "reduce the version of QT dependencies".

Sorry for my inaccurate wording, I meant to say that downgrading the version of QT itself while ensuring the successful compilation of PDF4QT.

PS Based on the description in the readme of this project, I have the impression that PDF4QT is rather powerful and can compete with commercial equivalents. So, I installed the pre-compiled Windows version and tried the different components shipped in this project via wine, and however, I found that overall, the functionality set I saw was still very limited, as compared to the following well-known commercial similar tool, a.k.a., PDF Studio:

image

ddonevski commented 10 months ago

JakubMelka is the developer, I'm just a user like you. I don't think you can downgrade Qt because ViewerProfi app uses text to speech library to read text. The developer spent thousands of hours developing this app, adding those functionalities which require that Qt is at least some version (specified in readme). Maybe there is some previous version of PDF4QT which uses older Qt.

JakubMelka commented 10 months ago

Hello @hongyi-zhao

JakubMelka commented 10 months ago

Just for the screenshot - PDF4QT can:

Only one thing ,which I cannot do is edit PDF content, but I am working on it. So, based on screenshot, I can do almost anything the PDF Studio Pro can...

hongyi-zhao commented 10 months ago

https://github.com/JakubMelka/PDF4QT/issues/145#issuecomment-1883305693

  • Many of features are in plugins, which are turned off by default (just turn them on)

How to do this?

So far, I have not successfully compiled it on Linux, so there is no way to visually check the relevant Settings.

hongyi-zhao commented 10 months ago

Just for the screenshot - PDF4QT can: [...] Only one thing ,which I cannot do is edit PDF content, but I am working on it. So, based on screenshot, I can do almost anything the PDF Studio Pro can...

What I have shown is only the feature set shown on its Home sub-panel. See the other subpanels below for additional features:

image image image image image image image image

By the way, as you can see, PDF Studio Pro implements all its features on different panels in a program instead of dividing them into different programs as the current implementation method used by PDF4QT. So, I'm wondering if you could consolidate all features into a single program for ease of use.

Regards, Zhao

raffaem commented 10 months ago
  1. You can try out these patches and see if they let you compile PDF4QT without relying on vcpkg (they do on Arch Linux, as you can see)

  2. We have plenty of free tools to do much (if not all) of the things you posted.

For the "Comment" tab, almost all editors allow you to highlight text (Evince, Okular, etc.), and PDF4QT allows you to insert text and images. Xournal++ will allow you to draw with freehand as well.

For the "Document" tab, for OCR you can use ocrmypdf. In my experience it gives BETTER results than the built-in OCR features of Master PDF Editor and Qoppa PDF Studio. In particular, the latter tend to insert a text object for word, while ocrmypdf will insert a text object by line (which allows you to highlight the text without the text being fragmented). Moreover, my Master PDF Editor is using tesseract for OCR, a free software which is the same backend used by ocrmypdf. I don't know about Qoppa but I bet they use tesseract under the hood as well. Which means you are buying just the graphical interface anyway, not the engine (nothing wrong with buying software and nothing wrong with buying the graphical interface alone. Just be aware of what exactly you are buying):

image

For the "Optmize" tab, you can easily do that with ghostscript directly. Find an example below.

For the "Pages" tab, pdfjam can do literally all of that and even more, or pdfarranger if you prefer a GUI (or my own pdfsak).

For "Convert" tab, we don't even talk about it. You can extract the text objects from the pdf with poppler's pdftotext, you have camelot and tabula to extract tables, and marker and nougat to convert to markdown. I bet your Qoppa PDF can't convert to markdown while translating the equations into LaTeX, can it? GROBID allows you to convert the PDF into a schematic representation called ALTO, as well as extract and structure various information from scientific papers. I'm sure your Qoppa PDF doesn't even come close to that.

For the "Secure" tab, there are tools to digitally sign the PDF (quick search), but I never used them because most providers have a web interface to sign the PDFs and don't even allow you to download the certificate (yes, it's not good for privacy, but as long as they don't allow you to download your own certificate, you can't sign it, period. It's not a software matter.).

For "View" tab, is implemented here in PDF4QT and Evince and Okular and sioyek and whatever. Almost all viewers allow you to rotate the page, or put pages side-by-side.

For the "Batch" tab, can be very easily emulated with a quick bash file.

Check out also Stirling-PDF.

Moreover your Qoppa PDF Studio is written in Java, and if you open a PDF with "Hello world" on it it will take 500 MB of RAM easily.

The only things missing on Linux are:

  1. A form editor
  2. A "content" editor (you can edit the contents already in the PDFs, like moving text and images around).

Not long ago I didn't know PDF4QT would allow you to insert text and images. I think it is the only free PDF editor that allows it (I've tried everything: okular, evince, sioyek, you name it). If we implement the feature to modify/move them around, and treat existing objects like newly inserted ones, I think there would be nothing more left.

Finally:

By the way, as you can see, PDF Studio Pro implements all its features on different panels in a program instead of dividing them into different programs as the current implementation method used by PDF4QT.

Which is VERY wrong. The Unix philosophy provides to "Make each program do one thing well". This is how you specialize.

We don't need behemoths that do a little bit of everything.

Example of PDF optimization

#!/usr/bin/env bash

# Optimize a PDF file and reduce its size
# https://www.digitalocean.com/community/tutorials/reduce-pdf-file-size-in-linux

filename=$(basename -- "$1")
extension="${filename##*.}"
filename="${filename%.*}"
outfile=${filename}_opt.pdf

read -p "Quality (screen/ebook/prepress/printer/default): " imgres

if [ "$imgres" == "" ]; then
    imgres="screen"
fi

echo "You inputted $imgres"

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/"$imgres" -dNOPAUSE -dQUIET -dBATCH -sOutputFile="$outfile" "$1"
hongyi-zhao commented 10 months ago

First, thank you very much for telling me about such a comprehensive and systematic PDF toolchain based on the FOSS ecosystem.

  1. You can try out these patches and see if they let you compile PDF4QT without relying on vcpkg (they do on Arch Linux, as you can see)

Do you mean I don't need to download the FindLCMS2.cmake file listed in the above repo, as done in the PKGBUILD, which corresponding to the following pathing logic:

image

For the "Pages" tab, pdfjam can do literally all of that and even more, or pdfarranger if you prefer a GUI (or my own pdfsak).

When I use pdfarranger, I encountered the following message:

image image

I bet your Qoppa PDF can't convert to markdown while translating the equations into LaTeX, can it?

You're right, it doesn't have the feature of conversion to markdown.

raffaem commented 10 months ago

You should post on pdfarranger's discussion page.

I don't handle many PDFs with forms.

If the backend doesn't support saving forms and you need them, you might have more luck with lower-level tools like qpdf or pdftk.

The second warnings seems related to metadata. PDFs store metadata in two different formats, one of it being XMP. You can easily put the metadata back in with exiftool.

hongyi-zhao commented 10 months ago

You should post on pdfarranger's discussion page.

I don't handle many PDFs with forms.

If the backend doesn't support saving forms and you need them, you might have more luck with lower-level tools like qpdf or pdftk.

In my experience, I have tried all of these tools in the past few months, including pdfarranger to merge several PDF files, but I found that the resulting file would lack the stamp that was present in one of the original files. At that time, I eventually used pdfsam to solve this problem. This gave me the following impression: although FOSS tools are abundant, they often become very troublesome or even unsolvable when encountering some difficult issues.

The second warnings seems related to metadata. PDFs store metadata in two different formats, one of it being XMP. You can easily put the metadata back in with exiftool.

Thank you for telling me about this tool.

hongyi-zhao commented 10 months ago

https://github.com/JakubMelka/PDF4QT/issues/145#issuecomment-1884401983 Moreover, my Master PDF Editor is using tesseract for OCR, a free software which is the same backend used by ocrmypdf.

Why do you still use proprietary PDF software when you are so familiar with FOSS's PDF ecosystem and decide that they are already competent for almost every relevant problem?

raffaem commented 10 months ago

#145 (comment) Moreover, my Master PDF Editor is using tesseract for OCR, a free software which is the same backend used by ocrmypdf.

Why do you still use proprietary PDF software when you are so familiar with FOSS's PDF ecosystem and decide that they are already competent for almost every relevant problem?

Because I heavily rely on annotations for my PDFs and found out no FOSS tools that can do this

raffaem commented 10 months ago

As said, Master PDF is not perfect either. The OCR quality is lower than ocrmypdf, it doesn't support page labels, and most importantly it insists on aligning the left margin of the PDF page to the left margin of my screen, and let me scroll horizontally, even tough the full width fits on the screen.

But I have no other option to annotate the PDF.

Unfortunately the PDF format is very complex, with different versions, and it was originally designed to be NOT modifiable (which, of course, just means very difficult to modify).

Now even Adobe Acrobat can modify it.

There was a free format called DJVU for some time, but it did go nowhere.

Now I think PDF 2.0 is an ISO standard.

raffaem commented 10 months ago

This gave me the following impression: although FOSS tools are abundant, they often become very troublesome or even unsolvable when encountering some difficult issues.

That's why we need one tool that does one thing very good.

I also had troubles with PDF libraries which would read RGB images as BGR and the like.

raffaem commented 10 months ago

Let alone that every time I format my PC, I have to ask code industry (the maker of Master PDF) to re-activate my license, because they think I'm using the same license on different PCs.

Zotero now also has an embedded PDF viewer with nice annotation capabilities. But to move back and forth through the PDF (which is very useful for images and references) you are supposed to open two panes with two different views on two different parts of the PDF, which is not for me. I prefer to move around with bookmarks very much.

And it doesn't save the annotations in the PDF but in its own database, so I'm supposed to import every PDF into Zotero.

hongyi-zhao commented 10 months ago

https://github.com/JakubMelka/PDF4QT/issues/145#issuecomment-1884812775 Because I heavily rely on annotations for my PDFs and found out no FOSS tools that can do this

But I noticed that there are so many FOSS tools that have this feature, e.g., the ones described below: https://www.baeldung.com/linux/files-pdf-annotate https://pdf.wondershare.com/how-to/linux-annotate-pdf.html

raffaem commented 10 months ago

#145 (comment) Because I heavily rely on annotations for my PDFs and found out no FOSS tools that can do this

But I noticed that there are so many FOSS tools that have this feature, e.g., the ones described below: https://www.baeldung.com/linux/files-pdf-annotate https://pdf.wondershare.com/how-to/linux-annotate-pdf.html

I tried all of that. Without going into the details since this discussion is already long and I have no more to say, they either have too basic features (okular, evince) or are graphics software re-adapted for PDF import that will mess up the layout of the PDF entirely or annotate one page at a time (libreoffice draw, inkscape).

JakubMelka commented 10 months ago

Hello @raffaem , what do you need for annotation in PDF4QT?

raffaem commented 10 months ago

144

JakubMelka commented 10 months ago

@hongyi-zhao , please download Qt 6.6. I am not responsible that linux package managers are not providing them.

ddonevski commented 10 months ago

I think that the required Qt libraries may become available with kernel update: https://9to5linux.com/ubuntu-22-04-lts-is-now-powered-by-linux-kernel-6-5-from-ubuntu-23-10

hongyi-zhao commented 10 months ago

See below:

$ sudo apt update
$ sudo apt full-upgrade
$ sudo reboot
$ sudo apt install libqt6*
$ proxychains-ng-socks5 cmake -B build -S . -DPDF4QT_INSTALL_QT_DEPENDENCIES=0 -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX='/' -DCMAKE_BUILD_TYPE=Release
-- Build type - CMAKE_BUILD_TYPE: Release
-- Running vcpkg install
Detecting compiler hash for triplet x64-linux...
All requested packages are currently installed.
Total install time: 880 ns
The package zlib is compatible with built-in CMake targets:

    find_package(ZLIB REQUIRED)
    target_link_libraries(main PRIVATE ZLIB::ZLIB)

The package libpng is compatible with built-in CMake targets:

    find_package(PNG REQUIRED)
    target_link_libraries(main PRIVATE PNG::PNG)

freetype is compatible with built-in CMake targets:

    find_package(Freetype REQUIRED)
    target_link_libraries(main PRIVATE Freetype::Freetype) # since CMake 3.10

The package lcms provides CMake targets:

    find_package(lcms2 CONFIG REQUIRED)
    target_link_libraries(main PRIVATE lcms2::lcms2)

openjpeg provides CMake targets:

  # this is heuristically generated, and may not be correct
  find_package(OpenJPEG CONFIG REQUIRED)
  target_link_libraries(main PRIVATE openjp2)

openjpeg provides pkg-config modules:

    # JPEG2000 library (Part 1 and 2)
    libopenjp2

The package openssl is compatible with built-in CMake targets:

    find_package(OpenSSL REQUIRED)
    target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto)

tbb provides CMake targets:

  # this is heuristically generated, and may not be correct
  find_package(TBB CONFIG REQUIRED)
  target_link_libraries(main PRIVATE TBB::tbb TBB::tbbmalloc)

tbb provides pkg-config modules:

    # C++ library for parallel programming on multi-core processors.
    tbb

-- Running vcpkg install - done
-- Could NOT find Qt6TextToSpeech (missing: Qt6TextToSpeech_DIR)
CMake Error at /home/werner/Public/repo/github.com/JakubMelka/vcpkg/scripts/buildsystems/vcpkg.cmake:859 (_find_package):
  Found package configuration file:

    /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake

  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find Qt component "TextToSpeech".

  Expected Config file at
  "/usr/lib/x86_64-linux-gnu/cmake/Qt6TextToSpeech/Qt6TextToSpeechConfig.cmake"
  does NOT exist

Call Stack (most recent call first):
  CMakeLists.txt:58 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/werner/Public/repo/github.com/JakubMelka/PDF4QT.git/build/CMakeFiles/CMakeOutput.log".
ddonevski commented 10 months ago

According to the article on kernel update, newer versions of packages, those released after Ubuntu 22.04 should become available in 22.04. I suppose the author meant packages from 23.04. Note that in 23.04, Qt packages are lower than version 6.6. They are 6.4.: https://packages.ubuntu.com/lunar/libs/libqt6texttospeech6 Also, there's lots of them in both runtime and development versions so I think that downloading Qt really is the only option.

hongyi-zhao commented 10 months ago

Another odd thing: After kernel update, I clicked the shutdown button and the pop-up menu that was displayed had a lot fewer items, as shown below:

image

ddonevski commented 10 months ago

Since you have installed libqt6* and the error massage stated:

Failed to find Qt component "TextToSpeech".

Expected Config file at "/usr/lib/x86_64-linux-gnu/cmake/Qt6TextToSpeech/Qt6TextToSpeechConfig.cmake" does NOT exist

did you check if the file really does not exist in that path? Also, could you post the otput of: dpgk -l | grep libqt6 So we can see which packages are installed.

JakubMelka commented 10 months ago

The project requires Qt 6.6 to compile it. Just download it from Qt's web pages.

hongyi-zhao commented 10 months ago

Since you have installed libqt6* and the error massage stated:

Failed to find Qt component "TextToSpeech".

Expected Config file at "/usr/lib/x86_64-linux-gnu/cmake/Qt6TextToSpeech/Qt6TextToSpeechConfig.cmake" does NOT exist

did you check if the file really does not exist in that path? Also, could you post the otput of: dpgk -l | grep libqt6 So we can see which packages are installed.

werner@X10DAi:~$ ls /usr/lib/x86_64-linux-gnu/cmake/Qt6TextToSpeech/Qt6TextToSpeechConfig.cmake
ls: cannot access '/usr/lib/x86_64-linux-gnu/cmake/Qt6TextToSpeech/Qt6TextToSpeechConfig.cmake': No such file or directory
werner@X10DAi:~$ dpkg -l | grep libqt6
ii  libqt63danimation6:amd64                          6.2.4+dfsg-1                            amd64        Qt 6 3D Animation library
ii  libqt63dcore6:amd64                               6.2.4+dfsg-1                            amd64        Qt 6 3D Core library
ii  libqt63dextras6:amd64                             6.2.4+dfsg-1                            amd64        Qt 6 3D extras library
ii  libqt63dinput6:amd64                              6.2.4+dfsg-1                            amd64        Qt 6 3D Input library
ii  libqt63dlogic6:amd64                              6.2.4+dfsg-1                            amd64        Qt 6 3D Logic library
ii  libqt63dquick6:amd64                              6.2.4+dfsg-1                            amd64        Qt 6 3D Quick library
ii  libqt63dquickanimation6:amd64                     6.2.4+dfsg-1                            amd64        Qt 6 3D Quick Animation library
ii  libqt63dquickextras6:amd64                        6.2.4+dfsg-1                            amd64        Qt 6 3D Quick extras library
ii  libqt63dquickinput6:amd64                         6.2.4+dfsg-1                            amd64        Qt 6 3D Quick Input library
ii  libqt63dquickrender6:amd64                        6.2.4+dfsg-1                            amd64        Qt 6 3D Quick Renderer library
ii  libqt63dquickscene2d6:amd64                       6.2.4+dfsg-1                            amd64        Qt 6 3D Quick Scene 2D library
ii  libqt63drender6:amd64                             6.2.4+dfsg-1                            amd64        Qt 6 3D Renderer library
ii  libqt6bluetooth6:amd64                            6.2.4-1                                 amd64        Qt 6 Connectivity Bluetooth library
ii  libqt6bluetooth6-bin                              6.2.4-1                                 amd64        Qt 6 Connectivity Bluetooth module helper binaries
ii  libqt6bodymovin6:amd64                            6.2.4-1                                 amd64        Qt 6 Lottie Bodymovin library
ii  libqt6bodymovin6-dev:amd64                        6.2.4-1                                 amd64        Qt 6 Lottie - development files
ii  libqt6charts6:amd64                               6.2.4-1                                 amd64        Qt 6 charts library
ii  libqt6charts6-dev:amd64                           6.2.4-1                                 amd64        Qt 6 charts - development files
ii  libqt6chartsqml6:amd64                            6.2.4-1                                 amd64        Qt 6 charts QML library
ii  libqt6concurrent6:amd64                           6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 concurrent module
ii  libqt6core5compat6:amd64                          6.2.4-1                                 amd64        Qt 6 Qt5Compat library
ii  libqt6core5compat6-dev:amd64                      6.2.4-1                                 amd64        Qt 6 Qt5Compat - development files
ii  libqt6core6:amd64                                 6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 core module
ii  libqt6datavisualization6:amd64                    6.2.4-1                                 amd64        Qt 6 Data Visualization library
ii  libqt6datavisualization6-dev:amd64                6.2.4-1                                 amd64        Qt 6 Data Visualization - development files
ii  libqt6dbus6:amd64                                 6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 D-Bus module
ii  libqt6designer6:amd64                             6.2.4-1                                 amd64        Qt 6 Designer library
ii  libqt6designercomponents6:amd64                   6.2.4-1                                 amd64        Qt 6 Designer Components library
ii  libqt6gui6:amd64                                  6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 GUI module
ii  libqt6help6:amd64                                 6.2.4-1                                 amd64        Qt 6 Help library
ii  libqt6hunspellinputmethod6:amd64                  6.2.4+dfsg-1                            amd64        Qt 6 Hunspell Input Method helper library
ii  libqt6keychain1:amd64                             0.13.2-5                                amd64        Qt API to store passwords (QT6 version)
ii  libqt6labsanimation6:amd64                        6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Labs Animation library
ii  libqt6labsfolderlistmodel6:amd64                  6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Labs FolderListModel library
ii  libqt6labsqmlmodels6:amd64                        6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Labs QML Models library
ii  libqt6labssettings6:amd64                         6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Labs Settings library
ii  libqt6labssharedimage6:amd64                      6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Labs Shared Image library
ii  libqt6labswavefrontmesh6:amd64                    6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Labs WavefrontMesh library
ii  libqt6multimedia6:amd64                           6.2.4-1                                 amd64        Qt 6 Multimedia library
ii  libqt6multimediaquick6:amd64                      6.2.4-1                                 amd64        Qt 6 Multimedia Quick library
ii  libqt6multimediawidgets6:amd64                    6.2.4-1                                 amd64        Qt 6 Multimedia Widgets library
ii  libqt6network6:amd64                              6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 network module
ii  libqt6networkauth6:amd64                          6.2.4-1                                 amd64        Qt 6 QtNetworkAuth library
ii  libqt6networkauth6-dev:amd64                      6.2.4-1                                 amd64        Qt 6 QtNetworkAuth - development files
ii  libqt6nfc6:amd64                                  6.2.4-1                                 amd64        Qt 6 Connectivity NFC library
ii  libqt6opengl6:amd64                               6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 OpenGL module
ii  libqt6opengl6-dev:amd64                           6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 OpenGL library development files
ii  libqt6openglwidgets6:amd64                        6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 OpenGL widgets module
ii  libqt6pdf6:amd64                                  6.2.4+dfsg-6ubuntu1                     amd64        Qt 6 PDF library
ii  libqt6pdfquick6:amd64                             6.2.4+dfsg-6ubuntu1                     amd64        Qt 6 PDF Quick library
ii  libqt6pdfwidgets6:amd64                           6.2.4+dfsg-6ubuntu1                     amd64        Qt 6 PDF Widgets library
ii  libqt6positioning6:amd64                          6.2.4-1                                 amd64        Qt 6 Positioning library
ii  libqt6positioning6-plugins:amd64                  6.2.4-1                                 amd64        Qt 6 Positioning module - position plugins
ii  libqt6positioningquick6:amd64                     6.2.4-1                                 amd64        Qt 6 Positioning library - Qt Quick library
ii  libqt6printsupport6:amd64                         6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 print support module
ii  libqt6qml6:amd64                                  6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 QML module
ii  libqt6qmlcore6:amd64                              6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 QML Core library
ii  libqt6qmllocalstorage6:amd64                      6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 QML Local Storage library
ii  libqt6qmlmodels6:amd64                            6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 QML Models library
ii  libqt6qmlworkerscript6:amd64                      6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 QML WorkerScript library
ii  libqt6qmlxmllistmodel6:amd64                      6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 QML XmlListModel library
ii  libqt6quick3d6:amd64                              6.2.4-1                                 amd64        Qt 6 Quick 3D library
ii  libqt6quick3dassetimport6:amd64                   6.2.4-1                                 amd64        Qt 6 Quick 3D Asset Import library
ii  libqt6quick3dassetutils6:amd64                    6.2.4-1                                 amd64        Qt 6 Quick 3D Asset Utils library
ii  libqt6quick3deffects6:amd64                       6.2.4-1                                 amd64        Qt 6 Quick 3D Effects library
ii  libqt6quick3dhelpers6:amd64                       6.2.4-1                                 amd64        Qt 6 Quick 3D Helpers library
ii  libqt6quick3diblbaker6:amd64                      6.2.4-1                                 amd64        Qt 6 Quick 3D IblBaker library
ii  libqt6quick3dparticles6:amd64                     6.2.4-1                                 amd64        Qt 6 Quick 3D Particles library
ii  libqt6quick3druntimerender6:amd64                 6.2.4-1                                 amd64        Qt 6 Quick 3D Runtime Renderer library
ii  libqt6quick3dutils6:amd64                         6.2.4-1                                 amd64        Qt 6 Quick 3D Utils library
ii  libqt6quick6:amd64                                6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Quick library
ii  libqt6quickcontrols2-6:amd64                      6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Quick Controls 2 library
ii  libqt6quickcontrols2impl6:amd64                   6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Quick Controls 2 Impl library
ii  libqt6quickdialogs2-6:amd64                       6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Quick Dialogs 2 library
ii  libqt6quickdialogs2quickimpl6:amd64               6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Quick Dialogs 2 Quick Impl library
ii  libqt6quickdialogs2utils6:amd64                   6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Quick Dialogs 2 Utils library
ii  libqt6quicklayouts6:amd64                         6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Quick Layouts library
ii  libqt6quickparticles6:amd64                       6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Quick particles library
ii  libqt6quickshapes6:amd64                          6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Quick Shapes library
ii  libqt6quicktemplates2-6:amd64                     6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Quick Templates 2 library
ii  libqt6quicktest6:amd64                            6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Quick Test library
ii  libqt6quicktimeline6:amd64                        6.2.4-1                                 amd64        Qt 6 Quick Timeline library
ii  libqt6quicktimeline6-dev:amd64                    6.2.4-1                                 amd64        Qt 6 Quick Timeline - development files
ii  libqt6quickwidgets6:amd64                         6.2.4+dfsg-3ubuntu1                     amd64        Qt 6 Quick Widgets library
ii  libqt6remoteobjects6:amd64                        6.2.4-1                                 amd64        Qt 6 Remote Objects library
ii  libqt6remoteobjects6-bin                          6.2.4-1                                 amd64        Qt 6 Remote Objects - the Replica Compiler (repc)
ii  libqt6remoteobjectsqml6:amd64                     6.2.4-1                                 amd64        Qt 6 Remote Objects QML library
ii  libqt6scxml6:amd64                                6.2.4-1                                 amd64        Qt 6 SCXML library
ii  libqt6scxml6-bin                                  6.2.4-1                                 amd64        Qt 6 SCXML helper binaries
ii  libqt6scxmlqml6:amd64                             6.2.4-1                                 amd64        Qt 6 SCXML QML library
ii  libqt6sensors6:amd64                              6.2.4-1                                 amd64        Qt 6 Sensors library
ii  libqt6sensors6-dev:amd64                          6.2.4-1                                 amd64        Qt 6 Sensors - development files
ii  libqt6sensorsquick6:amd64                         6.2.4-1                                 amd64        Qt 6 Sensors Quick library
ii  libqt6serialbus6:amd64                            6.2.4-1                                 amd64        Qt 6 Serial Bus library
ii  libqt6serialbus6-bin                              6.2.4-1                                 amd64        Qt 6 Serial Bus helper binaries
ii  libqt6serialbus6-dev:amd64                        6.2.4-1                                 amd64        Qt 6 Serial Bus development files
ii  libqt6serialbus6-plugins:amd64                    6.2.4-1                                 amd64        Qt 6 Serial Bus plugins
ii  libqt6serialport6:amd64                           6.2.4-1                                 amd64        Qt 6 serial port support library
ii  libqt6serialport6-dev:amd64                       6.2.4-1                                 amd64        Qt 6 serial port development files
ii  libqt6shadertools6:amd64                          6.2.4-2                                 amd64        Qt 6 shader tools module
ii  libqt6shadertools6-dev:amd64                      6.2.4-2                                 amd64        Qt 6 shader tools module - development files
ii  libqt6sql6:amd64                                  6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 SQL module
ii  libqt6sql6-ibase:amd64                            6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 Firebird database driver
ii  libqt6sql6-mysql:amd64                            6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 MySQL database driver
ii  libqt6sql6-odbc:amd64                             6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 ODBC database driver
ii  libqt6sql6-psql:amd64                             6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 PostgreSQL database driver
ii  libqt6sql6-sqlite:amd64                           6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 SQLite 3 database driver
ii  libqt6statemachine6:amd64                         6.2.4-1                                 amd64        Qt 6 State Machine library
ii  libqt6statemachineqml6:amd64                      6.2.4-1                                 amd64        Qt 6 State Machine QML library
ii  libqt6svg6:amd64                                  6.2.4-1ubuntu1                          amd64        Qt 6 SVG library
ii  libqt6svg6-dev:amd64                              6.2.4-1ubuntu1                          amd64        Qt 6 SVG - development files
ii  libqt6svgwidgets6:amd64                           6.2.4-1ubuntu1                          amd64        Qt 6 SVG Widgets library
ii  libqt6test6:amd64                                 6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 test module
ii  libqt6uitools6:amd64                              6.2.4-1                                 amd64        Qt 6 UI tools library
ii  libqt6virtualkeyboard6:amd64                      6.2.4+dfsg-1                            amd64        Qt 6 Virtual Keyboard library
ii  libqt6virtualkeyboard6-dev:amd64                  6.2.4+dfsg-1                            amd64        Qt 6 Virtual Keyboard - development files
ii  libqt6waylandclient6:amd64                        6.2.4-1                                 amd64        Qt 6 Wayland Client library
ii  libqt6waylandcompositor6:amd64                    6.2.4-1                                 amd64        Qt 6 Wayland Compositor library
ii  libqt6waylandeglclienthwintegration6:amd64        6.2.4-1                                 amd64        Qt 6 Wayland WaylandEglClientHwIntegration library
ii  libqt6waylandeglcompositorhwintegration6:amd64    6.2.4-1                                 amd64        Qt 6 Wayland WaylandEglCompositorHwIntegration library
ii  libqt6webchannel6:amd64                           6.2.4-1ubuntu1                          amd64        Qt 6 WebChannel library
ii  libqt6webchannel6-dev:amd64                       6.2.4-1ubuntu1                          amd64        Qt 6 WebChannel library - development files
ii  libqt6webengine6-data                             6.2.4+dfsg-6ubuntu1                     all          Qt 6 Web content engine library - data
ii  libqt6webenginecore6:amd64                        6.2.4+dfsg-6ubuntu1                     amd64        Qt 6 WebEngine Core library
ii  libqt6webenginecore6-bin                          6.2.4+dfsg-6ubuntu1                     amd64        Qt 6 WebEngine Core binaries
ii  libqt6webenginequick6:amd64                       6.2.4+dfsg-6ubuntu1                     amd64        Qt 6 WebEngine Quick library
ii  libqt6webenginequickdelegatesqml6:amd64           6.2.4+dfsg-6ubuntu1                     amd64        Qt 6 WebEngine Quick Delegates QML library
ii  libqt6webenginewidgets6:amd64                     6.2.4+dfsg-6ubuntu1                     amd64        Qt 6 WebEngine Widgets library
ii  libqt6websockets6:amd64                           6.2.4-1                                 amd64        Qt 6 WebSockets library
ii  libqt6websockets6-dev:amd64                       6.2.4-1                                 amd64        Qt 6 WebSockets library - development files
ii  libqt6webview6:amd64                              6.2.4-2                                 amd64        Qt 6 WebView library
ii  libqt6webviewquick6:amd64                         6.2.4-2                                 amd64        Qt 6 WebView Quick library
ii  libqt6widgets6:amd64                              6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 widgets module
ii  libqt6wlshellintegration6:amd64                   6.2.4-1                                 amd64        Qt 6 Wayland ShellIntegration library
ii  libqt6xml6:amd64                                  6.2.4+dfsg-2ubuntu1.1                   amd64        Qt 6 XML module
werner@X10DAi:~$ 
hongyi-zhao commented 10 months ago

The project requires Qt 6.6 to compile it. Just download it from Qt's web pages.

I see. Thank you again.

ddonevski commented 10 months ago

Well, the error message stated that a file was not found and it turns out it's really not there. I'm not sure whether it should be placed there just by installing packages. But anyway, all your packages are v.6.2 and v.6.6 is required so downloading Qt is the only option. And it's not really that cumbersome it you compare it with the number of system Qt6 packages you've installed. Just look at the length of the packages list.

And text to speech package isn't in the list of packages you posted. It seems that it wasn't present in Qt v.6.2. If it was, you could run: dpkg-query -L to get a list of files installed from the package and see it it was supposed to install the .cmake file which wasn't found in your build. This is all irrelevant since we've concluded that it's required to either download Qt 6.6 or use the option JakubMelka posted below. But I'm writing it because it may be generally useful for troubleshooting in situations like this one.

JakubMelka commented 10 months ago

@hongyi-zhao, another options exist, clone my repository and use Github Actions to build the software. It automatically builds PDF4QT using Qt 6.6, see here:

https://github.com/JakubMelka/PDF4QT/actions/runs/7513692135

You actually do not need to register, you can download qt automatically using this: https://aqtinstall.readthedocs.io/en/latest/getting_started.html#installing-a-subset-of-qt-archives-advanced

hongyi-zhao commented 10 months ago

@JakubMelka If so, can we build a statically linked Linux version of PDF4QT that includes all necessary libraries?

JakubMelka commented 10 months ago

@hongyi-zhao, I do not like to do it. It would mean to enlarge 5 executable files with dozen of MB. I think it is not a problem to download Qt, or not?

hongyi-zhao commented 10 months ago

At present, I want to manage different Qt versions with Lmod, and I found the following module file examples:

  1. The module file from here:
#%Module
proc ModulesHelp { } {
    puts stderr {

Description
===========
Qt is a comprehensive cross-platform C++ application framework.

More information
================
 - Homepage: https://qt.io/
    }
}

module-whatis {Description: Qt is a comprehensive cross-platform C++ application framework.}
module-whatis {Homepage: https://qt.io/}
module-whatis {URL: https://qt.io/}

module load dev/gcc/8.2
module load dev/cmake/3.17.1/gcc-8.2

set QTroot /usr/local/packages/apps/Qt5/5.12/gcc-8.2-cmake-3.17.1

# Add the fonts or it won't render text
setenv QT_QPA_FONTDIR /usr/share/fonts/dejavu/

# Add map XDG_RUNTIME_DIR to $TMPDIR
set TMPDIR $::env(TMPDIR)
setenv XDG_RUNTIME_DIR $TMPDIR

prepend-path    CMAKE_PREFIX_PATH               $QTroot
prepend-path    CPATH           $QTroot/include
prepend-path    LD_LIBRARY_PATH         $QTroot/lib
prepend-path    LIBRARY_PATH            $QTroot/lib
prepend-path    PATH            $QTroot/bin
prepend-path    PKG_CONFIG_PATH         $QTroot/lib/pkgconfig
  1. And the one below from my HPC cluster:
[sch1438@ln2%bscc-t6 ~]$ cat /public1/soft/modulefiles/qt/5.13.0
#%Module######################################################################
##
##      qt software modulefile
##
proc ModulesHelp { } {
        puts stderr "Qt is used mainly for developing application software with graphical user interfaces . "
        puts stderr "INSTALL DIR IS : /public1/soft/qt/5.13.0  "
        puts stderr "connect:songzf@paratera.com"
}

#set version     5.13.0
conflict Qt
set root   /public1/soft/qt/5.13.0/gcc_64

prepend-path PATH  $root/bin
prepend-path PATH  $root/libexec
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path INCLUDE  $root/include
prepend-path LIBRARY_PATH $root/lib
prepend-path CPATH  $root/include

However, as you can see, the common environment variables set for QT are different, so I would like to know which environment variables I should set.

BTW, here you can find a compile and install script of Qt5 from source, and I'm not sure if this applies to the latest version of Qt as well.

Regards, Zhao

J5cott commented 9 months ago

Seems like a cool project but I cannot get this to install on pop os from the pop shop, or from any other instructions I have found. I have installed all of the dependencies. Looks like a cool project though! Good luck with it!

JakubMelka commented 9 months ago

Hello @J5cott , have you tried AppImage version?

J5cott commented 9 months ago

@JakubMelka Aha! Never used an appimage on linux before so I skipped that option. Had to look it up but that seems to work and it was the easiest thing I could have tried! Thank you sir!

JakubMelka commented 9 months ago

OK, I think we can close this issue, as you can always download newest version of Qt and build the project.