[Tex/LaTex] Can’t silence a pdftex “PDF inclusion: multiple PDFs with page group” error

pdfpdftexwarnings

I am having an issue with PDFs generatied in Inkscape. If multiple files generated in this way are included on a single page I get the following error:

pdfTeX warning: pdflatex.exe (file <FILENAME>.pdf): PDF inclusion: multiple pdfs with page group included in a single page>]

This seems to be a known bug in TeX and has been discussed here:
Multiple PDFs with page group included in a single page warning

Rather than running all my PDFs twice through ghostscript I would like to address this by using silence to surpress the warnings however I am unable to create a warning filter which works.

I have tried \WarningFilter{pdflatex}{PDF inclusion} and various permutations however this does not work. I believe this is due to the file name being placed at the start of the error.

The silence manual states that it is better to use the \WarningFilter* option and to find the process that generates the error message in the .sty files. Since pdfTeX is not a package it does not (to the best of my knowledge) have a .sty file. I cannot work out which file contains the scripts for generating the errors and thus have not been able to create a function filter.

Does anyone know which file (Windows MiKTeX based distribution) generates these errors or how to make a working filter in this case?

Best Answer

The warning is generated by the binary itself. Since pdfTeX 1.40.15 (TeX Live 2014) it can be suppressed by a new primitive:

\pdfsuppresswarningpagegroup=1

Quoting the documentation:

\pdfsuppresswarningpagegroup (integer)

Ordinarily, pdfTeX gives a warning when more than one included pdf file has a so-called "page group object" (/Group), because only one can "win" — that is, be propagated to the page level. Usually the page groups are identical, but when they are not, the result is unpredictable. It would be ideal if pdfTeX in fact detected whether the page groups were the same and only gave the warning in the problematic case; unfortunately, this is not easy (a patch would be welcome). Nevertheless, often one observes that there is no actual problem. Then seeing the warnings on every run is just noise, and can be suppressed by setting this parameter to a positive number. The primitive was introduced in pdfTeX 1.40.14.

In the file NEWS the version number is 1.40.15, where the primitive is introduced.