推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
waino
V2EX  ›  Python

LibreOffice:在服务器上使用它将 Excel 转 PDF, emoji 缺失?

  •  
  •   waino · Jun 18, 2025 · 3286 views
    This topic created in 350 days ago, the information mentioned may be changed or developed.
    Linux 服务器:Debian AMD
    注:Windows 、macos 都没有问题。字体啥的也都下了,只有放到 Linux 有问题。

    比如:我 Excel 有“📍”,转成 PDF 后,它就消失不见啦~ PDF 里面显示的是空白
    13 replies    2025-06-26 15:34:25 +08:00
    opengps
        1
    opengps  
       Jun 18, 2025
    应该是文件编码问题,看看生成的文件编码是不是 unicode (无 bom ): 查了下这个表情对应的 unicode 是 U+1F4CD 字节\xF0\x9F\x93\x8D
    Dockerfile
        2
    Dockerfile  
       Jun 18, 2025
    具体原因可能是编码
    我只能说 libreoffice 转 pdf 的效果就是比 office 和 wps 的差一些
    c398425861
        3
    c398425861  
       Jun 18, 2025
    是不是字体没有这个字符
    w292614191
        4
    w292614191  
       Jun 18, 2025
    安装中文字体试试?

    然后
    @Jwyt #2 有什么更好的选择?前端用的 Univer Sheet ,只能后端解析成 Excel 再转 PDF 打印。没想到更好的方案。
    w292614191
        5
    w292614191  
       Jun 18, 2025
    @w292614191 #4 用的是 LibreOffice 24 + jodconverter
    Dockerfile
        6
    Dockerfile  
       Jun 18, 2025
    @w292614191 都要折腾,一个是部署一套 onlyoffice ,一个是 linux 版本的 wps ,最后是找个 windows 环境装 wps 或者 office 调用
    shawnwang340
        7
    shawnwang340  
       Jun 18, 2025
    同楼主,我用的也是 LibreOffice 24 + jodconverter ,进来看看有没有更好的选择,wps 我记得是不是需要收费来着
    liaohongxing
        8
    liaohongxing  
       Jun 18, 2025
    debian 系要显示彩色 emoji , 需要安装 fonts-noto-color-emoji 包。安装后重启再试试。
    qqjt
        9
    qqjt  
       Jun 18, 2025
    搞个 Windows 服务器安装 Microsoft Office ,再用 .net 写个接口或者命令行工具,我们现在就是这么 Word 转 PDF 的。
    dode
        10
    dode  
       Jun 19, 2025
    @qqjt 求接口
    qrobot
        11
    qrobot  
       Jun 19, 2025
    @dode 我这边也写了一个 word 转 pdf 不过是 linux 下调用 wps ,window 下调用 Microsoft Office 或者 wps
    qrobot
        12
    qrobot  
       Jun 19, 2025
    @dode 价格合适我给你在服务器上部署一套
    omph
        13
    omph  
       Jun 26, 2025
    libreoffice 报 bug 好像用的还是邮件列表,把文件发给他们就行
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   913 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 21:36 · PVG 05:36 · LAX 14:36 · JFK 17:36
    ♥ Do have faith in what you're doing.