Giter Site home page Giter Site logo

svg2pdf's Introduction

svg2pdf

Windows batch using Inkscape and pdftk.

How to use

Install required tools.

svg2pdf.bat uses:

  • Inkscape 1.0 or above
  • pdftk

It assumes they have been installed as the installers recommended, i.e., their default setting. If you installed Inkscape at somewhere different from "C:\Program Files\Inkscape\bin\inkscape.exe", you need configure in svg2pdf_file.bat. pdftk must be available as a command in terminal (DOS prompt).

Locate the batches.

Download source code zip at releases page. Unzip and put all files in "bat" in some directory.

Prepare a project directory.

As an example, let us call the directory "myProj". "myProj" should contain the followings:

  • A directory named as "pdf"
  • svg files to be converted named as "myProj*p*.svg", like "myProj_p1.svg", "myProj_p2.svg", ...

Drag and drop "myProj" onto "svg2pdf.bat".

You'll see the batch conducts some commands. After the execution stopped, type some key to finish the batch.

Check the "pdf" directory.

The batch outputs separated pdf files and merged one. If the merged "myProj_inkscape.pdf" exists, you have done. That's it!

Technical explanation

svg2pdf [project_dir]

This calls svg2pdf_all and merge the result files by pdftk.

svg2pdf_all [input_path] [output_dir]

The 1st parameter input_path can include wild card like "some_model*.svg". This batch converts svg file(s) to pdf file(s) one by one, using svg2pdf_file. The destination is supposed by the 2nd parameter.

svg2pdf_file [svg_file] [pdf_file]

This batch converts a svg file to a pdf file by Inkscape. You can configure dpi value in this file (the default is 300).

svg2pdf's People

Contributors

ooouch1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.