UBCanvas

Canvas (draw text/pictures on PNG)

   var
      UBCanvas = require('UBCanvas'),
      canvasWidth = 1200,
      canvasHeight = 300,
      canvas = new UBCanvas(canvasWidth, canvasHeight),
       base64Content;
   canvas.setFont('Times New Roman', {r: 0, g: 0, b: 0}, 22, [UBCanvas.FontStyles.Bold]);
   canvas.drawText(0, 0, 'Text on the center', canvasWidth - 950, canvasHeight,
      [UBCanvas.TextFormats.Center, UBCanvas.TextFormats.WordBreak]
   );
   canvas.setFont('Times New Roman', {r: 255, g: 0, b: 0}, 18);
   canvas.drawText(300, 0, 'Text on the left, canvasWidth, canvasHeight,
      [UBCanvas.TextFormats.Left, UBCanvas.TextFormats.WordBreak]
   );
   base64Content = canvas.getContent('bin2base64'); // PNG image encoded as base64

Classes

UBCanvas