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. – Dr. Manuel Kuehner Nov 6 '17 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? – user36296 Nov 6 '17 at 16:52
  • exact document size = file/data size or geometric size? – Dr. Manuel Kuehner Nov 6 '17 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. – David Carlisle Nov 6 '17 at 17:25
  • 1
    @Dr.ManuelKuehner I'm assuming the OP means the page dimensions not the size of the data. – David Carlisle Nov 6 '17 at 18:11

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 Dec 16 '17 at 10:21

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.