Incidencia #25166

LuaTeX-ja で作った非埋め込みのファイルを pdfpages で取り込もうとするとエラーが出る

Abrir Fecha: 2011-05-14 20:49 Última actualización: 2011-05-16 15:36

Informador:
Propietario:
(Ninguno)
Tipo:
Estado:
Cerrado
Componente:
(Ninguno)
Hito:
(Ninguno)
Prioridad:
3
Gravedad:
3
Resolución:
Ninguno
Fichero:
Ninguno

Details

%% test.tex
\input luatexja-core.sty
あ
\end

をコンパイルしてできた test.pdf を

\documentclass{article}
\usepackage{pdfpages}
\begin{document}
\includepdf{test}
\end{document}
で取り込もうとすると,以下のエラーが出ます.xelatex のみ,エラーが出ますがちゃんと取り込めています.

  • pdflatex の場合:
    !pdfTeX error: pdflatex: PDF inclusion: reference to invalid object (is the inc
    luded pdf broken?)
     ==> Fatal error occurred, no output PDF file produced!
    
  • lualatex の場合:
    !LuaTeX error: PDF inclusion: reference to invalid object (is the included pdf 
    broken?)
     ==> Fatal error occurred, no output PDF file produced!
    
  • xelatex の場合:
    Package pdfpages Warning: Erroneous page width of 0.0pt is corrected.
    
    
    Package pdfpages Warning: Erroneous page height of 0.0pt is corrected.
    
    <use  "test.pdf"  page1> <use  "test.pdf"  page1> <use  "test.pdf"  page1>
    <use  "test.pdf"  page1> [1] (./test2.aux)
    ** WARNING ** Can't resolve object: 0 0
     )
    Output written on test2.pdf (1 page).
    Transcript written on test2.log.
    

なお,ptex + dvipdfmx で作ったフォント非埋め込みの PDF を取り込む場合にはこのようなエラーは出ないようです.

Ticket History (3/4 Histories)

2011-05-14 20:49 Updated by: kmaeda
  • New Ticket "LuaTeX-ja で作った非埋め込みのファイルを pdfpages で取り込もうとするとエラーが出る" created
2011-05-15 05:15 Updated by: zrbabbler
Comentario

無圧縮(\pdfcompresslevel=0)の PDF の出力結果を見ると、 以下のようになっています。

<<
/Type /FontDescriptor
/FontName /Ryumin-Light
/Flags 4
/FontBBox [0 0 1000 1]
/Ascent 0
/CapHeight 0
/Descent 0
/ItalicAngle 0
/StemV 73
/XHeight 503
/FontFile3 0 0 R
>>

/FontFile3 (埋込の場合、これの参照先あフォントのバイナリそのものになるようです) のオブジェクト参照 ID が本来無効な「0」になっています。 pTeX + dvipdfmx の出力を見る限り、 正しいのは「/FontFile3 がない状態」であり、 実際、「/FontFile3 0 0 R」の部分を空白で潰すと pdfpages での取込が正常に行われました。

どうも「0 0 R」という参照表記を出すこと自体があり得ない気がするので、 LuaTeX の不具合の可能性もあると思います。

2011-05-15 06:40 Updated by: kmaeda
Comentario

検証いただきありがとうございます. ご指摘に従い下記変更を LuaTeX のソースに加えると確かにうまくいきました.

Index: source/texk/web2c/luatexdir/font/writefont.w
===================================================================
--- source/texk/web2c/luatexdir/font/writefont.w	(revision 4266)
+++ source/texk/web2c/luatexdir/font/writefont.w	(working copy)
@@ -533,7 +533,7 @@
     }
     pdf_dict_add_int(pdf, "Flags", fd_flags);
     write_fontmetrics(pdf, fd);
-    if (is_cidkeyed(fd->fm)) {
+    if (is_cidkeyed(fd->fm) && fd->ff_found) {
         if (is_type1(fd->fm))
             pdf_dict_add_ref(pdf, "FontFile3", (int) fd->ff_objnum);
         else if (is_truetype(fd->fm))
2011-05-16 15:36 Updated by: kmaeda
  • Estado Update from Open to Cerrado
  • Ticket Close date is changed to 2011-05-16 15:36
Comentario

r4270 でパッチが取り込まれました. http://tracker.luatex.org/view.php?id=654

Attachment File List

No attachments

Editar

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Entrar