Created
November 1, 2022 10:26
-
-
Save phinate/ecc2d8734802b5a2a2aaa2478e600d10 to your computer and use it in GitHub Desktop.
make svgs from pdfs with inkscape in python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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