Skip to content

Instantly share code, notes, and snippets.

@balupton
Last active February 23, 2022 04:19
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save balupton/7f15f6627d90426f12b24a12a4ac5975 to your computer and use it in GitHub Desktop.
Save balupton/7f15f6627d90426f12b24a12a4ac5975 to your computer and use it in GitHub Desktop.
Convert XPS to PDF

Convert XPS to PDF on macOS

# IF you are on alpine, install the dependencies
apk add curl git bash

# IF you are on ubuntu, install the dependencies
apt update
apt install curl git bash

# IF you are on macOS, install the dependencies
xcode-select --install

# Open a Dorothy trial shell
eval "$(curl -fsSL https://dorothy.bevry.workers.dev)"

# Run Dorothy's xps2pdf command on all .xps files in your current working directory
xps2pdf *.pdf

# Exit the Dorothy trial shell
exit

It leverages the xps2pdf command from the Dorothy dotfile ecosystem.

@afrozalm
Copy link

afrozalm commented Aug 9, 2017

Getting the following errors:

xps2pdf:28: command not found: GetFileInfo
xps2pdf:29: command not found: SetFile

@balupton
Copy link
Author

balupton commented Jun 6, 2018

@afrozalm okay try the latest script

@jaredumbehr
Copy link

keanue-revees-thank-you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment