Skip to content

Instantly share code, notes, and snippets.

@phinate
Created November 1, 2022 10:26
Show Gist options
  • Save phinate/ecc2d8734802b5a2a2aaa2478e600d10 to your computer and use it in GitHub Desktop.
Save phinate/ecc2d8734802b5a2a2aaa2478e600d10 to your computer and use it in GitHub Desktop.
make svgs from pdfs with inkscape in python
import os
import glob
from re import sub
import subprocess
for fname in glob.glob("images/*.pdf"):
subprocess.run(
[
"inkscape",
"--pdf-poppler",
fname,
"-T",
"-l",
"-o",
fname.split(".pdf")[0] + ".svg",
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment