suspicious line in pdftoepdf.cc
Hi, FYI: We just ran into a bug in luatex where there acciddentally appear newlines before the %!PDF in the output file. It turns out this is caused by querying embedded PDF images before any real output has taken place. We tracked it down to a line in pdftoepdf.cc that is present in both luatex and pdftex. In the current pdftex trunk, it is line 836 (inside read_pdf_info function): // get the group and make sure it's indirect if (page->getGroup() != NULL) { initDictFromDict(lastGroup, page->getGroup()); if (lastGroup->dictGetLength() > 0) { groupIsIndirect = lastGroup->isRef(); if (groupIsIndirect) { // FIXME: Here we already copy the object. It would be // better to do this only after write_epdf, otherwise we // may copy ununsed /Group objects copyObject(&lastGroup); epdf_lastGroupObjectNum = getNewObjectNumber(lastGroup->getRef()); } else { // make the group an indirect object; copying is done later // by write_additional_epdf_objects after write_epdf epdf_lastGroupObjectNum = pdfnewobjnum(); } pdf_puts("\n"); // THIS line } I have currently moved the pdf_puts in luatex to inside the if (groupIsIndirect) { branch, but that is probably not right either, in light of that FIXME. Best wishes, Taco
participants (1)
-
Taco Hoekwater