PDFLibNet 下载地址: https://download.csdn.net/download/q215046120/11946040
对于单张PDF转JPG:
[System.Reflection.Assembly]::LoadFile('XXX\PDFLibNet64.dll') $a = New-Object 'PDFLibNet64.PDFWrapper' $a.LoadPDF("XXX.pdf"); Write-Host $a.PageCount; $a.ExportJpg("XXX.jpg",1,1,180,80) if($a.IsJpgBusy){ [System.Threading.Thread]::Sleep(100); } $a.Dispose();对于多张PDF页转JPG:
[void][System.Reflection.Assembly]::LoadFile('XXX\PDFLibNet64.dll') $a = New-Object 'PDFLibNet64.PDFWrapper' [void]$a.LoadPDF("XXX.pdf"); Write-Host $a.PageCount; for($i = 1; $i -le $a.PageCount; $i++){ [void]$a.ExportJpg("XXX\MOF$i.jpg",$i,$i,180,80) if($a.IsJpgBusy){ [System.Threading.Thread]::Sleep(100); } } $a.Dispose();