0
在PowerShell中使用wkhtmltopdf,PDF文件打印預期,儘管它拋出一個警告如下:PowerShell的wkhtmltopdf.exe:libpng的警告:ICCP:知不正確sRGB模式
& "C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe" --print-media-type -q --header-left [webpage] --header-font-size 7 --footer-left [isodate] $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的運行令人滿意,我想要禁止警告。我需要一些指導。
我試過try/catch。它似乎不工作,因爲它不是Powershell命令。 – STWilson