使用 TCPDF 生成 PDF - 无法提取嵌入字体 [英] generating PDF using TCPDF - cannot extract embedded font
问题描述
我使用 TCPDF 生成动态 PDF.它工作正常,但由于我将生成器移动到新服务器,因此出现问题.
I'm using TCPDF for generating dynamic PDFs. It works fine but since I move my generator to a new server I have a problem.
打开 pdf 时出现错误:
I'm getting a error when I open the pdf:
Cannot extract the embedded font 'AAAAAC+FreeSerif'. Some characters may not display or print correctly.
它显示符号而不是文本.在旧服务器上,文件已成功生成,但在新服务器上,我看到的只是符号.任何人都知道为什么会发生这种情况?(两台服务器上的文件是一样的!)
It displays symbols instead of text. On the old server the files are successfully generated but on the new server all I see are symbols. Anyone has any idea why this would happen? (the files on both servers are the same!).
推荐答案
想通了...问题是服务器 php.ini 有:
Figured it out... the problem was that the servers php.ini had:
set_magic_quotes_runtime on
破坏了二进制数据.关闭它解决了问题.
Which corrupted the binary data. Turning it off solved the problem.
这篇关于使用 TCPDF 生成 PDF - 无法提取嵌入字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!