3

The pdfpages package does not seem to have either a verbose or quiet option. I am compiling a big document and the include messages from pdfpages are obscuring the warnings from other places in the document. Is there a way to quiet these messages or another method for drawing my attention to the warnings?

  • 1
    What do these messages look like? Please post a piece from your .log file. – Werner Jul 19 '13 at 3:12
  • AdamTindaleCV.pdf, id=273, page=1, 614.295pt x 794.97pt> <use AdamTindaleCV.pdf, page 1> <use AdamTindaleCV.pdf, page 1> <use AdamTindaleCV.pdf, page 1> <use AdamTindaleCV.pdf, page 1> <use AdamTindaleCV.pdf, page 1> [16 <./AdamTindaleCV.pdf>] <AdamTindaleCV.pdf, id=312, page=2, 614.295pt x 794.97pt> The file is about 300 pages, so there are a lot of these messages. Maybe I should just be grepping the log file for warnings? – Adam Tindale Jul 19 '13 at 3:54
2

Yes you can subdue the spew. Here's what is at work...

Essentially pdfpages uses graphicx (which in turn uses graphics) to insert PDF pages. And, all graphics-related error/warning/info and log messages are displayed using four macros:

\def\GPT@error{\@PackageError{pdftex.def}}%
\def\GPT@warn{\@PackageWarning{pdftex.def}}%
\ifx\Gin@log\@undefined
  \def\Gin@log{\message}%
\fi
\def\GPT@info{\@PackageInfoNoLine{pdftex.def}}%

You could give pdfpages the silent treatment by adding

\makeatletter
% From pdftex.def
\let\GPT@error\@gobble
\let\GPT@warn\@gobble
\let\Gin@log\@gobble
\let\GPT@info\@gobble
% From latex.ltx
\def\@providesfile#1[#2]{%
  %\wlog{File: #1 #2}% <--- remove writing to .log
  \@addtofilelist{ #2}%
  \endgroup}
\makeatother

The above redefines the output messaging components to gobble their arguments, except for \@providefile, for which it only turns off the .log writing component. You may not be interested in redefining the error/warning output.

However, this removes all graphics-related error/display messaging. Of course, it would be possible to perform this selectively by momentarily switching things off specifically for \includepdf.

  • This does suppress the output but now I receive this error. ! Package hyperref Error: This should not happen! (hyperref) Missing version of `hpdftex.def'. – Adam Tindale Jul 19 '13 at 5:13
  • @AdamTindale: A minimal document using the above + hyperref doesn't produce this error. Could you provide more detail so one can reproduce the problem? – Werner Jul 19 '13 at 5:19
  • the problem was that I included that snippet in the wrong place. Once I put after including hyperref the problem disappeared. – Adam Tindale Jul 21 '13 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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