包含 PDF 图形时出现“无效...偏移量处的对象...”是什么意思?

包含 PDF 图形时出现“无效...偏移量处的对象...”是什么意思?

喂食

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics{included_file.pdf}
\end{document}

对于 xelatex,我们得到了预期的 PDF 输出,但是

invalid 13 0 R object at offset 259693

invalid 13 0 R object at offset 259693

在控制台上(不在日志中):

$ xelatex mwe
This is XeTeX, Version 3.141592653-2.6-0.999993 (TeX Live 2022/dev/Debian) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./mwe.tex
LaTeX2e <2021-11-15> patch level 1
L3 programming layer <2021-11-22>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/xetex.def)))
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
(|extractbb --version)) (./mwe.aux)
(/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd)
invalid 13 0 R object at offset 259693

invalid 13 0 R object at offset 259693
 [1] (./mwe.aux) )
Output written on mwe.pdf (1 page).
Transcript written on mwe.log.

以下是所附 pdf 中的一些数据:

$ pdfinfo included_file.pdf 
Title:          D:uploadedFile0cc7c497eb35f2a11447e94640dc1f-1bd5194ff4bb7acp1a120c7k41f6fedp15rf1gg11j0m.pdf
Producer:       ImageMagick 6.6.1-7 2010-05-07 Q8 http://www.imagemagick.org
CreationDate:   Wed Oct  7 17:37:59 2015 CEST
ModDate:        Wed Oct  7 17:37:59 2015 CEST
Tagged:         no
UserProperties: no
Suspects:       no
Form:           none
JavaScript:     no
Pages:          1
Encrypted:      no
Page size:      59.52 x 55.92 pts
Page rot:       0
File size:      260480 bytes
Optimized:      no
PDF version:    1.3

由于签署了保密协议,很遗憾,我无法向读者提供随附的 PDF 本身。(它是由我的同事内部生成的,无法在线获取,并且无法再轻松重新生成。)

运行 lualatex 而不是 xelatex 会发出相同的警告消息:

$ lualatex mwe
This is LuaHBTeX, Version 1.14.0 (TeX Live 2022/dev/Debian) 
 restricted system commands enabled.
(./mwe.tex
LaTeX2e <2021-11-15> patch level 1
 L3 programming layer <2021-11-22>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2021/10/04 v1.4n Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics-def/luatex.def)))
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-luatex.def)
(./mwe.aux) (/usr/share/texlive/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texlive/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
warning  (file included_file.pdf) (pdfe): invalid 13 0 R object at offset 25969
3
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}<./included_file.pdf
warning  (pdfe): invalid 13 0 R object at offset 259693
>] (./mwe.aux))
(see the transcript file for additional information)
 406 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 1 glyph, 4 attribute, 48 glue_spec
, 4 attribute_list, 1 write nodes
   avail lists: 1:1,2:35,3:4,4:1,5:23,6:2,7:34,9:38
</usr/share/texmf/fonts/opentype/public/lm/lmroman10-regular.otf>
Output written on mwe.pdf (1 page, 221730 bytes).
Transcript written on mwe.log.

运行 pdflatex 而不是 UTF-8 引擎不会出现任何警告。无论使用哪种引擎,生成的 PDF 文件在视觉上似乎都相同。

这个警告到底告诉我们什么?我们应该担心还是尝试修复 PDF(解压并破解)?

相关内容