xguaita / dom2svg

Draw web page's DOM to svg file via Node,js and d3.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dom2svg

Draft version

Draw web page's DOM to svg file via d3.js.
The output is an SVG you can load into Inkscape, Illustrator, or one that we can convert to an EPS, a PDF, render to a PNG or any other image file format you can think of.

Install

With npm do:

npm install

Dependencies

We assume that node.js is already installed.

d3.js and jsdom modules are necessary. Prerequisites for Windows users.

Usage

node dom2svg.js <http://sample.com | ./path/page.html> <file_to_write.svg>

Example

node dom2svg.js ./samples/prueba.html prueba.svg

prueba.html

node dom2svg.js http://www.google.es google.svg

prueba.html

License

MIT

About

Draw web page's DOM to svg file via Node,js and d3.js

License:MIT License


Languages

Language:JavaScript 95.3%Language:CSS 4.7%