Skip to content

Instantly share code, notes, and snippets.

@AlphaSheep
Created February 14, 2019 19:45
Show Gist options
  • Save AlphaSheep/5df2844bcee3453332c1f5481c3f88a3 to your computer and use it in GitHub Desktop.
Save AlphaSheep/5df2844bcee3453332c1f5481c3f88a3 to your computer and use it in GitHub Desktop.
PNGs to PDFs Inkscape Bash
#!/bin/bash
# Convert all pdfs in a folder into pngs using inkscape
for f in *.pdf
do
echo "Now processing $f"
inkscape --without-gui -f $f --export-png ${f%.*}.png --export-area-page
echo
done
#!/bin/bash
# Convert all pngs in a folder into pdfs using inkscape
for f in *.png
do
echo "Now processing $f"
inkscape --without-gui -f $f --export-pdf ${f%.*}.pdf --export-area-page
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment