Skip to content

Instantly share code, notes, and snippets.

@clemsos
Created September 4, 2014 14:49
Show Gist options
  • Save clemsos/42a06c1da6e1145e5d04 to your computer and use it in GitHub Desktop.
Save clemsos/42a06c1da6e1145e5d04 to your computer and use it in GitHub Desktop.
PDF Multiple pages to clean SVG using Inkscape
#!/bin/bash
PDF_IN="LS58_Presentation_FR_EN.pdf"
BASENAME_OUT="junkware"
PAGE_START=2
PAGE_END=2
for ((i=$PAGE_START; i<=$PAGE_END; i++));
do
# echo $i;
pdf_outfile="${i}_${BASENAME_OUT}.pdf"
echo $pdf_outfile
svg_outfile="${i}_${BASENAME_OUT}.svg"
echo $svg_outfile
`pdftk ${IN} cat ${i} output ${pdf_outfile}`
`inkscape --without-gui --file=${pdf_outfile} --export-plain-svg=${svg_outfile}`
done
@clemsos
Copy link
Author

clemsos commented Sep 4, 2014

on debian :

sudo apt-get pdftk inkscape
chmod +x

./

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