I need to automatically print a PDF file to a file (need to have printer driver set all the print options like stapling, duplexing, etc) on a network folder so other employees can print the .prn file from networked printers.
After a fair bit of searching I have found that it is possible to have PowerShell print the PDF using
Start-Process -FilePath document.pdf -Verb Print
which invokes the appropriate application to print the PDF but doesn't allow me to check the "Print to file" box.
I could set the default printer's port to FILE:, but then this requires user interaction to specify the destination .prn file name.
A related question (Print to File Programatically using Adobe Acrobat) seems to show it is possible with C# but I have not been able to find anything for PowerShell. It would be ideal if this is possible with PowerShell (I don't know C#) or am I stuck with programmatically interacting with the "Save to File" dialog box?
Grateful for any hint(s).