pdfjs
pdfjs copied to clipboard
Undefined CHARARRAY encountered and treated as an empty string - Logs
Is there any way to avoid these logs which are printed whenever pdf is generated?
Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name.
Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name.
Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name.
Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name.
I'm using these internal fonts of the library and one Roboto font:
const fontStyle1 = { fontSize: 8, font: require('pdfjs/font/Helvetica') };
const fontStyle2 = { fontSize: 8, font: require('pdfjs/font/Helvetica-Bold') };
const fontStyle3 = { fontSize: 12, font: new pdf.Font(fs.readFileSync(path.join(__dirname, '/assets/roboto_bold.ttf'))) };
Here, I'm using Roboto font in one line only (for Unicode char purpose), and the rest are of Helvetica.
It looks like the log comes from the opentype.js
dependency. The source doesn't seem to suggest any option to disable the log. So I am afraid that there is no way to turn them off other than using your own modified version of opentype.js
or trying to fix the font.
Yeah, let me try to use some other fonts.
This shall be fixed once we implement opentypejs/opentype.js/#648