[Tex/LaTex] Multiple PDFs with page group included in a single page warning


I updated TeX Live to the Ubuntu Quantal version (2012.20120611-4) and I suddenly got this warning:

PDF inclusion: multiple pdfs with page group included in a single page

This is a minimal example for which I get the warning:



Both images have been produced by the export PDF feature of Inkscape and contain simple line drawings (no fancy stuff).

I have been looking on the Internet, but only found others with this problem and did not found any solutions:

  • In the Latex user group they did not seem to understand/recognise the problem. And told the OP to go to the MikTeX groups, but it is not a MiKTeX specific problem as it is also happening with TeX Live and other distributions.

  • At gmane.comp.tex.pdftex they were looking into the use (and versions) of MS Office products. Also not the cause as I am not using MS Office to produce PDFs.

During my search if found the PDFTeX code (pdftoepdf.cc) that spawns this warning, maybe it is of some help in understanding what is happening?

if (pdfpagegroupval == 0) { 
    // another pdf with page group was included earlier on the same page;
    // copy the Group entry as is
    pdftex_warn("PDF inclusion: multiple pdfs with page group included in a single page");
    pdf_puts("/Group ");
} else {
    // write Group dict as a separate object, since the Page dict also refers to it
    pageDict->lookup((char *) "Group", &dictObj);
    if (!dictObj->isDict())
        pdftex_fail("PDF inclusion: /Group dict missing");
    writeSepGroup = true;
    initDictFromDict(groupDict, page->getGroup());
    pdf_printf("/Group %d 0 R\n", pdfpagegroupval);

Does anyone have an idea what is happening, whether it is serious and how I could get rid of these warnings?

Best Answer

The problem is also reported in a german forum mrunix.de. It might be a bug in the tex distribution (pdftex). The problem happens only when you include multiple pdf pages, created in a specific manner (e.g. by MS Office products), in a single page.

Solution: Convert pdf files into ps and then back to pdf using Ghostscript, then the warning will go away (pdf2ps -> ps2pdf). This conversion probably removes the "page group" information from pdf files. (Caveat: This renders your pdf and some text might not be selectable or searchable any more.)

Editing the colorspace of pdf files with ghostscript also resolves the issue (if there is no multiple pages in the pdf file):

gs -o fixed-image.pdf -sDEVICE=pdfwrite -dColorConversionStrategy=/sRGB 
   -dProcessColorModel=/DeviceRGB original-image.pdf

CMYK conversion if RGB does not work for you:

gs -o fixed-image.pdf -sDEVICE=pdfwrite -dColorConversionStrategy=/CMYK 
   -dProcessColorModel=/DeviceCMYK original-image.pdf

P.S. Some programs generate "page group"s in pdf files; for example when you impose different images/objects in illustrator or inkscape. It seesm that pdftex is unable to handle multiple page groups in a single output page. The reason might be that each page groups specifies a different color space or transparency space.