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.

6
  • 3
    You can use \includegraphics[page=1]{...}. That's what pdfpages does. Commented Feb 16, 2019 at 3:29
  • OK...that seems to have worked. But is there a reason that pdfpages did NOT work?
    – John
    Commented Feb 16, 2019 at 3:35
  • 1
    There are lots of reasons. For example, \paperwidth and \paperheight are undefined. Commented Feb 16, 2019 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
    Commented Feb 16, 2019 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. Commented Feb 28, 2019 at 10:35

0

You must log in to answer this question.

Browse other questions tagged .