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 Answer
You can use the pagecommand
option with includepdf
to overlay the document with tikz.
\documentclass{article}
\usepackage{pdfpages}
\usepackage{tikz}
\begin{document}
\includepdf[pagecommand={\begin{tikzpicture}[remember picture,overlay]
\fill[red, opacity=0.3] (current page.south west) rectangle (current page.north east) ;
\end{tikzpicture}\thispagestyle{empty}}]{test.pdf}
\end{document}
-
It would be nice if you can show the implementation of this with an explicit example.– CragfeltDec 16, 2017 at 10:21
exact document size
= file/data size or geometric size?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.