I would like to import a pdf document and add additional code on top of the image (the pdf). I can write over figures by the overpic package. The problem is that I would like my compiled latex file to have the same exact document size (geometric) as the imported graphic (pdf). Is this possible?

  • 1
    I do not think so -- at least not in a systematic manner. Strange request by the way. Commented Nov 6, 2017 at 16:46
  • 1
    Maybe add your image as background and then you can add whatever you want on top of it to the page? Commented Nov 6, 2017 at 16:52
  • exact document size = file/data size or geometric size? Commented Nov 6, 2017 at 16:58
  • if you use standalone then the final document size is the size of the content, which will be the size of the original pdf page if you only over-print text. Commented Nov 6, 2017 at 17:25
  • 1
    @Dr.ManuelKuehner I'm assuming the OP means the page dimensions not the size of the data. Commented Nov 6, 2017 at 18:11

1 Answer 1


You can use the pagecommand option with includepdf to overlay the document with tikz.

    \includepdf[pagecommand={\begin{tikzpicture}[remember picture,overlay]
        \fill[red, opacity=0.3] (current page.south west) rectangle (current page.north east) ;
  • It would be nice if you can show the implementation of this with an explicit example.
    – Cragfelt
    Commented Dec 16, 2017 at 10:21

You must log in to answer this question.

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