2

I'd like to do this:

\documentclass{article}
\usepackage{pdfpages}

\begin{document}

\includepdfmerge{underlay.pdf}

\end{document}

and onto the resulting one page, I'd like to overlay a small PDF image (or SVG/EMF/PS/some other vector format, whichever works easier) onto the right upper corner (defining the location and size). Is this possible?

I know that \includegraphics can kind of do this (maybe with tikz), however, I'd like to use the underlying PDF without any changes (no resizing, no shrinking, completely as-is).

5
  • 2
    A tikz overlay would be easy, but you can also do it using \rlap and \raisebox, provided you know where you are starting from. Sep 29, 2016 at 3:26
  • As far as I'm concerned, @JohnKormylo is the easiest solution. I've used it many a times.
    – user10274
    Sep 29, 2016 at 4:13
  • @JohnKormylo thanks for the idea! Unfortunately, I don't really know how to apply it to \includepdfmerge...
    – Zubo
    Sep 29, 2016 at 4:56
  • @MarcvanDongen sounds great! Maybe you can post an MWE?
    – Zubo
    Sep 29, 2016 at 4:57
  • I think the chances are higher that you read the TikZ manual.
    – user10274
    Sep 29, 2016 at 15:55

1 Answer 1

2

Let's assume this is your underlay.pdf page, giving a regular US-letter (8.5in x 11in) PDF image:

enter image description here

\documentclass{article}

\usepackage{xcolor,lipsum}

\begin{document}

\pagecolor{blue!30}
\lipsum[1-5]

\end{document}

We can use pdfpages to import it as-is as use eso-pic to overlay content during shipout:

enter image description here

\documentclass{article}

\usepackage{pdfpages,eso-pic}

\begin{document}

\AddToShipoutPictureFG*{% Add content to the ForeGround of the next page *only*
  \AtPageLowerLeft{%
    \hspace{\dimexpr8.5in-8cm}% Move content over to the right
    \raisebox{\dimexpr11in-5cm}{% Raise content
      \includegraphics[width=8cm,height=5cm]{example-image}% Place content
    }%
  }%
}%
\includepdf{underlay}

\end{document}

Since the dimensions are known, it's straight forward to write an expression that provides the exact placement.

1
  • Yes, this definitely works. Thank you very much for the detailed and well-commented answer!
    – Zubo
    Sep 29, 2016 at 5:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .