Texts - afast/map_print GitHub Wiki

This option allows you to print text anywhere on the document.

The texts property is an array of entries that have:

  • text the text to print
  • position where on the document to print it {x: 50, y: 50 }
  • box_size how much space it should occupy {width: 50, height: 50}
  • options styling options:
    • fill_color background color
    • color the text color.
    • font the font to use, make sure it is installed on your system.
    • pointsize the size of the text.
    • gravity Where on the box to align the text.

Example

texts: [{
  text: "some text",
  position: {x: 50, y: 50 },
  box_size: {width: 50, height: 50},
  options: {
    fill_color: '#ffffff',
    color: '#000000',
    font: 'Arial',
    pointsize: '16',
    gravity: 'NorthWest',
  }
}]