Skip to content

Instantly share code, notes, and snippets.

@futuri
Created March 24, 2021 21:48
Show Gist options
  • Save futuri/1205c5e0752a4667c220877fe25dcd13 to your computer and use it in GitHub Desktop.
Save futuri/1205c5e0752a4667c220877fe25dcd13 to your computer and use it in GitHub Desktop.
Convertir SVG a PDF en GNU Linux y Windows

EN LINUX

Convertir a PDf

inkscape --export-type=pdf --export-dpi=96 *.svg

Unir pdf

pdfunite *.pdf output.pdf

Optimización

ps2pdf -dPDFSETTINGS=/ebook output.pdf output_ebook.pdf

Optimización automatica

ps2pdf output.pdf output_default.pdf

EN WINDOWS (Instalar paquetes poppler http://blog.alivate.com.au/poppler-windows/)

Para seleccionar todo los SVG y convertirlo a PDF

for /f "tokens=1* delims=." %i in ('dir /b *.svg') do inkscape --export-dpi=96 --file="%i.svg" --export-pdf="%i.pdf"

Para convertir un solo archivo svg a pdf

inkscape --export-dpi=96 --file="NOMBRE_DEL_ARCHIVO.svg" --export-pdf="output.pdf"

Para unir los PDF generados

pdfunite *.pdf output.pdf

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