Skip to content

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

License

Notifications You must be signed in to change notification settings

xguaita/dom2svg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published