TYPESCRIPT VUE 3 2024-11-28
if you see this You might get build errors or same error as OP. Don't import pdfFonts. instead follow this.
pdfMake.fonts = { Helvetica: { normal: "Helvetica",bold: "Helvetica-Bold",italics: "Helvetica-Oblique",bolditalics: "Helvetica-BoldOblique",},}
and remember to add following to your docDefinition (TDocumentDefinitions)
defaultStyle: { font: 'Helvetica' }
what we have done is instead depending on Roboto font we used 'Helvetica' font insted, which is browser safe font(comes pre installed in most OS and web browsers). and this method only works with English Charactors. you could try to change this for your desired font but I cannot guarantee if it will work for you. read documentation for more info : https://pdfmake.github.io/docs/0.1/fonts/standard-14-fonts/