gpt4 book ai didi

windows - headless chrome 在 Windows 10 中不起作用

转载 作者:行者123 更新时间:2023-12-05 07:25:50 28 4
gpt4 key购买 nike

我尝试使用 headless chrome 将示例 HTML 文件转换为 PDF,但它在 Windows 10 中不起作用。

这是我用来转换文件的命令,

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --headless --disable-gpu --print-to-pdf=t.pdf t.html

我的html文件中的内容如下,

<html>
<head>
<title>test</title>
</head>
<body>
<p>this is the sample file</p>
</body>
</html>

我也尝试过 google.com,但它不起作用。

此外,我注意到在运行此命令后,它会在任务管理器的 CMD 下创建 6 个 chrome 进程,

enter image description here

谁能帮我解决这个问题。我已经检查了以下问题,但没有帮助-

SO Link 1

SO Link 2

Super User

最佳答案

怎么样

 start chrome --headless --disable-gpu --print-to-pdf=%cd%\t.pdf t.html

?

关于windows - headless chrome 在 Windows 10 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54707524/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com