TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to do this:


However, this feature is only supported by pdftex 1.40.15 and higher. How can I do this conditionally, so that my document won't be broken in other tex engines or in earlier versions of pdftex?

As a side issue, does this command go in the preamble? (I can't test it because I'm not yet running 1.40.15+.)

Related: Can't silence a pdftex "PDF inclusion: multiple PDFs with page group" error

share|improve this question
According to the docs, it was introduced in 1.40.14 :-) – Joseph Wright Aug 29 '14 at 21:48
See How can I programmatically populate a PDF's pdfcreator field? for some detail on conditioning based on the version of pdfTeX. – Werner Aug 29 '14 at 21:50
@JosephWright pdftex-a.pdf says 1.40.14, but NEWS says 1.40.15. Anyway I would not check for the version, but for the feature instead. – Heiko Oberdiek Aug 29 '14 at 22:21
I have 1.40.14, and the feature is not present in my version. – Ben Crowell Aug 30 '14 at 17:38
up vote 11 down vote accepted

Of course, the version number can be checked, but it is not so trivial, because the numbering scheme has changed in the past several times. I think, it is easier to check for the feature, whether \pdfsuppresswarningpagegroup is defined:

\expandafter\ifx\csname pdfsuppresswarningpagegroup\endcsname\relax

\csname has the side effect, that it defines an undefined command with the meaning of \relax. Therefore \ifx with \csname is executed inside a local group.

\pdfsuppresswarningpagegroup should then be set before it is used. Therefore the preamble is a good place for it.

share|improve this answer
+1 Someone is perfectionist here :p I would simply do \begingroup\expandafter\ifx\csname pdfsuppresswarningpagegroup\endcsname\relax\else\global\pdfsuppresswarningpagegr‌​oup=1\relax\fi\endgroup – yo' Aug 29 '14 at 22:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.