Made a powershell script to properly convert Ai pdfs to svg, the resultant svg is grouped and for some reason my machine needs the ungroup button to be clicked twice, but works.
Needs inkscape installed
Updated: add/remove/edit paths at the bottom to your liking, no spaces allowed.
Update 2: fix canvas sizes
Update 3: this script is pretty slow, if anyone wants more speed checkout the multi-threaded version: PDFtoSVG_MT in my github repo (you also need PDFtoSVG_MT_Worker)
# Alfrix 2017
# Batch Convert Ai PDF to SVG
cd "$env:programfiles\Inkscape"
echo ""
Write-Host "Converting Ai PDFs to SVG" -ForegroundColor Green
echo ""
function pdftosvg
{
param([string]$pdf_path, [string]$svg_path)
$pdfs = Get-ChildItem $pdf_path\* -Include *.pdf
for ($i=0; $i -lt $pdfs.Count; $i++) {
$pdf_fullname=$pdfs[$i].fullname
$pdf_name=$pdfs[$i].basename
Write-Host "Processing ",$pdf_path,$pdf_name -ForegroundColor Yellow
.\inkscape.com -f "$pdf_fullname" -D -z -l="$svg_path\$pdf_name.svg"
#alternative to inkscape
#.\pdf2svg.exe "$pdf_fullname" "$svg_path\$pdf_name.svg"
# the next bit is here to fix baxys pdfs which are in points
$fix = Get-Content "$svg_path\$pdf_name.svg"
$fix=$fix -Replace 'width="341.33334"', 'width="256"'
$fix=$fix -Replace 'height="341.33334"', 'height="256"'
#$fix=$fix -Replace '256pt', '256' #for https://github.com/dawbarton/pdf2svg
Set-Content -Path "$svg_path\$pdf_name.svg" -Value $fix
}
}
# pdftosvg "input_path" "output_path"
# both paths must exist
$mainfolder="D:\Downloads\baxy-retroarch-themes-master"
pdftosvg "$mainfolder\retroactive\pdf" "$mainfolder\retroactive\svg"
pdftosvg "$mainfolder\retroactive\pdf_marked" "$mainfolder\retroactive\svg_marked"
pdftosvg "$mainfolder\systematic\pdf" "$mainfolder\systematic\svg"
pdftosvg "$mainfolder\baxy-retroarch-themes-master\monochrome_contributions\pdf" "$mainfolder\monochrome_contributions\svg"
pdftosvg "$mainfolder\baxy-retroarch-themes-master\neoactive\pdf" "$mainfolder\neoactive\svg"
pause