-
Download this file
-
chmod +x ./xps2pdf.bash
-
To convert a particular xps file:
./xps2pdf.bash thefile.xps
-
To convert all xps files in the current working directory:
./xps2pdf.bash *.xps
It will create the pdf files with the same creation time as the original xps files.
Thanks to Sriram Thaiyar for the original ruby version which figures out GhostPDL can be used for the conversion, which is the crux of the operation.
Extracted from https://github.com/balupton/dotfiles/blob/master/.scripts/commands/xps2pdf