Powershell wkhtmltopdf.exe:libpng警告:iCCP:已知错误的sRGB配置文件

Powershell wkhtmltopdf.exe:libpng警告:iCCP:已知错误的sRGB配置文件,powershell,wkhtmltopdf,Powershell,Wkhtmltopdf,在Powershell中使用wkhtmltopdf时,PDF文件将按预期打印,但会引发如下警告: &“C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe”--打印媒体类型-q--页眉左侧[网页]--页眉字体大小7--页脚左侧[日期]$listing.Url$pdfDest wkhtmltopdf.exe : libpng warning: iCCP: known incorrect sRGB profile At R:\powershell_scri

在Powershell中使用wkhtmltopdf时,PDF文件将按预期打印,但会引发如下警告:

&“C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe”--打印媒体类型-q--页眉左侧[网页]--页眉字体大小7--页脚左侧[日期]$listing.Url$pdfDest

wkhtmltopdf.exe : libpng warning: iCCP: known incorrect sRGB profile
At R:\powershell_scripts\aso\get_individual_aircraft.ps1:138 char:13
+             & "C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe" --pr ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (libpng warning:...ct sRGB profile:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

我想处理这个警告,或者因为pdf工作令人满意,我想抑制这个警告。我需要一些指示。

我可以从错误中看出,命令指的是第138行的
get\u individual\u airpair.ps1

你能把它放进去吗

$ErrorActionPreference='SilentlyContinue'


在那个脚本中,看看它是否有效。我相信在脚本的帮助下,EXE正在被调用

我试过了。它似乎不起作用,因为它不是Powershell命令。