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

Created on 27 Sep 2018  路  3Comments  路  Source: bpampuch/pdfmake

Hi,

I am getting an error when trying to print a transparent image.

this.label_logo = 'R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
var pdfContent = {  
            content: [
              {image: 'data:image/gif;base64,' + this.label_logo, alignment: 'left', width: 150},
              {text: '\n'}
                ]};
pdfMake.createPdf(pdfContent).download(data.rma + '.pdf');

any advice?

All 3 comments

For this image is internally returned error: Unknown image format.

Maybe in image is unsupported format, try image re-save.

@Masber is it more than 10KB?

So is it really limited to 10KB ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stefanmihoc picture stefanmihoc  路  3Comments

davidyeiser picture davidyeiser  路  3Comments

MathLavallee picture MathLavallee  路  3Comments

kumarandena picture kumarandena  路  3Comments

dgrice picture dgrice  路  3Comments