This repository has been archived by the owner on Jan 2, 2023. It is now read-only.
openssl fix; unicode fixes; new wkhtmltox tool #2858
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wrote quite a few bug reports in the last few days. I have not yet thought of a solution of the problem of using the dylib from within a qt 5 app. Therefore I was left with only one option - using QProcess to call a commandline tool to do the conversion. At first I created a tool with qt 5, passing my own arguments and only the ones that my app needs and would use the dylib and do the conversion, but then I thought, I will contribute something small to this project and create this combined image|pdf tool as a part of the wkhtmltopdf project.
So created it and realized commandline arguments in unicode were not accepted. I checked the code and realized the Qt way of handling the arguments was not used - instead C style parsing of argv was going on. I replaced that with handling the QStringList returned from QApplication::arguments(), which is the uniform OS independent way Qt does the arguments - no worrying about utf-8, utf-16 char* and wchar_t* this way.
Now something like this:
wkhtmltopdf уеб.htm адобе.pdf
should work on all supported OS. I tested it on Windows and Mac OS.
The new wkhtmltox tool is very simple - however having it, cuts the space requirements in half, since the old 2 tools are almost identical anyway, but they each include a statically compiled qt, which is 20 MB on Win and 50 MB on Mac.