Fixing "font not embedded" issue to pass the IEEE PDF eXpress check

本文介绍了解决PDF文档中出现的“字体未嵌入”错误的方法,包括使用不同的工具和命令行参数来确保所有引用的字体都被正确嵌入到PDF文件中,从而避免打印或渲染时的字体替代问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I'm getting the error "A PDF font is not embedded." What can I do about this?

This error occurs when a PDF document does not include all the fonts that it references. This may cause fonts to be substituted when printing or rendering, yielding papers that have incorrect spacing or equations. IEEE, ACM and other publishers require all fonts to be embedded.

Hints on fixing this problem can be found at IEEE or PaperPlaza or dvipdfm.

NSF also publishes a set of related suggestions for generating PDF.

If you are using Adobe Acrobat to produce the PDF, check the "press quality" option in the print menu.

To check if all fonts are embedded, open the PDF of the paper or the figure in Acrobat and check under "File/Document Properties/Fonts" (Windows) or "File/Properties/Fonts" (MacOS). All fonts must say "embedded" or "embedded-subset". (The precise location of the menu option may depend on the version of Adobe Acrobat.)

The IEEE maintains a set of Acrobat job options and templates. ACM SIGGRAPH has also published a set of hints. Another set of hints was compiled by USENIX.

For MacOS, you can open the file in Preview and save the document to another file. This will embed all the fonts. Also, Microsoft Word on MacOS exports proper PDF with embedded fonts.

Gnuplot-generated PostScript often has this problem. Mohit Lad recommends the following:

By default, gnuplot does not embed fonts in eps files; insert this line in your gnuplot script (note that 26 is the font size that can be changed).
set terminal postscript eps enhanced "NimbusSanL-Regu" fontfile "uhvr8a.pfb" 26

If you use MATLAB figures, you need to use export_fig and then generate the PDF file using pdflatex.

If you convert Postscript to PDF using ps2pdf, use the following arguments:

ps2pdf -dEmbedAllFonts=true -dSubsetFonts=true -dEPSCrop=true -dPDFSETTINGS=/prepress graph.eps

You may also try the command above if your LaTeX file produces an embedded-font error.

For EPS files generated by xmgrace, one should deactivate the Option "use device fonts" in the xmgrace print setup window.

It has been reported that FreePDFConvert and cutePDF properly include fonts. The cutePDF support page indicates the configuration file, %Program Files%\Acro Software\CutePDF Writer\PDFWrite.rsp, may contain the parameter CompatibilityLevel=1.5 to generate PDF files with version 1.5.




Fixing "font not embedded" issue to pass the IEEE PDF eXpress check

We recently had to make the format of a paper complaint with the  IEEE PDF eXpress format. The paper did not pass the check in the first few attempts. Hence this blog post. I'd like to thank my colleague Ning Shang who did the most of the fixes to get it working. I am listing the fixes here so that anyone else who encountered similar issues may find this post useful.

Before that, I work on Ubuntu 9.04, kile 2.1 (the IDE), use the tools latex, bibtex and dvipdf to generate pdf files from tex/bib/cls files. (i.e. latex file.tex; bibtex file; (to attach the ref.bib file) latex file.tex; dvipdf file.dvi to finally get file.pdf)

The tex file uses the IEEE conference style. Additionally we used the following packages initially:
times, epsfig, graphicx, url, verbatim, amsmath, amsfonts


Issue #1: Document contains bookmarks
Fix: We had to remove the url package from the included packages lists and convert \url{address} to {address} in ref.bib.

Issue #2: Font Times-Italic, Times-Roman, Times-BoldItalic, Times-Bold, Helvetica, Courier is not embedded.

You can see what fonts are embedded and what are not, by using "pdffont file.pdf" and looking at the "emb" column. In our case, it did show that some fonts are not embedded.

Fix: We searched the Internet [ 12]and found that in order to fix this (i.e. to embed all the required fonts) we need to do the conversion from tex to pdf in two stages. This is a dirty hack; but it works.

latex file.tex
bibtex file
latex file.tex
latex file.tex (Now we have file.dvi)
dvips -Ppdf -G0 -tletter file.dvi (Now we have file.ps)
ps2pdf -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress file.ps file.pdf (Now we have file.pdf)

### 解决方案 用户 `xiexinxin` 不在 `sudoers` 文件中,因此无法使用 `sudo` 权限。以下是将用户添加到 `sudoers` 文件中的方法: #### 方法一:使用 `visudo` 编辑 `/etc/sudoers` `visudo` 是一个安全的编辑器,用于修改 `/etc/sudoers` 文件,确保语法正确[^4]。执行以下命令: ```bash sudo visudo ``` 在文件末尾添加以下内容: ```plaintext xiexinxin ALL=(ALL) NOPASSWD:ALL ``` 保存并退出。此配置允许用户 `xiexinxin` 以无密码方式执行所有 `sudo` 命令。 #### 方法二:将用户添加到 `sudo` 用户组 在某些 Linux 发行版中(如 Ubuntu),属于 `sudo` 组的用户自动具有管理员权限。可以通过以下命令将用户添加到该组: ```bash sudo usermod -aG sudo xiexinxin ``` 完成后,用户需要重新登录以使更改生效[^2]。 #### 方法三:检查文件权限 如果直接编辑 `/etc/sudoers` 文件时遇到权限问题,可以检查文件的所有者和权限: ```bash ls -l /etc/sudoers ``` 确保文件由 `root` 拥有,并且权限为 `440` 或更严格。若权限不正确,可通过以下命令修复: ```bash sudo chmod 440 /etc/sudoers sudo chown root:root /etc/sudoers ``` #### 方法四:解决 SELinux 引发的权限问题 如果系统启用了 SELinux,可能会限制对 `/etc/sudoers` 的访问。可以检查文件的安全上下文: ```bash ls -Z /etc/sudoers ``` 输出示例: ```plaintext system_u:object_r:etc_t:s0 /etc/sudoers ``` 如果上下文不正确,可以尝试修复: ```bash sudo restorecon /etc/sudoers ``` #### 示例代码 以下是一个完整的脚本,用于将用户 `xiexinxin` 添加到 `sudoers` 文件中: ```bash #!/bin/bash # 将用户添加到 sudo 组 if ! id "xiexinxin" &>/dev/null; then echo "User xiexinxin does not exist. Creating it..." sudo adduser xiexinxin fi # 将用户添加到 sudo 组 if ! groups xiexinxin | grep -q 'sudo'; then echo "Adding user xiexinxin to the sudo group..." sudo usermod -aG sudo xiexinxin fi # 使用 visudo 编辑 sudoers 文件 echo "Editing /etc/sudoers file..." sudo bash -c 'echo "xiexinxin ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers' # 检查 sudoers 文件语法 sudo visudo -c # 检查文件权限 CURRENT_PERMISSIONS=$(stat -c "%a" /etc/sudoers) if [ "$CURRENT_PERMISSIONS" != "440" ]; then echo "Fixing /etc/sudoers permissions..." sudo chmod 440 /etc/sudoers fi # 检查文件所有者 CURRENT_OWNER=$(stat -c "%U:%G" /etc/sudoers) if [ "$CURRENT_OWNER" != "root:root" ]; then echo "Fixing /etc/sudoers ownership..." sudo chown root:root /etc/sudoers fi echo "All checks completed." ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值