pdf font inclusion error (with partial patch)
Hi, I have added the patch below to luatex and a similar one-liner for my local pdftex because we here ran into a pdf document that has the following oddness: 5 0 obj << /F15 << /Type /Font /Subtype /TrueType /BaseFont /WIDGBH+ArialMT /Encoding /WinAnsiEncoding /FirstChar 0 /LastChar 255 /FontDescriptor 8 0 R /Widths 7 0 R
...
6 0 obj << /Type /Page /Parent 4 0 R /MediaBox [ 0 0 595.276 841.89 ] /Resources << /Font 5 0 R /ProcSet [ /PDF /Text /ImageB /ImageC ]
/Contents 13 0 R
endobj
Current pdftoepdf.cc expects to find indirect references inside object 5, without the patch it generates a fatal error. The patch itself is only a quick fix that works thanks to my setting of \pdfinclusioncopyfonts, as I do not know how to fix the 'other' case, sorry. Best wishes, Taco taco@metatex.org wrote:
Author: taco Date: 2009-11-26 15:14:10 +0100 (Thu, 26 Nov 2009) New Revision: 3192
Modified: trunk/source/texk/web2c/luatexdir/image/pdftoepdf.cc Log: add a quick and dirty fix for pdfs generated by easyPDF Printer Driver 4.2, which uses full font dictionaries inside the Font resources instead of indirect references.
Modified: trunk/source/texk/web2c/luatexdir/image/pdftoepdf.cc =================================================================== --- trunk/source/texk/web2c/luatexdir/image/pdftoepdf.cc 2009-11-23 21:04:08 UTC (rev 3191) +++ trunk/source/texk/web2c/luatexdir/image/pdftoepdf.cc 2009-11-26 14:14:10 UTC (rev 3192) @@ -459,7 +459,8 @@ pdf_puts(pdf, "/Font << "); for (i = 0, l = obj->dictGetLength(); i < l; ++i) { obj->dictGetValNF(i, &fontRef); - if (fontRef->isRef()) + if (fontRef->isRef() || + (fontRef->isDict() && (pdf->inclusion_copy_font == 0))) copyFont(pdf, obj->dictGetKey(i), &fontRef); else pdftex_fail("PDF inclusion: invalid font in reference type <%s>",
_______________________________________________ Luatex-commits mailing list Luatex-commits@lists.foundry.supelec.fr http://lists.foundry.supelec.fr/mailman/listinfo/luatex-commits
participants (1)
-
Taco Hoekwater