Home

Issue: 2813

nuxt pdfmake

[issue link]

I can not send an image to pdfmake
my code:

let docDefinition = {
          content: data,
          styles: {
            header: {
              fontSize: 16,
              bold: true,
              margin: [0, 0, 0, 20]
            },
            cell: {
              margin: 5,
              fontSize: 9
            }
          },
          images: {
            img: '/myimg.png'
          }
        }
        pdfmake.createPdf(docDefinition).open({}, window)

error:
Uncaught invalid image, images dictionary should contain dataURL entries (or local file paths in node.js)

This question is available on Nuxt.js community (#c2444)