Working QPdfDocument class/module/etc...
-
@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.
@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 -
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?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. -
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.@Chris-Kawa
created https://bugreports.qt.io/browse/QTBUG-113125
Hope, it will be commented soon... -
@Chris-Kawa
created https://bugreports.qt.io/browse/QTBUG-113125
Hope, it will be commented soon...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! -
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!@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).
-
@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).
@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... -
@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...@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.
-
@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.
@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. -
@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.@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++? -
@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++?@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.
-
@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.@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. -
@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.@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 .... -
@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 ....@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"...
-
@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"...
@RazerMind @Chris-Kawa
Hello!
I tested (MinGW GCC, Windows 10 32-bit) it seems it doesn't work with 32-bit.
-
@RazerMind @Chris-Kawa
Hello!
I tested (MinGW GCC, Windows 10 32-bit) it seems it doesn't work with 32-bit.
@posktomten Hi, Chromium does not support MinGW at all, it requires either Visual Studio or clang-cl on Windows.
See the platform notes.
-
@SGaist Aha! Thanks. I just wanted to test... (Without reading.)
-
@SGaist Aha! Thanks. I just wanted to test... (Without reading.)
-
@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.@JonB Yes, thanks. That's what I reacted to.