########################## # Writer: Claudio Boggian # Company: PAL s.r.l. #------------------------- # Date: 2023/11/08 # v: 1.0 # Reason: Emission #------------------------- ########################## Write-Host("Script Start") $OutputPath = "" $Elements = Import-Csv -Path "" $i = 1 $wkhtmltopdf = (Resolve-Path "C:\Program Files\wkhtmltopdf\bin\" | Sort-Object -Property Path | Select-Object -Last 1) Set-Location $wkhtmltopdf Write-Host("Elements found: " + $Elements.Count) foreach ($Element in $Elements) { $Output = $OutputPath + $Element.Name +".pdf" .\wkhtmltopdf.exe -l -s A4 $Element.Link $Output Write-Host("Element done: " + $i.ToString("0000") + " / " + $Elements.Count) $i ++ Write-Host("Wait...") Start-Sleep -Seconds 1 } Write-Host("Script End") # Write-Host("Script Start") # $OutputPath = "C:\Users\cbo\Desktop\FZ Task\voucher\" # $Elements = Import-Csv -Path "C:\Users\cbo\Desktop\FZ Task\urlBuoni.csv" # $i = 1 # $wkhtmltopdf = (Resolve-Path "C:\Program Files\wkhtmltopdf\bin\" | Sort-Object -Property Path | Select-Object -Last 1) # Set-Location $wkhtmltopdf # Write-Host("Elements found: " + $Elements.Count) # foreach ($Element in $Elements) { # $Output = $OutputPath + $i.ToString("0000") +".pdf" # .\wkhtmltopdf.exe -l -s A4 $Element.LINK $Output # Write-Host("Element done: " + $i.ToString("0000") + " / " + $Elements.Count) # $i ++ # Write-Host("Wait...") # Start-Sleep -Seconds 1 # } # Write-Host("Script End")