This is a small library that produces grid papers. The resulting paper either contains actual grids or have dots at the vertices.
This is intended to be compiled into web assembly and used via a browser. A live version can be found at https://dec41.user.srcf.net/includes/grid/
The only dependency (apart from wasm-bindgen) is flate2, which is used to produce compressed pdf files. This dependency can be easily removed at the expense of large file sizes. The difference is somewhat significant when producing large dotted papers --- to produce an X by Y grid, we need to draw X + Y lines, but to produce the corresponding dotted paper, we need to draw XY dots.
cargo to be installed. Once it is installed, run
to compile. The compiled web assembly file will be written into
dist/ should then be served via a web server. Be sure to use a web
server that uses the correct MIME type for webassembly files, e.g.
serve with Apache, add the following line to
AddType application/wasm .wasm
The pdf part of the code is based on rust-pdf