Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jimmytaker
Copy link

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.

Dimitar added 7 commits March 27, 2016 06:43
…nd pdf created

Improved the old C style functions parsing the arguments from char** argv to Qt style arguments parsing using QApplication::arguments() and QStringList. This supports unicode on all OS. One can now use e.g.:
wkhtmltopdf уеб.htm адобе.pdf

Created a new executable: wkhtmltox that combines the two old ones. It is very simple, but also very convenient. Usage:
wkhtmltox image|pdf [params]
"wkhtmltox pdf" has the same effect as "wkhtmltopdf"
@iantearle
Copy link

Would this fix #3001 if so, why on earth has this not been accepted?!?

@PhilGale92
Copy link

Sadly, no. Afaik the relevant fix there would be upgrading the patched qt to >= 5.10. This commit was published before that version was released.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants