推荐学习书目
› 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 · 4018 views
    This topic created in 503 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
    opengps
    Jun 18, 2025
    1
    应该是文件编码问题,看看生成的文件编码是不是 unicode (无 bom ): 查了下这个表情对应的 unicode 是 U+1F4CD 字节\xF0\x9F\x93\x8D
    Dockerfile
    Dockerfile
    Jun 18, 2025
    2
    具体原因可能是编码
    我只能说 libreoffice 转 pdf 的效果就是比 office 和 wps 的差一些
    c398425861
    c398425861
    Jun 18, 2025
    3
    是不是字体没有这个字符
    w292614191
    w292614191
    Jun 18, 2025
    4
    安装中文字体试试?

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