I've built an application using PyQt5 to process some data and generate a pdf report using pdfkit. If I run the application through PyCharm this works well. I've packaged the application into an executable using fman build system (PyInstaller wrapper) and when I run it, a wkhtmltopdf.exe console window pops up every time a pdf is generated.
This is really annoying when processing many files.
Is there a way to ensure wkhtmltopdf.exe only ever opens as a minimized window (or similar solution)?
In the end I resorted to forking pdfkit from GitHub and adding
creationflags=0x08000000in thePopenfunctions in theconfiguration.pyandpdfkit.pyfiles. I knew I would be passing thewkhtmltopdf.exelocation to the configuration file so I made this explicit as well.It's available at https://github.com/KiFi85/python-pdfkit
It worked for me but not sure if it's the best solution