Tkinter 使用wkhtmltopdf时隐藏命令提示

Tkinter 使用wkhtmltopdf时隐藏命令提示,tkinter,pyinstaller,wkhtmltopdf,Tkinter,Pyinstaller,Wkhtmltopdf,我正在尝试创建一个可执行文件,该文件将在不显示命令提示符的情况下运行。我正在使用pyinstaller创建可执行文件,并使用--noconsole选项隐藏命令提示符,但程序使用wkhtmltopdf仍会导致命令提示符打开 我发现与wkhtmltopdf一起使用的唯一选项是-quiet,它阻止它输出任何内容,但这仍然会导致命令提示符打开,它只是空白 我不知道我是否缺少一个可以与wkhtmltopdf一起使用的选项,或者是否有其他解决方法 import pdfkit path_to_wkhtmlt

我正在尝试创建一个可执行文件,该文件将在不显示命令提示符的情况下运行。我正在使用
pyinstaller
创建可执行文件,并使用
--noconsole
选项隐藏命令提示符,但程序使用
wkhtmltopdf
仍会导致命令提示符打开

我发现与
wkhtmltopdf
一起使用的唯一选项是
-quiet
,它阻止它输出任何内容,但这仍然会导致命令提示符打开,它只是空白

我不知道我是否缺少一个可以与
wkhtmltopdf
一起使用的选项,或者是否有其他解决方法

import pdfkit

path_to_wkhtmltopdf = 'S:\!Data Processing\Resources\wkhtmltopdf\\bin\wkhtmltopdf.exe'

config = pdfkit.configuration(wkhtmltopdf=path_to_wkhtmltopdf)
pdfkit.from_file(os.path.join(folder,'temp_output.html'),os.path.join(folder, raw_file_name + ' (RAW PDF).pdf'),options={
        'margin-left': margin,
        'margin-right': '0.3in',
        'margin-top': '0.3in',
        'margin-bottom': '0.3in',
        'quiet': '', 
    },configuration=config)

您如何与wkhtmltopdf交互?如果使用
子流程
或python包装器,则永远不会调用命令提示符。你的问题在别处。我正在使用python包装器pdfkitOk,在这种情况下,你的问题与wkhtmltopdf无关。但是当命令提示符弹出时,它在标题中显示它正在运行wkhtmltopdf.exe?pdfkit没有通过命令行调用wkhtmltopdf吗?@Omnia69没有