0

I am using PdfMake to generate a pdf on the client side. I store a list of skills in an array like so:

var skills: ["hiking", "running", "typing", "etc"];

I am trying to show this array of skills like this similar to stack overflow (with styling such as border radius and background color etc):

enter image description here

PdfMake does not provide any functions that I know of which will allow me to do this. Does anyone know how I can display an array of data with styling as tags using pdf make?

Skywalker
  • 4,984
  • 16
  • 57
  • 122

1 Answers1

0

something like this?

var skills = ["hiking", "running", "typing", "etc"];
for (i=0; i<skills.length; i++) {
  document.write("<a class='tag'>"+skills[i]+"</a>");
}
a.tag {
  background: grey;
  padding: 5px 10px;
  color: white;
  font-family: sans-serif;
  font-size: 11px;
  border-radius: 4px;
  margin-right: 1px;
  }
Robert Wade
  • 4,918
  • 1
  • 16
  • 35