簡體   English   中英

將 PDF 文件導入 XeLaTeX 會出現“pdf_link_obj():傳遞無效對象”錯誤

[英]Import PDF file into XeLaTeX gives "pdf_link_obj(): passed invalid object" error

我正在嘗試使用\\includepdf{xyz.pdf}將 PDF 導入 XeLaTeX。 文件xyz.pdf是由 Xerox 5755 機器創建的掃描文件,PDF 版本為 1.3。

我得到的錯誤是:

** WARNING ** No valid name object found.
   ** WARNING ** Could not find a value in dictionary object.
   ** WARNING ** Didn't find "endobj".
   ** ERROR ** pdf_link_obj(): passed invalid object.

我嘗試通過運行pdftk xyz.pdf output xyz2.pdf來規范化 PDF,這確實解決了問題——但僅適用於某些 PDF 文件,這些文件pdftk修復的文件與未修復的文件之間沒有明顯的關系。 總是有一些使用pdftk規范化的文件繼續顯示與未規范化文件完全相同的錯誤。

我已經嘗試尋找解決這個問題的方法並提出了這個線程: XeLaTeX questions with includegraphics ,這表明可以通過使用-output-driver=xdv2pdf或使用pdf(la)tex來解決問題. 唉,我不能使用 PdfLaTeX,因為我需要 XeLaTeX 的 unicode 支持。 同樣,我使用的是 Linux,所以我不能使用 Mac 特定的xdv2pdf

對於 XeLaTeX 無法加載這些 PDF 的原因以及如何“修復”這些 PDF 的任何想法和意見,我將非常感激。

親切的問候,

布賴恩

Luatex(Pdftex的前身)也原生支持Unicode。 當您嘗試使用lualatex編譯時會發生什么?

我在Debian上使用XeLaTeX時遇到了相同的問題。 從LibreOffice導出的PDF已正確導入,而包括由我的打印機創建的PDF掃描失敗。

我可以通過重新使用Ghostscript修改PDF來解決此問題。 在Linux上,這可以通過以下方式完成:

gs -o repaired.pdf -sDEVICE=pdfwrite dPDFSETTINGS=/prepress corrupted.pdf

(來源: https : //superuser.com/a/282056 ,還有用於Windows的Ghostscript命令)

用XeLaTeX導入“已修復”的PDF效果很好。

我當時使用\\ includegraphics {},並遇到了一個類似的pdf問題(通過使用Win2pdf從Excel打印文件創建)。 我使用Adobe Reader打開pdf並保存了副本。 然后使用\\ includgraphics {}和xelatex編譯器成功合並了該副本。

我有相同的錯誤輸出:


(/usr/share/texlive/texmf-dist/tex/latex/pdflscape/pdflscape.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/lscape.sty)) [1] [2]
Chapter 1.
[3] [4]
Chapter 2.
[5] [6]
Chapter 3.
[7] [8] [9] [10]
Chapter 4.
[11]
Overfull \hbox (4.64401pt too wide) in paragraph at lines 182--189
[]\TU/Inter(0)/m/n/10 This makes the use of \TU/Inter(0)/m/it/10 CTRL \TU/Inter
(0)/m/n/10 key combinations more ergonomic. 
[12] [13]
Overfull \hbox (2.98775pt too wide) in paragraph at lines 205--212
\TU/Inter(0)/m/n/10 reachable through the OLED menu. Each cell icon corresponds
 
[14] [15] [16]
Chapter 5.
(/usr/share/texlive/texmf-dist/tex/latex/microtype/mt-cmr.cfg)
Overfull \hbox (15.37852pt too wide) in paragraph at lines 251--258
\TU/Inter(0)/m/n/10 for your computer to execute, but also to write programs (s
cripts) 
[17]
xdvipdfmx:fatal: pdf_link_obj(): passed invalid object.

No output PDF file written.

我的乳膠中有問題的頁面也使用了pdf數字。

安裝 ghostscript 包后問題就消失了(我正在運行 Debian)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM