直接上使用教程
浏览器使用
<script src="https://cdn.jsdelivr.net/gh/alias-rahil/handwritten.js@HEAD/docs/handwritten.js"></script>
nodejs使用
npm install handwritten.js -g
const handwritten = require('handwritten.js')
const fs = require('fs')
const rawtext = "Hello, world!"
handwritten(rawtext).then((converted) => {
converted.pipe(fs.createWriteStream('output.pdf'))
})
命令行使用
handwritten.js -f path/to/inputfile.txt -o path/to/outputfile.pdf
handwritten.js -f path/to/inputfile.txt -o path/to/outputfile.pdf --ruled
handwritten.js -f path/to/inputfile.txt -o path/to/outputfolder --images png