Print PDF to XPS back to PDF via PowerShell
With the help of another member on here, I was able to make two scripts: one converts a PDF to XPS and the otherusing a workflow. When combining them into one script, the first workflow converts the file to XPS, however, the second workflow doesn't seem to work at the appropriate time or at all. There are some cleanup items at the end of the second workflow that do seem to be working properly. Can I delay the start of the second workflow somehow to start at the appropriate time? Thanks in advanced! The other question can be found here Print PDF to XPS using PowerShell.
This can be done easily, you can use VeryDOC Converter Command Line to convert from XPS file to PDF file, and then use VeryDOC PDF to Vector Converter Command Line to convert from PDF file back to XPS format, you can convert from XPS to PDF and PDF to XPS from command line, you can also call them from a script to do the batch conversion.
after you download it, you can run following command lines to batch convert your XPS files to PDF files,
xps2pdf.exe C:\in.xps C:\out.pdf
xps2pdf.exe C:\in\*.xps C:\out\*.pdf
after you download it, you can run following command lines to batch convert from PDF files to XPS files,
pdf2vec.exe C:\in.pdf C:\out.xps
for /r D:\test %F in (*.xps) do "pdf2vec.exe" "%F" "%~dpnF.xps"
for %F IN (D:\test\*.xps) DO "pdf2vec.exe" "%F" "%~dpnF.xps"