当前位置: 首页 > news >正文

CodiMD导出pdf失败或无中文

CodiMD导出pdf失败,弹出文件保存窗口,有个pdf文件能下载,但是保存的时候提示“网站出问题了”,实际到服务器上看会发现docker崩溃了。
解决办法:

  1. 使用最新的CodiMD镜像,如nabo.codimd.dev/hackmdio/hackmd:2.5.4
    如果是导出pdf没有中文,可能使用的较老的镜像,如2.4.2以前的,里面没有中文字体支持。

  2. docker-compose.yml里面配置如下参数:

    environment:#for pdf export- CMD_ALLOW_PDF_EXPORT=true- QT_QPA_PLATFORM=- OPENSSL_CONF=/etc/ssl

否则会提示DSO support routines:DLFCN_LOAD:
DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory

或者phantomjs错误

2024-03-24T14:42:45.731Z error:         uncaughtException: Command failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-35zfQ8i6i7t56J.html /tmp/tmp-35TT7Us019ho1a.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000
Auto configuration failed
139809934388864:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
139809934388864:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
139809934388864:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
139809934388864:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_confError: Command failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-35zfQ8i6i7t56J.html /tmp/tmp-35TT7Us019ho1a.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000
Auto configuration failed
139809934388864:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
139809934388864:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
139809934388864:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
139809934388864:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_confat ChildProcess.exithandler (node:child_process:402:12)at ChildProcess.emit (node:events:513:28)at maybeClose (node:internal/child_process:1100:16)at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
2024-03-24T14:42:45.731Z error:         An uncaught exception has occured.
2024-03-24T14:42:45.731Z error:         Command failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-35zfQ8i6i7t56J.html /tmp/tmp-35TT7Us019ho1a.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000
Auto configuration failed
139809934388864:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
139809934388864:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
139809934388864:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
139809934388864:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf2024-03-24T14:42:45.734Z error:         Process will exit now.
Error: Command failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-35zfQ8i6i7t56J.html /tmp/tmp-35TT7Us019ho1a.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000
Auto configuration failed
139809934388864:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
139809934388864:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
139809934388864:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
139809934388864:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_confat ChildProcess.exithandler (node:child_process:402:12)at ChildProcess.emit (node:events:513:28)at maybeClose (node:internal/child_process:1100:16)at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5) {code: 1,killed: false,signal: null,cmd: '/home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-35zfQ8i6i7t56J.html /tmp/tmp-35TT7Us019ho1a.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000',level: 'error',timestamp: '2024-03-24T14:42:45.731Z',[Symbol(level)]: 'error',[Symbol(message)]: '2024-03-24T14:42:45.731Z error: \tCommand failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-35zfQ8i6i7t56J.html /tmp/tmp-35TT7Us019ho1a.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000\n' +'Auto configuration failed\n' +'139809934388864:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory\n' +'139809934388864:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:\n' +'139809934388864:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf\n' +'139809934388864:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf\n'
}
http://www.lryc.cn/news/489949.html

相关文章:

  • 数字图像处理(2):Verilog基础语法
  • Kafka 工作流程解析:从 Broker 工作原理、节点的服役、退役、副本的生成到数据存储与读写优化
  • 爬虫重定向问题解决
  • Java技术复习提升 10异常
  • 真题-桂城2022年五年级
  • android 使用MediaPlayer实现音乐播放--权限请求
  • Web开发:ORM框架之使用Freesql的DbFrist封装常见功能
  • 【多线程-第一天-多线程的执行原理-多线程的优缺点-主线程 Objective-C语言】
  • SQL基础语法介绍-基于MySQL
  • 一分钟学习数据安全——数据安全风险的系统化应对思路
  • 端口port常识
  • 【Oracle实战】文章导读
  • “人工智能+高职”:VR虚拟仿真实训室的发展前景
  • c语言学习27宏定义条件编译
  • 理论结合实践:用Umami构建网站分析系统
  • Unreal从入门到精通之如何绘制用于VR的3DUI交互的手柄射线
  • 移动充储机器人“小奥”的多场景应用(上)
  • 已解决wordpress提示正在执行例行维护,请一分钟后回来
  • DDR3脚位解析,class分类
  • 【深度学习|目标跟踪】DeepSort 详解
  • 快速图像识别:落叶植物叶片分类
  • MTK Android12 user版本MtkLogger
  • Python数据结构day2
  • 后台通用tag面包屑
  • oracle数据恢复—通过拼接数据库碎片的方式恢复Oracle数据的案例
  • node.js fluent-ffmpeg 桌面推流
  • AWS的流日志
  • 大数据新视界 -- 大数据大厂之 Hive 数据导入:多源数据集成的策略与实战(上)(3/ 30)
  • Qt入门1——认识Qt的几个常用头文件和常用函数
  • ElasticSearch学习篇17_《检索技术核心20讲》最邻近检索-局部敏感哈希、乘积量化PQ思路