为 gotenberg/libreoffice 嵌入额外的阿拉伯字体

问题描述

TLDR; 我有一个使用 GE Dinar Two 的 docx 文档。当我转换它时,GE Dinar Two字体没有嵌入到pdf中,阿拉伯文本使用默认的阿拉伯字体显示。

我想将带有阿拉伯字体 GE Dinar Two 的 docx 文档转换为 pdf。生成的 pdf 没有按预期嵌入字体,所有阿拉伯文本都使用默认字体。使用 MS Word 保存为 PDF 附加字体。

对于使用 thecodingmachine/gotenberg:6 的 docx 到 pdf 文档转换,其核心使用 libreoffice

按照 documentation 添加其他字体,我创建了一个新的 docker 图像,如下所示;

FROM thecodingmachine/gotenberg:6

USER root

ADD fonts /tmp/fonts

# Add more fonts
RUN mkdir -p /usr/local/share/fonts && \
    mv -f /tmp/fonts/* /usr/local/share/fonts/ && \
    fc-cache -fv && \
    apt-get update && \
    apt-get install -y fonts-arphic-ukai fonts-arphic-uming \
        fonts-arabeyes fonts-kacst fonts-hosny-thabit aspell-ar-large fonts-hosny-amiri fonts-sil-scheherazade \
        fonts-ipafont-mincho fonts-ipafont-gothic fonts-unfonts-core ttf-wqy-zenhei && \
    apt-get clean

USER gotenberg

fonts 目录中,我有 GE Dinar Two 字体 ttf & oft。

如何确保自定义字体嵌入到 pdf 中。我也试过在 docx 文档中包含字体,它不起作用。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...