Skip to content

API built with Express, Node.js, and Typescript that converts a string of text into images and returns them as an image Buffer. Support me by using this API on RapidAPI!

License

Notifications You must be signed in to change notification settings

btylerh7/text2image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

text2image

API built that converts a string of text into images and returns them as a Buffer.

Routes

  • /api/get-pages: returns the total number of pages given the data sent in the request.
  • /api/converter: returns a JSON object with the following structure:
{
    "files": [
        {
            "type": "png or jpeg or pdf",
            "data": {
                "image buffer data",
            },
        },
    ],
}
  • To save the data as an image, you can create an image from the buffer:
    const responseData = JSON.parse(response.data)
    for (let image of responseData.files) {
       return Buffer.from(image) 
    }

About

API built with Express, Node.js, and Typescript that converts a string of text into images and returns them as an image Buffer. Support me by using this API on RapidAPI!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published