I would like to convert a folder containing PDF files into XPS files using Powershell. Due to system restrictions, I am unable to download any third party software like iTextSharp to make this work.
I have been able to get Powershell to open the document and open the print window for XPS, but the name is always blank. Is it possible to have the new file name match the original file name?
Also, how can the process be automated so user input is not required (ie entering the file name or pressing print)? Lastly, is it possible to change the directory that it prints to?
Get-ChildItem -path $pdf_filepath -recurse -include *.pdf | ForEach-Object {Start-Process -FilePath $_.fullname -Verb Print -PassThru | %{sleep 10;$_} }
This is how I would do it:
Cheers!