Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Working QPdfDocument class/module/etc...
Forum Updated to NodeBB v4.3 + New Features

Working QPdfDocument class/module/etc...

Scheduled Pinned Locked Moved Unsolved General and Desktop
33 Posts 8 Posters 6.3k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Chris KawaC Chris Kawa

    @RazerMind Slow down. If you have these files you don't need to compile the module. It's already done. What's the path to Qt5Pdf.dll, Qt5Pdf.lib and QPdfDocument files?

    I might have been wrong about them not being included in the installer. Like I said - there was a licensing issue a while back, but maybe it's been resolved for Qt5 too. I just didn't follow it that closely.

    R Offline
    R Offline
    RazerMind
    wrote on last edited by RazerMind
    #16

    @Chris-Kawa said in Working QPdfDocument class/module/etc...:

    Qt5Pdf.dll, Qt5Pdf.lib

    I have as you may see. DLL and PDB files of course inside .\BIN folder. LIB - inside .\LIB
    but there are no corresponding headers for QPdfDocument and it's sub-elements inside .\INCLUDE folder
    And no corresponding files like:
    qt_lib_pdf.pri
    qt_lib_pdf_private.pri
    qt_lib_pdfwidgets.pri
    qt_lib_pdfwidgets_private.pri
    qt_plugin_qpdf.pri
    qt_plugin_qwebengineview.pri
    inside .\mkspecs\modules folder.
    Which create in fact the ability to be searchable Qt module for string inside *.pro file like:
    QT += pdf

    1 Reply Last reply
    0
    • R RazerMind

      Yeah, I’m starting to lose track of what the online installer did and what I need to do.
      After his actions - yes, there are files
      Qt5Pdf.dll
      Qt5Pdfd.dll
      Qt5PdfWidgets.dll
      Qt5PdfWidgetsd.dll
      qpdf_p.h
      Qt5Pdf.lib
      Qt5Pdfd.lib
      Qt5PdfWidgets.lib
      Qt5PdfWidgetsd.lib
      Qt5Pdf.pdb
      Qt5Pdfd.pdb
      Qt5PdfWidgets.pdb
      Qt5PdfWidgetsd.pdb
      qpdf.pdb
      qpdfd.pdb
      Qt5Pdf.prl
      Qt5Pdfd.prl
      Qt5PdfWidgets.prl
      Qt5PdfWidgetsd.prl
      within which there is clearly a realization of the class I require and its supporting elements.
      But there are no correct files to include the header and Qt-module.
      And to get them you need to run a compilation of everything inside the webengine module?

      Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by Chris Kawa
      #17

      Looking at it some more the issue might be ongoing after all. It's a bit of a mess, but not a technical one, more of a policy and marketing shambles. At some point QtPdf was removed from installer and available for purchase from the marketplace. But then it was removed from there, so now it's in some weird state where installer still distributes dlls as part of the QtWebEngine module, but does not include other files you mentioned. Depending on where you look it seems to be intentional.
      I think the easiest might be to contact Qt Company directly to clear the status of that module, otherwise you'll have to rebuild QtWebEngine to get these files yourself.

      R 1 Reply Last reply
      0
      • Chris KawaC Chris Kawa

        Looking at it some more the issue might be ongoing after all. It's a bit of a mess, but not a technical one, more of a policy and marketing shambles. At some point QtPdf was removed from installer and available for purchase from the marketplace. But then it was removed from there, so now it's in some weird state where installer still distributes dlls as part of the QtWebEngine module, but does not include other files you mentioned. Depending on where you look it seems to be intentional.
        I think the easiest might be to contact Qt Company directly to clear the status of that module, otherwise you'll have to rebuild QtWebEngine to get these files yourself.

        R Offline
        R Offline
        RazerMind
        wrote on last edited by RazerMind
        #18

        @Chris-Kawa
        created https://bugreports.qt.io/browse/QTBUG-113125
        Hope, it will be commented soon...

        R 1 Reply Last reply
        0
        • R RazerMind

          @Chris-Kawa
          created https://bugreports.qt.io/browse/QTBUG-113125
          Hope, it will be commented soon...

          R Offline
          R Offline
          RazerMind
          wrote on last edited by RazerMind
          #19

          Of course, it was my fault, I should have read the help DOCs more carefully...
          But even developers had an unclear sense of humor when they created support for PDF files....
          As it turned out - it is in fact as if there is no)))) You can not take and combine two PDF files.
          You can't append new pdf file into existing one... The simplest operations are simply does not exist at all!
          The QPdfDocument class does absolutely incomprehensible operations. Nothing useful...
          It’s just horror and gloom...
          I thought I’d do this job in half a day. And it’s already been two weeks since I just figured out that there’s nothing you can do that makes sense in these Qt* classes...
          Why does python have default support for everything with pdf? And here after years there is nothing sensible! And even in the 6th branch nothing needed is created!

          kkoehneK 1 Reply Last reply
          0
          • R RazerMind

            Of course, it was my fault, I should have read the help DOCs more carefully...
            But even developers had an unclear sense of humor when they created support for PDF files....
            As it turned out - it is in fact as if there is no)))) You can not take and combine two PDF files.
            You can't append new pdf file into existing one... The simplest operations are simply does not exist at all!
            The QPdfDocument class does absolutely incomprehensible operations. Nothing useful...
            It’s just horror and gloom...
            I thought I’d do this job in half a day. And it’s already been two weeks since I just figured out that there’s nothing you can do that makes sense in these Qt* classes...
            Why does python have default support for everything with pdf? And here after years there is nothing sensible! And even in the 6th branch nothing needed is created!

            kkoehneK Offline
            kkoehneK Offline
            kkoehne
            Moderators
            wrote on last edited by
            #20

            @RazerMind , well, let me push back. The documentation starts with

            The Qt PDF module contains classes and functions for rendering PDF documents.

            https://doc.qt.io/qt-5/qtpdf-index.html. Rendering is the process of showing PDF, not writing a new PDF from scratch, or appending two PDF's.

            But even developers had an unclear sense of humor when they created support for PDF files.

            Well, rendering and printing PDF's is actually the most basic (and sought-after) operations for applications that deal with PDF's . Qt PDF actually just wraps the functionality in Chromium, which is also just about rendering. Printing PDF's is somethign that Qt generic printer framework supports.

            I hear that you have a different use case, but don't blame the developers that they focussed on the top priority : Rendering PDF's, and generating them (by the way of printing).

            Director R&D, The Qt Company

            R 1 Reply Last reply
            1
            • kkoehneK kkoehne

              @RazerMind , well, let me push back. The documentation starts with

              The Qt PDF module contains classes and functions for rendering PDF documents.

              https://doc.qt.io/qt-5/qtpdf-index.html. Rendering is the process of showing PDF, not writing a new PDF from scratch, or appending two PDF's.

              But even developers had an unclear sense of humor when they created support for PDF files.

              Well, rendering and printing PDF's is actually the most basic (and sought-after) operations for applications that deal with PDF's . Qt PDF actually just wraps the functionality in Chromium, which is also just about rendering. Printing PDF's is somethign that Qt generic printer framework supports.

              I hear that you have a different use case, but don't blame the developers that they focussed on the top priority : Rendering PDF's, and generating them (by the way of printing).

              R Offline
              R Offline
              RazerMind
              wrote on last edited by RazerMind
              #21

              @kkoehne said in Working QPdfDocument class/module/etc...:

              Rendering PDF's, and generating them

              I would agree if it would sound like "Rendering PDF's, and generating them al least with 2 options - or printing or cat'ing/appending".
              I can't really imagine situations where printing had THIS HUGE influence over concatenating to one file of many/adding one to the tail of another PDF file. Yes, all other possible operations that are performed by specialized software systems sharpened for this - yes, these are already very serious things that should not be left within the framework of this library.
              But there is ONLY ONE rendering/printing. It's horrible...

              D 1 Reply Last reply
              0
              • R RazerMind

                @kkoehne said in Working QPdfDocument class/module/etc...:

                Rendering PDF's, and generating them

                I would agree if it would sound like "Rendering PDF's, and generating them al least with 2 options - or printing or cat'ing/appending".
                I can't really imagine situations where printing had THIS HUGE influence over concatenating to one file of many/adding one to the tail of another PDF file. Yes, all other possible operations that are performed by specialized software systems sharpened for this - yes, these are already very serious things that should not be left within the framework of this library.
                But there is ONLY ONE rendering/printing. It's horrible...

                D Offline
                D Offline
                DerReisende
                wrote on last edited by
                #22

                @RazerMind If you need to concat pdf files and do other modifications to them it might be better to use the podofo framework for it. It does work on windows as well.

                R 1 Reply Last reply
                0
                • D DerReisende

                  @RazerMind If you need to concat pdf files and do other modifications to them it might be better to use the podofo framework for it. It does work on windows as well.

                  R Offline
                  R Offline
                  RazerMind
                  wrote on last edited by
                  #23

                  @DerReisende ouch, of course NOW i understand that I can't do anything really mature with help of Qt-based modules/classes. And thus I have to search any small/easy compiling open-source project which can do this trick...
                  OR ask guys who can easily write code on python - to help me - to create a script which can do this job easily... And so I will just call it in async thread.
                  But this is very inconvenient and strange when, figuratively speaking, I have a huge mountain-library under my feet, in which there is everything and even more, but this smallness is not at all.

                  JonBJ D 2 Replies Last reply
                  0
                  • R RazerMind

                    @DerReisende ouch, of course NOW i understand that I can't do anything really mature with help of Qt-based modules/classes. And thus I have to search any small/easy compiling open-source project which can do this trick...
                    OR ask guys who can easily write code on python - to help me - to create a script which can do this job easily... And so I will just call it in async thread.
                    But this is very inconvenient and strange when, figuratively speaking, I have a huge mountain-library under my feet, in which there is everything and even more, but this smallness is not at all.

                    JonBJ Online
                    JonBJ Online
                    JonB
                    wrote on last edited by
                    #24

                    @RazerMind
                    It won't help much with your disappointment with Qt, but if you might wish to interoperate with Python programmers for the integration benefits that offers, maybe you should consider using PySide and program for Qt in Python rather than C++?

                    R 1 Reply Last reply
                    0
                    • JonBJ JonB

                      @RazerMind
                      It won't help much with your disappointment with Qt, but if you might wish to interoperate with Python programmers for the integration benefits that offers, maybe you should consider using PySide and program for Qt in Python rather than C++?

                      R Offline
                      R Offline
                      RazerMind
                      wrote on last edited by RazerMind
                      #25

                      @JonB said in Working QPdfDocument class/module/etc...:

                      maybe you should consider using PySide and program for Qt in Python rather than C++?

                      Definitely no. I use only C++. Python will be used as standalone exe - file script interpretation tool. only.

                      1 Reply Last reply
                      0
                      • R RazerMind

                        @DerReisende ouch, of course NOW i understand that I can't do anything really mature with help of Qt-based modules/classes. And thus I have to search any small/easy compiling open-source project which can do this trick...
                        OR ask guys who can easily write code on python - to help me - to create a script which can do this job easily... And so I will just call it in async thread.
                        But this is very inconvenient and strange when, figuratively speaking, I have a huge mountain-library under my feet, in which there is everything and even more, but this smallness is not at all.

                        D Offline
                        D Offline
                        DerReisende
                        wrote on last edited by
                        #26

                        @RazerMind said in Working QPdfDocument class/module/etc...:

                        @DerReisende ouch, of course NOW i understand that I can't do anything really mature with help of Qt-based modules/classes. And thus I have to search any small/easy compiling open-source project which can do this trick...
                        OR ask guys who can easily write code on python - to help me - to create a script which can do this job easily... And so I will just call it in async thread.
                        But this is very inconvenient and strange when, figuratively speaking, I have a huge mountain-library under my feet, in which there is everything and even more, but this smallness is not at all.

                        I wouldn't say you cannot do "mature" things with Qt - it depends what you want to do and Qt never claimed to be a full-fledged PDF editing library. AFAIK on windows you wouldn't be able your task with the native WIN32 API as well.
                        If you can do your task easily in python then do it - or use ghostscript to do the stuff for you.

                        R 1 Reply Last reply
                        0
                        • D DerReisende

                          @RazerMind said in Working QPdfDocument class/module/etc...:

                          @DerReisende ouch, of course NOW i understand that I can't do anything really mature with help of Qt-based modules/classes. And thus I have to search any small/easy compiling open-source project which can do this trick...
                          OR ask guys who can easily write code on python - to help me - to create a script which can do this job easily... And so I will just call it in async thread.
                          But this is very inconvenient and strange when, figuratively speaking, I have a huge mountain-library under my feet, in which there is everything and even more, but this smallness is not at all.

                          I wouldn't say you cannot do "mature" things with Qt - it depends what you want to do and Qt never claimed to be a full-fledged PDF editing library. AFAIK on windows you wouldn't be able your task with the native WIN32 API as well.
                          If you can do your task easily in python then do it - or use ghostscript to do the stuff for you.

                          R Offline
                          R Offline
                          RazerMind
                          wrote on last edited by RazerMind
                          #27

                          @DerReisende said in Working QPdfDocument class/module/etc...:

                          never claimed to be a full-fledged PDF editing library

                          Why you considering simplest task cat or append PDF into one/with one - as such big/complex/etc.... edit capability that such job should be done only far-far beyond the border of this current library?
                          Yes, from the point of view of coding as a process - this feature would certainly require significant effort. But the paradox of library development always lies in the fact that by doing a lot at the first stage, we win in a small way at the second. First you need to do a lot - then with less effort to do something bigger and easier. And the desired functionality of working with PDF files is in these operations in 90% of cases. And how could it turn out that it was this that suddenly did not appear in development at all? It doesn't fit in my head. Sorry....

                          P.S.
                          By the way, regarding the submitted bug, so far there has not been a single reasonable comment from the developers ....

                          jsulmJ 1 Reply Last reply
                          0
                          • R RazerMind

                            @DerReisende said in Working QPdfDocument class/module/etc...:

                            never claimed to be a full-fledged PDF editing library

                            Why you considering simplest task cat or append PDF into one/with one - as such big/complex/etc.... edit capability that such job should be done only far-far beyond the border of this current library?
                            Yes, from the point of view of coding as a process - this feature would certainly require significant effort. But the paradox of library development always lies in the fact that by doing a lot at the first stage, we win in a small way at the second. First you need to do a lot - then with less effort to do something bigger and easier. And the desired functionality of working with PDF files is in these operations in 90% of cases. And how could it turn out that it was this that suddenly did not appear in development at all? It doesn't fit in my head. Sorry....

                            P.S.
                            By the way, regarding the submitted bug, so far there has not been a single reasonable comment from the developers ....

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #28

                            @RazerMind said in Working QPdfDocument class/module/etc...:

                            Why you considering simplest task cat or append PDF into one/with one - as such big/complex/etc

                            Because PDF is not a simple text file, so it is not such a "simple task".
                            You can't expect a framework like Qt to give you solutions for each and every problem you have. There will always be something not covered by the framework.

                            "By the way, regarding the submitted bug, so far there has not been a single reasonable comment from the developers ...." - I read what you wrote there. To be honest as Qt framework developer I would not have much motivation to work on such bugs. You should consider to express your wishes/complains in a more friendly way. And this bug is 2 days old, with one response which I consider to be "reasonable"...

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            posktomtenP 1 Reply Last reply
                            1
                            • jsulmJ jsulm

                              @RazerMind said in Working QPdfDocument class/module/etc...:

                              Why you considering simplest task cat or append PDF into one/with one - as such big/complex/etc

                              Because PDF is not a simple text file, so it is not such a "simple task".
                              You can't expect a framework like Qt to give you solutions for each and every problem you have. There will always be something not covered by the framework.

                              "By the way, regarding the submitted bug, so far there has not been a single reasonable comment from the developers ...." - I read what you wrote there. To be honest as Qt framework developer I would not have much motivation to work on such bugs. You should consider to express your wishes/complains in a more friendly way. And this bug is 2 days old, with one response which I consider to be "reasonable"...

                              posktomtenP Offline
                              posktomtenP Offline
                              posktomten
                              wrote on last edited by
                              #29

                              @RazerMind @Chris-Kawa
                              Hello!
                              I tested (MinGW GCC, Windows 10 32-bit) it seems it doesn't work with 32-bit.
                              build_qpdf.png

                              posktomten

                              SGaistS 1 Reply Last reply
                              0
                              • posktomtenP posktomten

                                @RazerMind @Chris-Kawa
                                Hello!
                                I tested (MinGW GCC, Windows 10 32-bit) it seems it doesn't work with 32-bit.
                                build_qpdf.png

                                SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #30

                                @posktomten Hi, Chromium does not support MinGW at all, it requires either Visual Studio or clang-cl on Windows.

                                See the platform notes.

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                1
                                • posktomtenP Offline
                                  posktomtenP Offline
                                  posktomten
                                  wrote on last edited by
                                  #31

                                  @SGaist Aha! Thanks. I just wanted to test... (Without reading.)

                                  posktomten

                                  JonBJ 1 Reply Last reply
                                  0
                                  • posktomtenP posktomten

                                    @SGaist Aha! Thanks. I just wanted to test... (Without reading.)

                                    JonBJ Online
                                    JonBJ Online
                                    JonB
                                    wrote on last edited by
                                    #32

                                    @posktomten
                                    And in addition to @SGaist it requires to build on a 64-bit platform, as it says in its output, so your host wouldn't be up to it anyway.

                                    posktomtenP 1 Reply Last reply
                                    0
                                    • JonBJ JonB

                                      @posktomten
                                      And in addition to @SGaist it requires to build on a 64-bit platform, as it says in its output, so your host wouldn't be up to it anyway.

                                      posktomtenP Offline
                                      posktomtenP Offline
                                      posktomten
                                      wrote on last edited by
                                      #33

                                      @JonB Yes, thanks. That's what I reacted to.

                                      posktomten

                                      1 Reply Last reply
                                      0

                                      • Login

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • Users
                                      • Groups
                                      • Search
                                      • Get Qt Extensions
                                      • Unsolved