I have a collection of base64 formatted images named imgFinding. I am looking to dynamically add all these images to a PDF using pdfmake. Below is a snippet of my code:
getDocumentDefinition() {
let imgFinding = []
for (var j = 0; j < this.images.length; j++) {
imgFinding.push(this.images[j])
}
var dd = {
content: [
{
image: imgFinding[0],
width: 300
}
],
}
return dd
}
As seen in the code, currently I am manually inserting the image. How can I achieve this dynamically? The number of images to be inserted is not fixed.