1

I've done the following:

\documentclass[preview]{article}
\usepackage{pdfpages}
\begin{document}
This is a test
\includepdf[pages=1] {example-image-a4-numbered}
More testing
\end{document}

and I get a 3-page document: "This is a test" on the first page, a picture from my pdf on the second page, and "More testing" on the third page.

When I change to this:

\documentclass[preview]{standalone}
\usepackage{pdfpages}
\begin{document}
This is a test
\includepdf[pages=1] {example-image-a4-numbered}
More testing
\end{document}

I get something that looks like this: enter image description here

...and the PDF contents don't show up at all. Can someone suggest what's up? (I've tried about 5 different PDFs just to be sure I'm not fighting something weird about one particular PDF.)

I'm on a Mac, using TeXShop.

  • 3
    You can use \includegraphics[page=1]{...}. That's what pdfpages does. – John Kormylo Feb 16 at 3:29
  • OK...that seems to have worked. But is there a reason that pdfpages did NOT work? – John Feb 16 at 3:35
  • 1
    There are lots of reasons. For example, \paperwidth and \paperheight are undefined. – John Kormylo Feb 16 at 3:37
  • 1
    Sigh. Of course there's no hint of an error message...and I once again remember my love/hate relationship with LaTeX. – John Feb 16 at 4:57
  • 2
    standalone is designed for diagrams and other boxed content and changes the internal page definitions for that. When other package are used which do similar things then clashes can occur easily. You could just try to use the preview package with article class instead. – Martin Scharrer Feb 28 at 10:35

Your Answer

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

Browse other questions tagged or ask your own question.