Development Environment
Under the directory of the installed library [pdfmake],
npm install
npm run build
I would like to run , but I get the following error when running npm run build
.
Module not found:Error: Can't resolve'./src'in'/Users/***
In order to translate PDF output into Japanese, it is necessary to rebuild it, but if you know the cause or solution, please let me know.
It is an application under development at Nxt.js and has the function of outputting data PDF.
At that time, I am using a pdfmake library, but I need to read a font that can display Japanese full-width numbers and symbols, and after researching various methods, I found the following articles.
PDF file generation using custom fonts
in pdfmakeI was able to apply the desired Japanese font using this method.
If you actually install pdfmake on a project and try to apply Japanese fonts,
Error rebuilding pdfmake library
This article was used as a reference when installing pdfmake on the project.
Apply Japanese fonts with pdfmake
Even though the pdfmake cloned from github was successfully npm run build
, I am not sure if the pdfmake library installed with the npm install pdfmake
command on the project will fail.
I would appreciate it if you could give me advice if you know anything.
Thank you for your cooperation.
Here, after all,
npm run build
could not be run, but
You can now use the new font by creating a new vfs_fonts.js, placing it in any directory, and IMPORTing it with reference to PDFMAKE official document.
© 2024 OneMinuteCode. All rights reserved.