text to image using node js|text2png using node js

Deal Score0
Deal Score0
Spread the love

Node js Provide lots of free library in node js packagesĀ  .If you want to use any custom fonts You can also use.

first of all install these packages,

npm install text2png express


  "name": "converter",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "express": "^4.17.1",
    "image-downloader": "^4.0.2",
    "text2png": "^2.3.0"

let create now index.js File


const express=require('express')
const download = require('image-downloader')

const app= express()
var fs = require('fs');
var text2png = require('text2png');
      fs.writeFileSync('out1.png', text2png('Hello!', {color: 'blue'}));



We will be happy to hear your thoughts

Leave a reply

Enable registration in settings - general