RapiPdf icon indicating copy to clipboard operation
RapiPdf copied to clipboard

中文乱码,如何解决?

Open Cong-Lee opened this issue 5 years ago • 3 comments

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

Cong-Lee avatar Jan 21 '21 01:01 Cong-Lee

請參考 https://github.com/jyyan/RapiPdf/commit/77e6aaac9390e84d8070817f54020579bbd0c7df

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

補充:Sample RapiPdf release

jyyan avatar Jul 17 '21 23:07 jyyan

Duplicate of #50

jyyan avatar Jul 18 '21 00:07 jyyan

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

syksy-map avatar Sep 15 '21 07:09 syksy-map