Support Chinese Fonts in PDFmake library.
Getting Started
- support client/server side export PDF by pdfmake.js
- support pdf export with chinese fonts FangZhen
- limit the package size
Install
$ npm install pdfmake-support-chinese-fonts
Usage
;; pdfMakevfs = pdfFontspdfMakevfs;pdfMakefonts = Roboto: normal: 'Roboto-Regular.ttf' bold: 'Roboto-Regular.ttf' italics: 'Roboto-Regular.ttf' bolditalics: 'Roboto-Regular.ttf' fangzhen: normal: 'fzhei-jt.ttf' bold: 'fzhei-jt.ttf' italics: 'fzhei-jt.ttf' bolditalics: 'fzhei-jt.ttf' ;
Then, to use it
const docDefinition = content: "www测试" "测试2" defaultStyle: font: 'fangzhen' ;pdfMake;