Hi everyone
I wrote a script years ago that used pdftoprinter.exe (it was a requirement back then) but now the users are complaining about waiting time up to 10 minutes per print. Is there a native way to do this that can handle pdfs to printer a lot faster?
$Folder = "C:\Path\To\PDFs\"
$ProcessedFolder = $Folder + "Processed\"
$Files = $Folder + "*.pdf"
$AllInvoices = Get-ChildItem $Files
$AllInvoices |
ForEach-Object {
# Wait parameter ensures the file is not moved before it is printed
Start-Process "C:\Path\To\PDFtoPrinter.exe" $_.FullName -Wait
Start-Sleep -Seconds 1
Move-Item $_.FullName -Destination $ProcessedFolder
} ```