mrin9 / RapiPdf

PDF generation from OpenAPI / Swagger Spec

Home Page:https://mrin9.github.io/RapiPdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

中文乱码,如何解决?

Cong-Lee opened this issue · comments

转换之后,中文乱码,如何解决?

請參考 jyyan@77e6aaa

  1. 利用 pdfmake 重新打包新的字型
  2. 需要選用 TTF 格式的字型相容性比較好,測試多款 OTF 格式都會有缺字狀況
  3. 將 pdfmake 打包後的 vfs_fonts.js 替換至 src 資料夾中
  4. yarn build 重新打包編譯 RapiPdf 或直接在 yarn serve 執行測試

補充:Sample RapiPdf release

Duplicate of #50

@Cong-Lee 基于rapiPdf做了个在线工具,内置了仿宋字体。不仅支持URL,还支持粘贴JSON文本,甚至直接上传JSON文件。https://swagger-fly.com/