Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
handwritten.js
Advanced tools
Readme
<script src="https://cdn.jsdelivr.net/gh/alias-rahil/handwritten.js@master/docs/handwritten.js"></script>
This will expose the latest version of
handwritten.js
as a global variable calledhandwritten
which you can start using right away. Check the contents of docs/ folder for a simple implementation. For other versions, install the required version with npm and use browserify to compile it. Optionally, use babel-minify to compress the bundled javascript file.
npm install handwritten.js
or
yarn add handwritten.js
npm install handwritten.js -g
or
yarn global add handwritten.js
Note: DO NOT use sudo to install global packages! The correct way is to tell npm where to install its global packages:
npm config set prefix ~/.local
. Make sure~/.local/bin
is added toPATH
.
const handwritten = require('handwritten.js')
const fs = require('fs')
const rawtext = "Hello, world!"
handwritten(rawtext).then((converted) => {
converted.pipe(fs.createWriteStream('output.pdf'))
})
npx handwritten.js -f "path/to/inputfile.txt" -o "path/to/outputfile.pdf"
Note: Use this method only if you plan to use handwritten.js for one time, installing handwritten.js globally (see-below) is recommended for multiple time usages.
handwritten.js -f "path/to/inputfile.txt" -o "path/to/outputfile.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
Check --help
or --version
option for more details.
handwritten(rawtext)
handwritten(rawtext, { ruled: true })
handwritten(rawtext, { outputType: "jpeg/buf" })
handwritten(rawtext, { ruled: true, outputType: "jpeg/b64" })
handwritten(rawtext, { ruled: true, outputType: "jpeg/b64" , inkColor: COLORS.RED})
Default outputType: "pdf". Supported output types are: pdf
, jpeg/buf
, jpeg/b64
, png/buf
and png/b64
. If the output type is set to pdf
, it returns a promise that will resolve in a pdfkit document instance. Else it will return a promise that will resolve in an array containing the buffer or base64 value of the images according to the output type provided.
Default inkColor
is black
, more ink colors are available through COLORS
under handwritten.js/constants
👤 Rahil Kabani rahil.kabani.4@gmail.com
Give a ⭐️ if this project helped you!
Contributions, issues and feature requests are welcome! Feel free to check issues page.
handwritten.js only supports English letters. I am not planning to add support for other languages for now. Please do not any more make issues about this. However, I will merge pull requests if any. See the issue #18 for more details.
GDGVIT/HandWriter - For the cleaned dataset.
🏠 Homepage
Thanks goes to these wonderful people (emoji key):
Rahil Kabani 💻 📖 🚧 | Anthony Ng 📖 | Ben Junya 💻 📖 | Harsh SInghal 💻 🚧 | etienne 💻 | Ashikka Gupta 🚧 💻 | Suyash Sonawane 📖 💻 |
Vishal Pandey 💻 | Anirudh Sharma 💻 | Newton Munene 🐛 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
Convert typed text to realistic handwriting!
The npm package handwritten.js receives a total of 154 weekly downloads. As such, handwritten.js popularity was classified as not popular.
We found that handwritten.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.