- Start Automator
- Create a new Service
- Select "Service reveives selected [PDF files]" in "Finder.app"
- Add a new "Run shell script" from the "Utilities" section in the Library sidebar
- Select your preferred shell and select "Pass input [as arguments]" in the upper right select field
- Copy the following code for the shell script:
realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
}
LOGFILE="/path/to/convert-pdf-to-svg.log"
API_KEY="<YOUR-CONVERT-IO-API-KEY>"
for f in "$@"; do
BASEDIR=$(dirname "$f")
REALDIR=$(realpath "${BASEDIR}")
echo "$f" >> ${LOGFILE}
/usr/local/bin/convertio -f svg -o "${REALDIR}" --apikey ${API_KEY} "$f" >> ${LOGFILE} 2>&1;
done
Save the service under e.g. "Convert to SVG (via convert.io)"
Now right-click on a PDF file in finder and click on "Services" > "Convert to SVG (via convert.io)". The SVG file should be created in the same directory as the PDF file.