Created
November 26, 2014 05:44
-
-
Save ryanchang/829cc04c32e8b4b1bcc0 to your computer and use it in GitHub Desktop.
Convert all the .svg file in the current directory to .pdf with svg2pdf tool
This file contains 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
sources = Dir["./*.svg"] | |
puts sources | |
sources.each do |svg| | |
pdf = "#{svg[0...-4]}.pdf" | |
%x(svg2pdf #{svg} #{pdf}) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gist depends on the svg2pdf tool. You can install this tool via
on Mac OSX.